DEV Community

Discussion on: Bitmasks: A very esoteric (and impractical) way of managing booleans

Collapse
 
tomilay profile image
Thomas Nyongesa

I worked with bitmasks(a while back) to write a decoder for GRIB, a binary format for weather data. The utility of a bitmask in this context seems much more obvious. It allows you to extract individual bits from a given byte of data. There is NO other way you can do this because processors do not handle anything under 1 byte.