If I convert decimal 127 to hexadecimal in Java it will be 7f.
I can get the same output using:
(1 << 7) - 1 = 127
0x7F = 127
I am trying to convert a decimal value 36028797018963967
.
In hex it will be:
0x7fffffffffffff
How can I represent this in bit-shift? For example, the output should be (with the ?
filled in):
(1 << ?) - 1 = 36028797018963967
Any (Java) code to get the output in this format?