Bitmasks2006Jul08
Mask (computing) – Wikipedia, the free encyclopedia
The most common mask used, also known as a bitmask, extracts the status of certain bits in a binary string or number. For example, if we have the binary string 100111010 and we want to extract the status of the fifth bit counting along from the most significant bit, we would use a bitmask such as 000010000 and use the bitwise AND operator. Recalling that 1 AND 1 = 1, with 0 otherwise, we find the status of the fifth bit.
Sassy
July 8, 2006 10:49am
we use a bitmask to store permissions on an ACL… works very well. We can aggregate the permissions using bitwise operators to build aggregated permissions for users who have multiple roles in our system.
micheal
July 20, 2006 10:47pm
Bitmasks are always converted to their decimal equivalent prior to entering them and that’s why i like it.