in reply to Re: What A Wonderful World: Bitmasks!
in thread What A Wonderful World: Bitmasks!

A bitmaks and binary tests are just the idea of compressing a bunch of small width data (usually booleans, ie 1 bit values) into a byte. So for instance we might use a bit field to represent which external walls of a rectangle in a spreadsheet get colored in and which internal lines get colored in:
Bit 7 : reserved 6 : reserved 5 : inside horiz 4 : inside vert 3 : bottom 2 : top 1 : right 0 : left
So a value of 255 corresponds to all sides being colored in. A value of 3 means just the left and right, a value of 5 is the top and left etc...

--- demerphq
my friends call me, usually because I'm late....