Dim Signed8Bits As Byte
Signed8Bits = 123
Log(Signed8Bits)
Signed8Bits = 234
Log(Signed8Bits) '-22
Dim Signed32Bits As Int
Signed32Bits = Signed8Bits 'still -22
Log(Signed32Bits)
Log(Bit.And(Signed32Bits, 0xFF)) 'high bits 31..8 masked to 0, including sign bit 31
Log(Bit.And(Signed8Bits, 0xFF)) 'this still works because B4A Bit operations are 32 bits (useful to remember for the day you use them with 64-bit Longs...)