3.2.4 Changing Between Bases: Special Case

When changing between two bases mm and nn, the standard procedure is to convert the number from base-m to base-10 then convert that into base-n. However, there are special cases when the middle conversion into base-10 is unnecessary: when nn is an integral power of mm (say n=man = m^a, aa an integer) or vice versa. The procedure is relatively simple, take the digits of mm in groups of aa and convert each group into base-n. For example, if we are converting 100100121001001_2 into base-4, you would take 1001001 in groups of two (since 22=42^2 = 4) and converting each group into base-4. Let’s see how it would look:

Convert 100100121001001_2 to base-4

  • First Digit: 0121401_2 \Rightarrow 1_4
  • Second Digit: 1022410_2 \Rightarrow 2_4
  • Third Digit: 0020400_2 \Rightarrow 0_4
  • Fourth Digit: 12141_2 \Rightarrow 1_4
  • Answer: 102141021_4

Let’s look at an example where the converting base is that of the original base cubed (so you would take it in groups of 3):

Convert 1100010112110001011_2 to base-8

  • First Digit: 011238011_2 \Rightarrow 3_8
  • Second Digit: 001218001_2 \Rightarrow 1_8
  • Third Digit: 110268110_2 \Rightarrow 6_8
  • Answer: 6138613_8

Similarly, you can perform the method in reverse. So when converting from base-9 to base-3 you would take each digit in base-9 and convert it to two-digit base-3 representation. For example:

Convert 6439643_9 to base-3

  • First/Second Digits: 391033_9 \Rightarrow 10_3
  • Third/Fourth Digits: 491134_9 \Rightarrow 11_3
  • Fifth/Sixth Digits: 692036_9 \Rightarrow 20_3
  • Answer: 2011103201110_3

Problem Set 3.2.4

46_9 = \\__{3}
48_9 = \\__{3}
1011011_2 = \\__{8}
123_4 = \\__{2}
2122_3 = \\__{9}
345_8 = \\__{2}
123_4 = \\__{2}
101011_2 = \\__{4}
231_4 = \\__{2}
432_8 = \\__{2}
312_4 = \\__{2}
1111_2 = \\__{4}
1011_2 = \\__{4}
123_4 = \\__{2}
11011_2 = \\__{4}