3.2.3 Performing Operations

For some basic operations in other bases, sometimes it is simpler to convert all numbers to base-10, perform the operations, then convert back to base-n. Let’s look at an example where I would employ this technique:

234×34+124=11×3+6=39=213423_4 \times 3_4 + 12_4 = 11 \times 3 + 6 = 39 = 213_4

However, when numbers are larger, this might not be the case, so let’s look at the most popular operations on the number sense test which are addition (and subsequently subtraction) and multiplication (division is usually not tested, so I will exclude explaining this operation).

Addition:

For addition of two integers in base-10 we sum the digits one at a time writing down the answer digit (090 - 9) and carrying when necessary. Other base-n work in the same manner with the only difference being the answer digits range from 0 to (n1n - 1). Let’s look at an example:

1246+536=124_6 + 53_6 =

  • First Digit: 46+361164_6 + 3_6 \Rightarrow 11_6
  • Second Digit: 56+26+161265_6 + 2_6 + 1_6 \Rightarrow 12_6
  • Third Digit: 16+16261_6 + 1_6 \Rightarrow 2_6
  • Answer: 2216221_6

Subtraction:

Subtraction works in a similar method, only the concept of “borrowing” when you can’t subtract the digits is slightly altered. When you “borrow” in base-10 you lower the digit you are borrowing from and then “add” 10 to the adjacent digit to aid in the subtraction. In a different base-n, you will be borrowing in the same fashion but adding n to the adjacent digit. Let’s look at an example:

1224134=122_4 - 13_4 =

  • First Digit: Since you “can’t” do 232 - 3 you have to borrow (44+24)3434(4_4 + 2_4) - 3_4 \Rightarrow 3_4
  • Second Digit: (2414)1404(2_4 - 1_4) - 1_4 \Rightarrow 0_4
  • Third Digit: 14141_4 \Rightarrow 1_4
  • Answer: 1034103_4

In the above expressions, everything in italics represents the borrowing process. When borrowing from the second digit, you lower it by 1 (seen by the 14-1_4) and then add to the adjacent digit (the first one) 444_4.

Multiplication:

What I like to do for multiplication in a different base is essentially perform the FOILing procedure in base-10 then convert your appropriate result to base-n and apply appropriate carry rules. Let’s look at a couple of examples (one involving carries and the other one not):

139×219=13_9 \times 21_9 =

  • First Digit: 1×3=310391 \times 3 = 3_{10} \Rightarrow 3_9
  • Second Digit: 1×1+2×3=710791 \times 1 + 2 \times 3 = 7_{10} \Rightarrow 7_9
  • Third Digit: 2×1=210292 \times 1 = 2_{10} \Rightarrow 2_9
  • Answer: 2739273_9

The above scenario was simple because no carries were involved and converting those particular single digits from base-10 to base-9 was rather simple. Let’s look at one with carries involved:

459×239=45_9 \times 23_9 =

  • First Digit: 3×5=15101693 \times 5 = 15_{10} \Rightarrow 16_9
  • Second Digit: 3×4+2×5+1=23102593 \times 4 + 2 \times 5 + 1 = 23_{10} \Rightarrow 25_9
  • Third Digit: 2×4+2=10101192 \times 4 + 2 = 10_{10} \Rightarrow 11_9
  • Fourth Digit: 111 \Rightarrow 1
  • Answer: 115691156_9

The above example shows the procedure where you do the FOILing in base-10 then convert that to base-9, write down last digit, carry any remaining digits, repeat procedure. As one can see to perform multiplication in other bases it is important to have changing bases automatic so that the procedure is relatively painless.

To practice the above three operations here are some problems:

Problem Set 3.2.3

112_6 + 4_6 = \\__{6}
53_6 \\times 4_6 = \\__{6}
101_2 - 11_2 = \\__{2}
44_5 \\times 4_5 = \\__{5}
26_9 \\div 6_9 = \\__{9}
37_8 + 56_8 = \\__{8}
88_9 + 82_9 = \\__{9}
100_6 - 44_6 = \\__{6}
104_8 - 47_8 = \\__{8}
143_5 \\div 4_5 = \\__{5}
22_9 - 66_9 = \\__{9}
135_7 \\times 4_7 = \\__{7}
132_4 - 33_4 = \\__{4}
42_5 - 34_5 + 23_5 = \\__{5}
123_5 \\times 4_5 = \\__{5}
33_4 \\times 3_4 - 21_4 = \\__{4}
22_7 \\times 4_7 = \\__{7}
33_6 \\times 3_6 = \\__{6}
22_6 + 33_6 + 44_6 = \\__{6}
44_8 \\times 4_8 = \\__{8}
32_6 \\div 5_6 \\times 4_6 = \\__{6}
24_7 \\div 6_7 + 24_7 = \\__{7}
23_6 + 45_6 - 50_6 = \\__{6}
23_5 \\times 4_5 - 10_5 = \\__{5}
123_4 \\div 3_4 = \\__{4}
431_5 \\div 4_5 = \\__{5}
222_3 \\times 2_3 = \\__{3}
(21_5 - 12_5) \\times 11_5 = \\__{5}
(33_4 + 22_4) \\times 11_4 = \\__{4}
235_6 \\div 5_6 = \\__{6}
543_7 \\div 6_7 = \\__{7}
234_5 + 432_5 = \\__{5}
33_4 \\times 2_4 - 11_4 = \\__{4}
44_5 \\times 2_5 + 33_5 = \\__{5}
(13_5 + 12_5) \\times 11_5 = \\__{5}
11_4 \\times 21_4 - 3_4 = \\__{4}
12_5 + 23_5 + 34_5 = \\__{5}
(22_4 + 33_4) \\times 11_4 = \\__{4}