HAM6 encoding uses six bits per pixel: two bits for control and four bits for data. If the two control bits are both set to zero, the four remaining bits are used to index one of the 16 preset color registers, operating in the fashion of a normal indexed bitmap. The other three possible control bit patterns indicate that the color of the previous pixel (to the left) on the scanline should be used and the data bits should instead be used to modify the value of the red, green or blue component. Consequently, there are four possibilities: