Difference between revisions of "Bitmask"

From veswiki
Jump to: navigation, search
m (1 revision)
(No difference)

Latest revision as of 21:22, 16 November 2012

A bitmask is a binary number which masks another to retrieve or to delete information. For example, a bitmask of %00001110 AND'd to a number with the value %10110011 would retrieve %00000010. Bitmasks can be used to extract small packets of data from a byte, to round a number to the nearest power of two, or see if two bytes are equal.