Mouse pointers and icons are made up of bit maps that the operating system uses to paint images of the pointers or icons on the screen. A monochrome bit map is a series of bytes. Each bit corresponds to a single pel in the image. (The bit map representing the display typically has four bits for each pel.)
A mouse pointer or icon bit map always is twice as tall as it is wide. The top half of the bit map is an AND mask, in which the bits are combined, using the AND operator, with the screen bits where the pointer is being drawn. The lower half of the bit map is an XOR mask, in which the bits are combined, using the XOR operator, with the destination screen bits.
The combination of the AND and XOR masks results in four possible colors in the bit map. The pels of an icon or pointer can be black, white, transparent (the screen color beneath the pel), or inverted (inverting the screen color beneath the pel). The following figure shows the relationship of the bit values in the AND and XOR masks:
AND mask 0 0 1 1 XOR mask 0 1 0 1 Result Black White Transparent Inverted