Digital images are encoded in binary. Students learn about pixels and the way computers store an image as an array of individual pixels, each of which has a particular colour. Students make connections between the amount of data used by the computer to store, transmit and create an image and the file size of different images (generally, the more pixels and more bits to encode the image, the larger the file size).
Flow of Activities
A grid is a simple way of representing picture elements (pixels). Each square can represent a pixel. Creating instructions to shade a grid gives students an understanding of the ways to represent the square: shaded or not shaded (on/off). On/off state is the basis of the binary system.
Students create an image made up of only black and white squares. This task introduces them to how binary numbers are used to represent images.
0 represents black and 1 represents white. One binary digit is a bit. This is an example of colouring 1 bit per pixel; it is either black or white.
There is a direct relationship between the width and height of the image and the number of pixels and image detail.
On a computer screen a colour image is made by mixing red, green and blue (RGB) light. This mix of light can be represented in binary in three digits. For example, (0,0,0) is no red, no green and no blue (making black). White is represented as (1,1,1). This is an example of RGB colouring 3 bits per pixel and results in 8 colours.
Students apply their understanding about how binary is used to create an image. They create their own image for a particular purpose by encoding a grid of pixels.