I am trying to bit mask the first 6 bits of a byte (8 bits) so the binary looks like 00000011 which I think is &3 ( in hex).
It says here that you just use the AND operator and then the hex.
I am using this:
Dim VPCuff1 As Integer = (buffer(2) and &3) * 256 + buffer(3)
buffer() is a byte array (0-15 bytes). I get an error on the: &3 (hex part). When I use something like &HFF00 it doesn't give me an error.
Any thoughts???
Bebandit![]()
![]()
![]()
![]()
![]()
![]()




Reply With Quote