src/Decimal.js
/**
     * 
     * Conversion of data from Decimal to Text, Binary, Octal, and Hexadecimal.
     * 
     * Parameters:
     *  val: String  representing the Decimal value
     * 
     * Returns: 
     *  String: Binary, Octal and Hexadecimal representations of the binary data.
     * Eg.:
     *     Decimal.toBinary("65") ==> returns '01000001'
     *     Decimal.toHex("30") ==> returns '1e'
     *     Decimal.toOctal("15") ==> returns '17'
     *     Decimal.toText("65 84") ==> returns 'AT'
     * 
     */
Conversion of data from Decimal to Text, Binary, Octal, and Hexadecimal.

String  representing the Decimal value

Binary, Octal and Hexadecimal representations of the binary data.
Conversion of data from Decimal to Text Binary Octal and Hexadecimal . String representing the Decimal value Binary Octal and Hexadecimal representations of the binary data .
static toBinary(val) {
        let bin=parseInt(val,10).toString(2);
        let res='';
        for(var i=bin.length;i<8;i++) {
            res+='0';
        }
        res+=bin;
        return res;
    }
static toBinary ( val ) { let bin = parseInt ( val , 10 ) . toString ( 2 ) ; let res = '' ; for ( var i = bin . length ; i < 8 ; i ++ ) { res += '0' ; } res += bin ; return res ; }
Conversion of data from Decimal to Text, Binary, Octal, and Hexadecimal.
Conversion of data from Decimal to Text Binary Octal and Hexadecimal .