☰ خطة العام · تكنولوجيا المعلومات والاتصالات (بالإنجليزية)

Binary and decimal numbers

الأسبوع 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 number76543210
Power of 22⁷2⁶2⁵2⁴2³2²2¹2⁰
Place value1286432168421
Worked examples
Place value168421
Bit10110
Bit × value160420
Read (10110)₂ with a table. Put the bits under their place values, multiply and add: 16 + 0 + 4 + 2 + 0 = 22.
Place value1286432168421
Bit11011000
Bit × value128640168000
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.

Practice
1
What is (111)₂ in decimal?
2
What is (1000)₂ in decimal?
3
What is (10010)₂ in decimal?
4
What is (1111)₂ in decimal?