☰ Contents · Computing

Converting between number systems

Lessons 7–8 · 2 lessons · B. Boltayev, M. Mahkamov, A. Azamatov, S. Rahmonqulova. Informatics and Information Technologies, Grade 7. Revised and expanded third edition. “O‘zbekiston milliy ensiklopediyasi” State Scientific Publishing House, Tashkent, 2017
8

Practical lesson

Textbook: p. 35
GoalIndependently converts numbers between number systems, uses the bridge method and triads and tetrads, and checks results by converting back.
New words
bridge method: converting through the decimal system · ko‘prik usuligrouping: splitting binary digits into threes or fours · guruhlashhexadecimal: the base-16 system · o‘n oltilikcheck by converting back · teskari tekshirish
Explanation

In this practical lesson the three methods are used together. First question: are the bases 2, 4, 8, 16? If so, grouping through binary is the shortest way. Otherwise use the bridge method: convert the given number to decimal (by expanded form), then from decimal to the required base (by division). When grouping, split a binary number in threes or fours from the right; if the left group is short, add zeros on the left: 11011 = 011 011 → 33₈. Converting back is the most reliable check. In hexadecimal, do not forget to write remainders above 9 as letters.

Worked examples
300 → base 5: 300 : 5 = 60 (0); 60 : 5 = 12 (0); 12 : 5 = 2 (2); last quotient 2. Bottom to top: 2, 2, 0, 0 → 2200₅.
110101111₂ → hexadecimal: groups of four from the right: 0001 1010 1111 → 1, A, F, i.e. 1AF₁₆.
Class activity

“Market of systems”: each team gets five cards with numbers in different bases; to put them in increasing order everything must be converted to decimal. The fastest correct team wins.

Practice
1
Convert 2431₅ to decimal.
2
Convert 1000 to hexadecimal.
3
Convert 3402₅ to base 3 by the bridge method.
4
Add 1101₂ and 101₂ and write the result in octal.