My mind is still buzzing with what I just saw. How did binary manage to pop up out of nowhere? And why did I not spot the binary connection myself?
I love numbers. I only wish I were better at math. A year or so ago, I read the book Genius at Play: The Curious Mind of John Horton Conway by Siobhan Roberts. I learned a lot of stuff about a lot of stuff, but the biggest thing I learned was how little I know.
One thing that always amazes me about math is how many ways there are of doing even the simplest things. Take subtraction, for example. Suppose you wished to subtract 3234 from 5628; how would you set about doing this?
As an aside, the number from which another number is to be subtracted is called the minuend from the Latin minuendum, meaning “thing to be diminished.” By comparison, a number that is to be subtracted from another number is called the subtrahend from the Latin subtrahendum, meaning… wait for it… wait for it… “to subtract.” And the result obtained by subtracting one number from another is called the remainder or the difference but we digress…
Let’s start by looking at three of the topics that were discussed in excruciating detail in How Computers Do Math, which was penned by yours truly and my chum Alvin Brown: The American Borrow, The English Borrow, and Nines Complement Subtraction.
Subtraction Using the American Borrow
If you went to school in America, you probably use a technique I call the “American Borrow.” We start with the least-significant digit (LSD) and work our way up to the most-significant digit (MSD). So, commencing with the ones column (a), we subtract 4 from 8 to leave a remainder of 4. No surprises there.
The tricky part in this example occurs when we arrive at the tens column (b). We start by wanting to subtract 3 from 2, but 3 is bigger than 2, so we borrow 1 from the hundreds column. This means that we subtract 1 from the 6 in the hundreds column of the minuend leaving 5; and then we use our borrowed 1 to augment the 2 in the tens column of the minuend to form 12. Thus, our tens column now requires us to subtract 3 from 12 leaving 9.
When we reach the hundreds column (c), instead of subtracting 2 from 6, we now subtract 2 from 5 leaving 3. Finally, we slide home in the thousands column (d) by subtracting 3 from 5 to leave 2. Thus, the result of the operation 5628 – 3234 is 2394.
“Ho hum,” you might be saying to yourself, “there’s nothing new here.” Well, to be honest, I was a bit surprised when I was first exposed to the American Borrow because I was brought up in England using a technique I now call the “English Borrow.”
Subtraction Using the English Borrow
In this case, when we come to performing our borrow operation, we again augment the 2 in the tens column of the minuend with a 1 borrowed from the hundreds column to form 12. However, rather than subtracting 1 from the 6 in the hundred’s column of the minuend to leave 5, we instead add 1 to the 2 in the hundreds column of the subtrahend to give 3. Thus, when we come to the hundreds column, we now perform the operation 6 – 3 = 3 (as opposed to 5 – 2 = 3 using the American technique).
The end result is the same, of course, because we’d be in something of a pickle if performing a simple math operation such as an integer subtraction gave conflicting results on the opposite sides of the Atlantic Ocean. The advantage of the American scheme is that it’s more intuitive when it comes to visualizing where the “borrow” comes from; the disadvantage comes in the form of the special case that occurs should you have to borrow (subtract 1) from the next column when that column contains a 0. By comparison, the English approach is slightly less intuitive, but there are no special cases.
I bet you are thinking this is easy. Well, just to humor me, quickly perform the operation 74,654,008 – 13,995,623 = ? on a piece of paper. If you are used to working with the American approach, then try using the English technique, and vice versa.
Subtraction Using a Nines Complement
Every number system has something called a radix complement and a diminished radix complement associated with it, where the term “radix” refers to the base of that number system. With regards to the decimal (base-10) system, its radix complement is also known as the tens complement, while its diminished radix complement is referred to as the nines complement.
In the dim and distant past, the vast majority of people weren’t as familiar with math as we are today. Things like performing subtraction using borrows was quite tricky for a lot of folks, so they came up with alternative techniques, one of which was nines complement subtraction.
Let’s consider our original decimal subtraction (5628 – 3234) performed using the nines complement technique. The first step is to generate our nines complement value, which we achieve by subtracting our original subtrahend (3234) from 9999 (a).
Next, we add our nines complement value (6765) to our original minuend (5628) to generate an intermediate result of 12393 (b). Finally, we perform an end-around-carry operation, which involves taking the most significant ‘1’ from our intermediate result, moving it into the units (ones) column under that result, and adding it to what remains of the intermediate result to generate the final result of 2394 (c).
Although it involves a bit of faffing about, the big advantage of the nines complement technique is that it’s never necessary to perform a borrow operation.
Russian and Ancient Egyptian Multiplication
The reason I’m waffling on about all of this here is that there are similarly cunning tricks for all sorts of mathematical operations. For example, my chum Jay Dowling just send me a link to this Numberphile video in which English television personality and popularizer of mathematics, Johnny Ball, elucidates, explicates, and expounds on the topics of Russian and Ancient Egyptian multiplication.
This is a bit like an onion or — perhaps more appropriately — a set of Russian Matryoshka dolls (also known as Babushka dolls, and Nesting dolls), because new things are revealed as we delve deeper, layer by layer.
My mind is still buzzing with what I just saw. How did binary manage to pop up out of nowhere? Why did I not spot the binary connection myself? Do these jeans make me look fat? As always, what are your thoughts on all this?