To start with, understand that numbers can be represented in different ways. If I showed you tally marks like this you know I’d mean the number five.
But, that’s the way to write it in one numeral system1. Simply put, a numeral system is a consistent way to write a number using a certain set of characters (marks, letters, numerals, etc.). The system dictates which characters are used and how they are used to represent a number.
It’s an old one, but consider the Roman numeral system. You’ve probably seen the characters (I, V, X, L, C, etc.) and know that “III” is three and “IV” is four, and so on. This is an example of an earlier system using Roman characters and an additive-notation – that places characters left-to-right – and sums them up. Special rules include a subtractive shortcut so you don’t have to place the same numeral more than three times in a row.
There are several numeral systems out there but the Hindu-Arabic system is almost universally used today. This is the system with characters 0, 1, 2, 3, 4, 5, 6, 7, 8 and 9. It uses a place-value notation. Place-value notation gives a special meaning to the placement of each character. In this Hindu-Arabic system, the right-most numeral is in the ones-place, the next numeral to its left is the tens-place, and so on. Let’s look at a nice number to see how this works:2
The Hindu-Arabic system isn’t the only system to use place-value notation. Binary number systems, hexidecimal, and many others also use it. The concept is generalized using decimal numbers as follows: Starting from right and working left, places are indexed n = 0, 1, 2, 3, 4, 5, etc. The value of each place is the numeral in that place times the base of the number system raised the power of the index n. The base of the number system in this case is ten (10).
Using the same example as above, consider the following representation:
Now, we can think about what the same number might look like in a different base (or numeral system) like binary. The binary numeral system uses, as you know, the two characters – “0” and “1”. The place-value system is also right-to-left – but instead of base 10 to the n-th power, each place is that value times base 2 to the n-th power.
Each one, again, is summed to get the final value. In this case, we sum 1024 + 512 + 256 + 128 + 64 + 16 + 1. I’m writing in base 10 because it is familiar, but did you spot the pattern in base 2? Each place in the binary number is valued 1/2 of the one to its left and double the place to the right (256 is half 128 and double 512).
There are other numeral systems that include different bases or notations. ((See Wikipedia for a list.)) There are often good reasons for working with different bases. For example, computer science uses binary to represent numbers because it is easy to consider 1 as ON and 0 as OFF which could represent the voltage of electricity running through a wire (high V or low V) or the TRUE/FALSE of a logic diagram. When we talk about a computer being 32-bit or 64-bit, we are talking about the architecture of the system – how many binary digits (bits) the system uses to represent integers.
Can you determine the largest integer a 32-bit machine can represent? Hint: represent a number in binary notation above with 32 places filled by ones.3
In summary, the number one-thousand nine-hundred and sixty-nine is written in decimal as “1969”, but written in binary as “011111010001” (or you can leave off the leading 0). I hope this was helpful. If you like this article, please share it. If you would like me to explain something else4, shoot me a message.
For more reading, see the Wikipedia article on Numeral Systems.
unary, if you must know. ↩
This is the year man first stepped on the moon, the year of the Summer, the year of my birth. ↩
Comp sci folks please give me some slack. We’re going for conceptual understanding, not accuracy. Yes, I know the difference between signed and unsigned integers changes the answer to the question. Let’s keep it simple for pedagogical reasons. ↩
especially something related to math, computer science, AI, machine learning, etc. ↩