Top Banner
Digital Technology Data representation
14

Binarycode week6

Apr 15, 2017

Download

Education

Wendy Fasso
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Binarycode week6

Digital TechnologyData representation

Page 2: 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

Page 3: Binarycode week6

Representing data (F-2)

http://www.scoop.it/t/coloring-squared

Page 4: Binarycode week6

Representing data (F-2) –Paint is useful!

Page 5: Binarycode week6

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.

Page 6: Binarycode week6

Using Paint to explore images

Open an image using Paint.

Open the Resize tool from the menu.

Page 7: Binarycode week6

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?

Page 8: Binarycode week6

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?

Page 9: Binarycode week6

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

Page 10: Binarycode week6

… and you get?

Page 11: Binarycode week6

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).

Page 12: Binarycode week6

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.

Page 13: Binarycode week6

Colour Printing

A colour chart of RGB values is shown on the next page for interest.

Page 14: Binarycode week6