On a grayscale monitor, each pixel can accept from 1 to 8 bits of data, which will show from 1 to 256 shades of gray.
If there are 2 bits per pixel, there are four possible combinations of on and off: on/on, off/off, on/off, and off/on. Each of these combinations displays a different shade of gray (including black and white).
If there are 4 bits per pixel (24), you will have 16 levels of gray
If there are 8 bits per pixel, there are 256 possible combinations (28). This is the maximum number of grays possible on any grayscale monitor, which is plenty because our eyes can’t distinguish more than that number of grays anyway.