The Watering Hole: September 22 – Decimal Addition in a Binary World

Computers in general are best at adding binary values. Logic designers have relied on the hexadecimal numbering system in order to keep the task to an understandable notation. One limitation introduced by this solution is that a simple hexadecimal add of two decimal values in the range of 0-9 can result in solutions that have no valid decimal value. Let’s look at decimal addition in the hexadecimal system:

A Hexadecimal Addition Table Restricted to Addend Values 0 Through 9

Now one of the things that you may notice about this table are the result values of A, B, C, D, E and F. These representations are used in want of any other in order to represent the binary numbers from 1010 – 1111. Alphabetic values were chosen because they appear in the Roman Alphabet which was familiar to the scientists at the forefront of digital computer design. I shutter to think what would have happened if Israel had been there first, I may well have taken up a different career path. You might also notice that the results of 10, 11 and 12 are actually not correct for a decimal add.

This leaves the problem of how to create a set of solutions compatible with decimal users like accountants and politicians. Conversion tables could be used to convert each result to its true decimal value. The results reading 10, 11 and 12 are short of their true decimal values of 16, 17 and 18 respectively.  Sometime in an obscure past, someone observed that each of these values fell short of their decimal values by a numeric value of 6 via a hexadecimal add yielded the correct decimal target value. A hexadecimal add of 6 to A through F, yields the correct decimal targets of 10-15 as well, thus a rule was born – if two decimal numbers are added and the result of that add exceeds A, then add 6 to that result and set a carry for the next higher-order digit. This is called excess 6 arithmetic, the basis of early decimal addition in digital computers.

This is our open thread. Please feel free to offer your own comments on this or any other topic.