Binarycode week6
-
Upload
wendy-fasso -
Category
Education
-
view
161 -
download
1
Transcript of Binarycode week6
Representing data as images (F-2)
An engaging way to introduce your students to digital images is to use a colour by number
activity.Each little block on the page (later we will call these pixels)
has a code for a particular colour. In our case here it is a number. Later you will explain that we can give it a binary
number instead.
http://www.scoop.it/t/coloring-squared
Representing data (F-2) –Paint is useful!
Here we have two baby photos (on the left). The first two do not look very different. But they have different resolutions. When they are
enlarged, you can see that the high resolution photo is not pixelated, whereas you can clearly see the individual patches of colour (pixels) in
the enlargement on the left. If we have to define the colour of each patch in the image, clearly the image on the left requires a lot more information. Thus, the file size will be large. If we only wanted small
images, we would be best to choose the lowest possible file size so the image can upload easily.
Change the By: to Pixels, and reduce the number of pixels.
Your image will become more and more pixelated.
Save a file with 24x24 pixels, and one with 150x 150 pixels (or thereabouts).
Can you see the difference in file size?
Extra for experts
Colours are defined using amounts of red, green and blue in combination - RGB.
Draw a text box in PowerPoint.
Go to Shape fill, select More Colours.
Go to Custom.
Can you see the RGB combinations of each colour?
Binary colours
If Red is 255 it is VERY, VERY red!!!
If Green is 120 it is average green
If Blue is 0 there it is NO blue
So edit your colour of your text box so that RGB = 79 79 20
Back to Binary 128 64 32 16 8 4 2 1
1 1 1 1 1 1 1 1
What would this binary number be?1 x 128 + 1 x 64 + 1 x 32 + 1 x 16 + 1 x 8 + 1 x 4 + 1 x 2 + 1 x 1 = ??????Yes! You get 255. The same value of a VERY red, or VERY blue, or VERY green colour. This is because each colour is represented using a byte of information. We have learned earlier that 255 is the maximum value of a byte of information.
Is it all becoming clearer now?While we say full red is 255 (decimal value), it is 11111111 (binary value).
http://neverwintervault.org/project/nwn1/other/tool/goth-girls-color-tag-creator-v2-carcerians-color-code-mini-tutorial
255 255 0 0 255 255
255 0 255
But hang on. Printer cartridges only come in yellow, cyan and magenta!!! How does that work? See if you can work it out using the image below.