Now we have learnt all about what data *is*, we can look at how the computers let us silly humans see the data. Now, we know that we don't all see it like in the Matrix
...although I reckon it'd be kinda cool if we did!
(NOTE!! The Matrix is a movie... it really has nothing to do with this lesson, but I always love that idea of people being able to "see" data in a different way to everyone else.)
So, how do we really "see" data in the real world?
We have learnt that it is simply a bunch of zeroes and ones, and some of us will remember the evolution of the computer... and how much better the screens of today look, and can guess at how much better it's getting, with Virtual Reality (VR) and Augmented Reality (AR) already fast becoming commonplace.
So, just how does those zeroes and ones become pictures?
First things first, let's remind ourselves of a bit of digital technologies terminology.
bit = a singular unit of information expressed as either a 0 or 1 in binary notation.
pixel = a minute area of illumination on a display screen
resolution = a measure used to describe the sharpness and clarity of an image or picture and is often used as a metric for judging the quality of monitors, printers, digital images
We are going to look at 1-bit and 2-bit visual representation in some offline activities, and then I will give you some links to some online activities to re-look at 1-bit, 2-bit and also 3-bit.
With 1-bit representation, the bit is 'on' or 'off. So if we imagine our screens are a grid where each square (pixel) is either on or off... you quickly realise that you can only represent black and white pictures.
Also, you quickly realise, the smaller the squares in your grid (or if you think of your screen being one size, the more squares you have - or the higher the resolution) the prettier and sharper the resulting picture will be. As we have learnt how to convert from binary (base-2) to hexadecimal in groups of 4 (or nibbles), we will do a grid of 8 across.
If we colour in a square (or pixel) on the grid, we will consider it "on" or equivalent to a "1", and if you leave it uncoloured, it is "off" or equivalent to a "0"
So this wee heart is basically a bunch of code, on and off.
You can see the first line of the grid is completely off. There are no squares coloured in at all. It is the same on the bottom two lines. So those three lines are 00000000 or in hex 00. Whereas the second line down is 01000010 or 42 which is
Now that we've learnt about how 1-bit representation gives us a black and white picture. How many colours do you think 2-bit representation will give us?
If you answered 4 colours, you are right!
Each pixel is now represented by TWO bits, and there are FOUR combinations of 1's and 0's you can have when you have TWO bits. They are:
00
01
10
11
If we give each of these an arbitrary colour, then you can have FOUR colours to paint with
00 = black
01 = red
10 = yellow
11 = green
Just like with the 1-bit activity, we have given you a worksheet (see below, it is called Data Representation (2-bit) - Worksheet) and just like with the 1-bit activity you will find five sheets in the file. You can do the activity going from code to picture, from picture to code, and we've included answer sheets and a blank sheet for you as well.
Khan Academy also has some awesome online resources if you have access to devices for your students.