Writing numbers of one system in another system
To convert a number from a system whose base is not 10 into decimal, write it in expanded form and compute the sum: 111010₂ = 1 · 2⁵ + 1 · 2⁴ + 1 · 2³ + 0 · 2² + 1 · 2¹ + 0 · 2⁰ = 32 + 16 + 8 + 2 = 58. To convert a whole decimal number into base p, divide it by p with remainder, divide the quotient by p again, and go on until the quotient is less than p. The last quotient and all the remainders (starting from the last, i.e. from bottom to top) give the digits of the required number: for 100 : 2 the remainders are 0, 0, 1, 0, 0, 1 and the last quotient is 1; read from bottom to top, 1100100. If a remainder is above 9, a letter is written (10 = A, 11 = B, …). When moving between two other systems, the decimal system is a “bridge”: first to decimal, then to the required base. Between systems with bases 2, 4, 8, 16 there is a shortcut: one octal digit matches a group of 3 binary digits (triad), one hexadecimal digit matches a group of 4 (tetrad), and one base-4 digit matches a group of 2 (dyad). For example 3C₁₆ = 0011 1100₂.
| Octal | Binary (triad) |
|---|---|
| 0 | 000 |
| 1 | 001 |
| 2 | 010 |
| 3 | 011 |
| 4 | 100 |
| 5 | 101 |
| 6 | 110 |
| 7 | 111 |
11001000₂ = 128 + 64 + 8 = 200
The buttons flip the bits: 1 means the place value is added, 0 means it is not
To turn 135 minutes into hours we divide by 60: 135 : 60 = 2 with remainder 15, which is 2 hours 15 minutes. Converting a number into another base works the same way: divide and write down the remainder.
A programmer converts numbers to the needed system, an electronics engineer checks signal codes, and a dispatcher splits time into hours and minutes.
Split 125 seconds into minutes and seconds using division with remainder. Then write one sentence on how this resembles converting between bases.
| Division | Remainder |
|---|---|
| 250 : 7 = 35 | 5 |
| 35 : 7 = 5 | 0 |
| last quotient | 5 |
| 7 | 5 | 3 |
|---|---|---|
| 111 | 101 | 011 |
“Chain of remainders”: each team gets a decimal number. Pupils take turns at the board doing one division and writing the remainder; at the end the remainders are read from bottom to top. Teams with the right answer score points.