I have an array of 4 bytes I would like to join them to get the complete number in java code
for example:
byte[0] = 1d (in hexa) = 00011101 (in binary)
byte[1] = 32 = 00110010
byte[2] = d1 = 11010001
byte[3] =0x5 = 00000101
I would like to get = 00000101110100010011001000011101 = 9759593 (integer)
- how do I add the zeros if needed? (like in byte[1] in the example)
- how do I combine them to one number?