RightShift example - basically the same for LeftShift
B4X:
Dim value As Int = 0x48
value = Bit.And(value, 0xF0) ' not really needed but would be 0x0F for left shift to clear sign bit
value = Bit.ShiftRight( value, 4) ' shift right 4 bits
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.