The & is a bitwise operator. The value 128 is 10000000 in binary. If you have an unsigned char that you know is 8 bits, and then you know that the "last" bit is the 8th bit, and so if that is on and everything else is off, the value is 10000000, or 128.

So if you have some set of bits that are on, and you want t check to see if the last bit is on, you use & to combine your set of bits with 10000000. The & returns 1 for a given bit if and only if both sides have a 1 for that bit. So the following are true:

Code:

` 10110001`

& 10101010

-----------

10100000

10110001

& 10000000

-----------

10000000

00110001

& 10000000

-----------

00000000

As you can see by the last two, doing a bitwise & with 10000000 yields 10000000 if the last (leftmost) bit is on, and 00000000 if the last bit is off. Assuming a byte is an unsigned 8 bit integer, that will determine if the bit is set or not.