☰ Year plan · Communication Technology

Binary, hex and characters

Week 4 · Chapter 6 Information Design (1): analog and digital, binary and the amount of information, hexadecimal, digital representation of characters · 3 lessons
1

Analog and digital: two ways to hold a quantity

ICT Secondary 1 Term 1, Chapter 6, Lessons 6-1 to 6-4: pp. 53–64
GoalTell analog from digital and use the rule that n bits can show 2ⁿ different values.
New words
analog · a value that changes smoothly, with no separate stepsdigital · a value held in separate steps, such as numbersbit · one binary digit, 0 or 1byte · a group of 8 bits
Explanation

A clock with hands is analog: the hand moves smoothly and can point between two marks. A clock with digits is digital: it shows one separate number at a time. The mercury in an old thermometer rises smoothly (analog); a digital thermometer shows a number such as 36.6. Computers work with digital values because their circuits have two clear states, on and off, and two states are easy to tell apart even when there is noise. We write the two states as 0 and 1. One binary digit is a bit; a group of 8 bits is a byte. How many different values can n bits show? Each extra bit doubles the number: 1 bit gives 2 values, 2 bits give 4, 3 bits give 8, and n bits give 2ⁿ values, from 0 up to 2ⁿ − 1. So 8 bits give 256 values (0 to 255) and 16 bits give 65,536. Sizes are counted in bytes. In storage, we use 1 KB = 1,024 bytes in this lesson. A text of 2,048 characters, one byte each, needs 2,048 bytes = 2 KB.

Bits nDifferent values 2ⁿRange
120 to 1
240 to 3
380 to 7
4160 to 15
82560 to 255
1665,5360 to 65,535
Worked examples
BitsState
00stop
01get ready
10go
11flashing
A toy traffic light can show four states: stop, get ready, go, flashing. How many bits are needed to tell the four states apart? Two bits give 2² = 4 values, so 2 bits are enough; 1 bit would give only 2.
A pupil stores a note of 3,072 characters, one byte each. With 1 KB = 1,024 bytes the note takes 3,072 ÷ 1,024 = 3 KB. A 16-bit counter can count up to 65,535 because it holds 65,536 values starting from 0.
Class activity

List five things around you that are analog and five that are digital (a ruler, a stopwatch, a score board, and so on). For each digital item write what its separate steps are. Then work out by doubling how many values 5 bits can show.

Practice
1
Is a thermometer with a rising red line analog or digital?
2
How many different values can 4 bits show?
3
How many bits make one byte?
4
Why do computers use two states instead of ten?