I have a binary number and i want to get the decimal value of only the seven bits and not include the 8th bit. How do i go about this in java.
eg. 130 as binary => 10000010, I only need 00000010 =>2 ,ie, change only the most significant bit to 0.
Please help.
Use a bit-mask: