-
- News
- Books
Featured Books
- design007 Magazine
Latest Issues
Current IssueLevel Up Your Design Skills
This month, our contributors discuss the PCB design classes available at IPC APEX EXPO 2024. As they explain, these courses cover everything from the basics of design through avoiding over-constraining high-speed boards, and so much more!
Opportunities and Challenges
In this issue, our expert contributors discuss the many opportunities and challenges in the PCB design community, and what can be done to grow the numbers of PCB designers—and design instructors.
Embedded Design Techniques
Our expert contributors provide the knowledge this month that designers need to be aware of to make intelligent, educated decisions about embedded design. Many design and manufacturing hurdles can trip up designers who are new to this technology.
- Articles
- Columns
Search Console
- Links
- Events
||| MENU - design007 Magazine
Column: Alternative Number Systems, by Max Maxfield
July 2, 2008 |Estimated reading time: 9 minutes
I don't know about you, but when I started out in the technology arena I hated opening books on electronics to discover the grim words: "Chapter 1: Binary Arithmetic," Irrespective of the book in question, the author would almost invariably (a) bore my socks off and (b) confuse the heck out of me with some rambling explanation that left me wanting to bang my head against the wall to make it stop hurting (grin).
The reason this is sad is that playing with different number systems, including binary, can actually be a lot of fun. So what we're going to do in this column and the next few follow-on articles is to introduce some different number systems and then learn some really interesting things with regard to the binary system we use in computers.
Fingers, Toes, and Pebbles
The first tools used as aids to calculation were almost certainly man's own fingers, and it is not simply a coincidence that the word "digit" is used to refer to a finger (or toe) as well as a numerical quantity. As the need to represent larger numbers grew, early man employed readily available materials for the purpose. Small stones or pebbles could be used to represent larger numbers than fingers and toes and had the added advantage of being able to easily store intermediate results for later use. Thus, it is also no coincidence that the word "calculate" is derived from the Latin word for pebble.
Bones with Notches
The oldest objects known to represent numbers are bones with notches carved into them. These bones, which were discovered in Western Europe, date from the Aurignacian period 20,000 to 30,000 years ago and correspond to the first appearance of Cro-Magnon man. (The term Cro-Magnon comes from caves of the same name in Southern France, in which the first skeletons of this race were discovered in 1868.)
Of special interest is a wolf's jawbone more than 20,000 years old with 55 notches in groups of five, which was discovered in Czechoslovakia in 1937. This is the first evidence of the tally system, which is still used occasionally and could therefore qualify as one of the most enduring of human inventions.
Also of interest is a piece of bone dating from around 8,500 BC, which was discovered in Africa and which appears to have notches representing the prime numbers 11, 13, 17, and 19. Prime numbers are those that are only wholly divisible by the number one and themselves, so it is not surprising that early man would have attributed a special significance to them. What is surprising is that someone of that era had the mathematical sophistication to recognize this quite advanced concept and took the trouble to write it down - not to mention that prime numbers would appear to have had little relevance to the everyday problems of the time such as gathering food and staying alive.
Tally Sticks - The Hidden Dangers
The practice of making marks on, or cutting notches into, things to represent numbers has survived to the present day, especially among school children making tally marks on their desks to signify the days of their captivity. In the not-so-distant past, storekeepers (who often could not read or write) used a similar technique to keep track of their customer's debts. For example, a baker might make cuts across a stick of wood equal to the number of loaves in the shopper's basket. This stick was then split lengthwise, with the baker and the customer keeping half each, so that both could remember how many loaves were owed for and neither of them could cheat.
Similarly, the British government used wooden tally sticks until the early 1780s. These sticks had notches cut into them to record financial transactions and to act as receipts. Over the course of time, these tally sticks were replaced by paper records, which left the cellars of the Houses of Parliament full to the brim with pieces of old wood. Rising to the challenge with the inertia common to governments around the world, Parliament dithered around until 1834 before finally getting around to ordering the destruction of the tally sticks.
There was some discussion about donating the sticks to the poor as firewood; but wiser heads prevailed, pointing out that the sticks actually represented "top secret" government transactions. The fact that the majority of the poor couldn't read or write and often couldn't count was obviously of no great significance, and it was finally decreed that the sticks should be burned in the courtyard of the Houses of Parliament. However, fate is usually more than willing to enter the stage with a pointed jape - gusting winds caused the fire to break out of control and burn the House of Commons to the ground (although they did manage to save the foundations)!
The Abacus
The first actual calculating mechanism known to us is the abacus, which is thought to have been invented by the Babylonians sometime between 1,000 BC and 500 BC (although some pundits are of the opinion that it was actually invented by the Chinese).
The word "abacus" comes to us by way of Latin as a mutation of the Greek word "abax." In turn, the Greeks may have adopted the Phoenician word "abak," meaning "sand," although some authorities lean toward the Hebrew word "abhaq," meaning "dust." Irrespective of the source, the original concept referred to a flat stone covered with sand (or dust) into which numeric symbols were drawn. The first abacus was almost certainly based on such a stone, with pebbles being placed on lines drawn in the sand.
Over time, the stone was replaced by a wooden frame supporting thin sticks, braided hair, or leather thongs, onto which clay beads or pebbles with holes were threaded. A variety of different types of abacus were developed, but the most popular became those based on the bi-quinary system, which utilizes a combination of two bases (base-2 and base-5) to represent decimal numbers. Although the abacus does not qualify as a mechanical calculator, it certainly stands proud as one of the first mechanical aids to calculation.
Roman Numerals
In the next topic we're going to introduce the concept of place-value number systems. In order to understand why these are so efficacious, let's first briefly consider the concept of Roman numerals, in which I = 1, V = 5, X = 10, L = 50, C = 100, D = 500, M = 1,000, and so forth.
Using this scheme, XXXV represents 35 (three tens and a five). One problem with this type of number system is that over time, as a civilization develops, it tends to become necessary to represent larger and larger quantities. This means that mathematicians either have to keep on inventing new symbols or start using lots and lots of their old ones. But the biggest disadvantage of this approach is that it's painfully difficult to work with (try multiplying CLXXX by DDCV and it won't take you long to discover what I mean).
Actually, it's easy for us to rest on our laurels and smugly criticize ideas of the past with the benefit of hindsight - the one exact science. In fact, Roman numerals were used extensively in England until the middle of the 17th century, and are still used to some extent to this day; for example, the copyright notice on films and television programs often indicates the year in Roman numerals!
Decimal, or Base-10
The commonly used decimal numbering system is based on ten digits: 0, 1, 2, 3, 4, 5, 6, 7, 8 and 9. The name decimal comes from the Latin "decem," meaning "ten." The symbols used to represent these digits arrived in Europe around the 13th century courtesy of the Arabs, who in turn borrowed them from the Hindus (and never gave them back). As the decimal system is based on 10 digits, it is said to be base-10 or radix-10, where the term "radix" comes from the Latin word meaning "root."
With the exception of specialist requirements such as computing, base-10 numbering systems have been adopted almost universally - this is almost certainly due to the fact that humans happen to have ten fingers (including thumbs). If mother nature had dictated six or eight fingers on each hand, for example, the outcome would most probably have been the common usage of base-12 or base-16 numbering systems, respectively (see also the discussions on the Duo-Decimal and Hexadecimal systems later in this mini-series of articles).
The decimal system is a place-value system, which means that the value of a particular digit depends both on the digit itself and its position within the number. Every column in a place-value number has a "weight" associated with it, and each digit is combined with its column's weight to determine the final value of the number. For example, consider a number like 5555. The right-most digit is in the "ones" column and therefore represents 5; the next digit is in the tens column and therefore represents 50; the next is in the hundreds column and represents 500, and so forth.
Counting in Decimal
We're so used to counting in decimal that we really don't think about it at all, but it's useful to pause for a moment to remind ourselves how this goes, because will be using similar techniques with other systems in future articles.
When counting in decimal, we commence at 0 and progress up to 9, at which point all of the available digits have been used. Thus, the next count causes the first column to be reset to 0 and the second column to be incremented, resulting in 10. Similarly, when the count reaches 99, the next count causes the first column to be reset to zero and the second column to be incremented. However, since the second column already contains a 9, this causes it to be reset to 0 and the third column to be incremented resulting in 100.
Next time...
Although base-10 systems are anatomically convenient, they have few other advantages to recommend them. In fact, depending on your point of view, almost any other base (with the possible exception of nine) would be as good as, or better than, base-10, which is only wholly divisible by 2 and 5.
For many arithmetic operations, the use of a base that is wholly divisible by many numbers, especially the smaller values, conveys certain advantages. An educated layman may well prefer a base-12 system on the basis that 12 is wholly divisible by 2, 3, 4 and 6. For their own esoteric purposes, some mathematicians would ideally prefer a system with a prime number as a base; for example, seven or eleven.
In my next article, we'll start to consider other number systems, including Quinary (Base Five), Duo-Decimal (Base-12), Vigesimal (Base-20), and Sexagesimal (Base-60). At some stage, if we're lucky, we may even come to consider Binary (Base-2).
AcknowledgementsThis article was abstracted from Bebop to the Boolean Boogie (An Unconventional Guide to Electronics) with the kind permission of the publisher.About the author
Clive "Max" Maxfield is president of TechBites Interactive, a marketing consultancy firm specializing in high technology. Max is the author and co-author of a number of books, including Bebop to the Boolean Boogie (An Unconventional Guide to Electronics), The Design Warrior's Guide to FPGAs (Devices, Tools, and Flows), How Computers Do Math featuring the pedagogical and phantasmagorical virtual DIY Calculator.
In addition to being a hero, trendsetter, and leader of fashion, Max is widely regarded as being an expert in all aspects of computing and electronics (at least by his mother). Max was once referred to as "an industry notable" and a "semiconductor design expert" by someone famous who wasn't prompted, coerced, or remunerated in any way. Max can be contacted at max@techbites.com.