Data Representation
Data Representation
http://csfieldguide.org.nz/en/interactives/binary-cards/index.html?digits=5&start=BBBBB
201110 - Integrated Mathematics - Data Representation
Binary
11 Representation
Binary Cards
You should have found that any number from 0 to 31 can be represented with 5 cards.
Each of the numbers could be communicated using just two words: black and white.
For example, 22 dots is "white, black, white, white, black"
When we write what is stored in a computer on paper, we normally use “0”
for one of the states, and “1” for the other state.
For example, a piece of computer memory could have the following
voltages:
low low high low high high high high low high low low
We could allocate “0” to “low”, and “1” to “high” and write this sequence
0 0down
1 0 1as:
1 1 1 0 1 0 0
201110 - Integrated Mathematics - Data Representation
12
Base 10 number system
(2561)10
Place 103 102 101 100
Digit 2 5 6 1
Base 10 = (2x103) + (5x102) + (6x101) + (1x100)
= 2000 + 500 + 60 + 1 = 2561 10
http://csfieldguide.org.nz/en/interactives/base-calculator/index.html
23 22 21 20 Its Place
1 1 0 1
= (1 x 8) + (1 x 4) + (0 x 2) + (1 x 1)
= 8+4+0+1
= 13
2 13
2 6 1
Read from
2 3 0
bottom to up
1 1
Answer: 11012
16
Example:
3 bits to specify the amount of red (8 possible values)
3 bits to specify the amount of green (again 8 possible values)
2 bits to specify the amount of blue (4 possible values)
This gives a total of 8 bits (hence the name), which can be
used to make 256 different bit patterns, and thus can
represent 256 different colors.
You may be wondering why blue is represented with fewer
bits than red and green. This is because the human eye is the
least sensitive to blue, and therefore it is the least important
color in the representation.
If space really is an issue, then this crude method of reducing the range of
colors isn't usually used; instead, compression methods such as JPEG, GIF
and PNG are used.
Data compression reduces the amount of space needed to store files.
a highly compressed JPEG image doesn't look as sharp as an image that
hasn't been compressed.
In the data representation section, we looked at how the size of an
image file can be reduced by using fewer bits to describe the color of
each pixel.
However, image compression methods such as JPEG take advantage of
patterns in the image to reduce the space needed to represent it,
without impacting the image unnecessarily.
201110 - Integrated Mathematics - Data Representation
32
Image Compression
http://csfieldguide.org.nz/en/chapters/coding-compression.html
201110 - Integrated Mathematics - Data Representation
33
Video Compression
https://youtu.be/OXz64qCjZ6k
201110 - Integrated Mathematics - Data Representation http://csfieldguide.org.nz/en/interactives/parity/index.html
35
Data Error Detection
https://youtu.be/OXz64qCjZ6k
201110 - Integrated Mathematics - Data Representation
http://csfieldguide.org.nz/en/interactives/parity/index.html
36
References
http://csfieldguide.org.nz/en/chapters/data-
representation.html
http://csfieldguide.org.nz/en/chapters/coding-
compression.html
http://csfieldguide.org.nz/en/chapters/coding-error-
control.html
http://www.history.com/topics/inventions/telegraph