I have the following code to convert a binary to a hex in NodeJS:
const bin = "1011100100001011101010100011100100001001101000100011101110110101101111011000001111111100010010111110001110101011100111101101110101100110110111000001111010101010110001110001110000110101001111111101000100110011111000010111110011001011000000001001010000100100"
const hex = parseInt(bin, 2).toString(16).toUpperCase();
console.log(hex)
and it only return:
B90BAA3909A23800000000000000000000000000000000000000000000000000
parseIntreturns is to big/long.With a smaler input, it works.console.log((new BigNumber(bin, 2)).toString(16).toUpperCase())Perhaps this works without "BigNumber" and instead of use developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/…