Bitwise operation & masks
assuming VarA = %11110000
If i want to set a single bit, say Bit0, I can do it like
VarA.0=1
OR doing it with mask
VarA = VarA | %00000001
If you want to clear a bit, says bit 7, then you use
VarA.7=0
OR
VarA = VarA & %01111111
If I want to READ a single bit, say bit 2, then, I can use
AnotherVar = VarA.2
Bookmarks