Alternative number systems are used in computing to simplify the work that the computer has to do to use the values given to it. The most common alternative number systems in computing are
Different number systems can be defined in terms of their base. The decimal system is base 10, basically meaning it has 10 unique digits:
For example, lets take a random number like 2537. You probably learned in elementary school that this number has a ones place, tens place, hundreds place, and thousands place.
| 2 | 5 | 3 | 7 |
|---|---|---|---|
| thousands | hundreds | tens | ones |
| | | | |
| | | | |
You can see if we add up all these places defined in terms of powers of 10 we get our original number:
This can be done with any base, not just 10. To get a number in binary we can use base 2. We also notice there are only 2 unique digits in binary: 1 and 0. In hex there are 16 unique digits.
Binary is the base 2 number system represented using 1s and 0s. See more here: Binary
Hexadecimal is the base 16 number system represented using the digits:
The letters in this system actually represent numerical digits, however since we only have 10 digits mathematicians decided to substitute with letters instead. Here is a table showing the relationship between these letter digits and their decimal values:
| Hex Digit | Decimal Value |
|---|---|
| A | 10 |
| B | 11 |
| C | 12 |
| D | 13 |
| E | 14 |
| F | 15 |
Decimal is the number system we use every day. It is not the correct system but rather just the one that humans happened to decide to use first. There are many theories why, but the most simple one is just that humans have 10 fingers. this made it natural to represent numbers by groups of 10 using 10 unique digits (in fact our fingers are also called digits!).