We can use a two-dimensional data array to define an image.
Think about the pixels in a digital photograph.
The greater the number of pixels, the larger the file size, but higher the image quality.
Task: Spreadsheet Binary Grid
Can you see how the numbers are converted into the patterns of black and
white blocks, using binary? If you
can see the link between the number and the pattern, then think about how the
web page works - maybe you could create something similar in a
spreadsheet application?
Task: Adding colour
The system described so far is fine for black and white images, but most images need to use colours as well. Instead of using just 0 and 1, using four possible
numbers will allow an image to use four colours. In binary this can be represented using two bits per pixel:
00 – white
01 – blue
10 – green
11 – red
Create a new grid that uses 2 bit values to give 4 colours like the one below
Extension Task: Adding more colour
While this is still not a very large range of colours, adding another binary digit will double the number of colours that are available:
1 bit per pixel (0 or 1): two possible colours
2 bits per pixel (00 to 11): four possible colours
3 bits per pixel (000 to 111): eight possible colours
4 bits per pixel (0000 – 1111): 16 possible colours
Can you make a grid that has more than 4 colours
Just think 16 bits per pixel (0000 0000 0000 0000 – 1111 1111 1111 1111): is over 65 000 possible colours