How to calculate bytes need for an image with 256 level gray scale

When the size of a still image is 1,600 x 1,200 pixels and each pixel has a 256-level gray scale ranging from 0 to 255, approximately how many megabytes are needed at least to store five such still images?

If the question said : a 1600x1200 pixel, each pixel has 24 bit color, the result will be : 1600*1200*24

but I have no iead what this mean : 256-level gray scale ranging from 0 to 255


8 bits of data gives you 256 different storage combinations because 256 is 2^8 which means 8 bits of data, with each bit having 2 possible values, will give you 256 possible combinations that the 8 bits as whole can be in. This means you can distinguish between 256 different levels of grey in each pixel if you use 8 bits of data per pixel. 24 bits of data per pixel means you can give 2^24 different values of color or 16.7 million colors. This usually equates to 8 bits of value per Red, Green, and Blue colors giving you 16.7 million possible color combinations.

In retrospect you could also have 256 values of color (instead of grey) as well; For this they had 3 bits (8 color levels) for red, 3 bits for green, and 2 bits (4 color levels) for blue for a total of 8 bits as well but in color instead of grey.

To calculate the size you would multiply the the number of total pixels to get the total number of bits needed to store the images. This is (5*1,600*1,200*24)=230,400,000 bits. Divide by 8 to get bytes; 230,400,000/8 = 28,800,000. Divide by 1,024,000 to get megabyte; 28,800,000/1,024,000 = 28.13 MB. This is the total number of MB your would need to store the raw data for the images you decribe.

If you add in file headers and exif data, you usually will see a larger file than just the image alone and of course, compression would alter the value as well.

Maybe this was a bit overkill.