الأسبوع 3 · الوحدة ١ «النظم العددية» (٣): التحويل من الثنائي إلى العشري ومن العشري إلى الثنائي · 3 دروس
1
Reading a binary number with place values 1, 2, 4, 8
ICT Secondary 3 Term 1, Unit 1, Topic 1: pp. 14–17
GoalTurn a binary number into a decimal number with place values.
New words
binary number · a number written with only the symbols 0 and 1; its base is 2place value of a bit · what its place is worth: 1, 2, 4, 8, 16 … counted from the rightdecimal equivalent · the same number written in base ten
Explanation
A binary number is written with the symbols 0 and 1, and its base is 2. The places of a decimal number are worth 1, 10, 100 …; the places of a binary number are worth powers of 2, counted from the right starting at 2⁰: 1, 2, 4, 8, 16, 32, 64, 128. To turn a binary number into decimal, multiply each bit by the value of its place and add the results. A bit that is 0 adds nothing, so in practice we add only the place values that stand under a 1. Example: (10110)₂ has five bits, with the place values 16, 8, 4, 2, 1 under them. The 1s are under 16, 4 and 2, so (10110)₂ = 16 + 4 + 2 = 22 in decimal, written (22)₁₀.
Place number
7
6
5
4
3
2
1
0
Power of 2
2⁷
2⁶
2⁵
2⁴
2³
2²
2¹
2⁰
Place value
128
64
32
16
8
4
2
1
Worked examples
Place value
16
8
4
2
1
Bit
1
0
1
1
0
Bit × value
16
0
4
2
0
Read (10110)₂ with a table. Put the bits under their place values, multiply and add: 16 + 0 + 4 + 2 + 0 = 22.
Place value
128
64
32
16
8
4
2
1
Bit
1
1
0
1
1
0
0
0
Bit × value
128
64
0
16
8
0
0
0
Read the byte (11011000)₂. The 1s are under 128, 64, 16 and 8, so the number is 128 + 64 + 16 + 8 = 216 in decimal.
Class activity
Write the place values 1, 2, 4, 8, 16, 32 from the right on a strip of paper. Invent three binary numbers of up to six bits and turn each into decimal. Check one of them by adding only the place values that stand under the 1s.