الأسبوع 2 · الوحدة ١ «النظم العددية» (٢): لماذا يستخدم الكمبيوتر النظام الثنائي، الخانة الثنائية والبايت، عدد الاحتمالات الثنائية · 3 دروس
1
Why computers count with only 0 and 1
ICT Secondary 3 Term 1, Unit 1, Topic 1: pp. 11–13
GoalExplain why a computer needs only two symbols, and how data become 0s and 1s.
New words
binary system · a number system with base 2 and only two symbols, 0 and 1circuit · a path for electric current; in a computer it either carries current or does notmachine language · instructions written as patterns of 0 and 1 that the machine can follow directlydata · facts and signals, such as text, pictures and sound, that a computer stores and uses
Explanation
Everything a computer works with, letters, scanned pictures, recorded sound and video, is first turned into numbers, and the numbers are written with only two symbols. The reason lies in the machine itself. A computer is built from a huge number of tiny electronic circuits, and each one either carries current or does not, like a lamp that is on or off. Two states are easy to build and easy to tell apart, even when a signal is a little weak or noisy; ten states in one circuit would be much harder to tell apart. So one state is written as 1 (on) and the other as 0 (off). Inside the machine they are two different electrical levels, a low one and a high one. A list of instructions written with only 0 and 1 is called machine language, because the machine can follow it directly. We do not say that a computer “understands” 0 and 1; we say it is built to work with two states. The binary system, with base 2 and symbols 0 and 1, is the number system that fits it.
letters, pictures, sound, video→turned into numbers→numbers written with 0 and 1→circuits: on or off
Worked examples
Lamp
1
2
3
4
State
on
off
on
on
Symbol
1
0
1
1
Four lamps in a row are on, off, on, on. Writing on as 1 and off as 0, the row becomes the pattern 1011, four symbols long.
Design
Levels to tell apart
Risk of a reading mistake
Ten levels (0 to 9)
10
higher
Two levels (0 and 1)
2
lower
Why not ten electrical levels, one for each decimal digit? A small disturbance could push a signal from one level to the next, and the machine would read a wrong digit. With only two levels the gap between off and on is wide, so a small disturbance changes nothing.
Class activity
Choose four things at home that have exactly two states, for example a door that is open or closed. Decide which state you write as 1 and which as 0, and write the pattern of all four things at one moment.
Practice
1
Which two symbols does the binary system use?
0 and 1.
2
In the lamp model, what does 1 stand for and what does 0 stand for?
1 stands for on (current flows) and 0 for off (no current).
3
Name three kinds of data that a computer turns into numbers.
For example: letters, pictures, sound, video.
4
Why is it easier to build circuits with two states than with ten?
Two states are easy to tell apart, so small disturbances cause fewer reading mistakes.
5
What is machine language?
Instructions written as patterns of 0 and 1 that the machine can follow directly.