Binary
While we normally use decimal counting systems, computers use binary. We tend to assume that there is only decimal until we start to explore computers a little further. But there are other counting systems in use today and others have been used in the past.
Base Values
The base value of a number system is the number of different values the set has before repeating itself. For example, decimal has a base of ten values, 0 to 9. The more important systems are in bold.
- Binary = 2 (0, 1)
- Octal = 8 (0 - 7)
- Decimal = 10 (0 - 9)
- Duodecimal = 12 (used for some purposes by the Romans)
- Hexadecimal = 16 (0 - 9, A-F)
- Vigesimal = 20 (used by the Mayans)
- Sexagesimal = 60 (used by the Babylonians)
Bits and Bytes
A single binary digit is called a bit. It can have a value of either 0 or 1. In other words, two possible values. This is similar to decimal which uses the digits 0-9 (10 possible values).
Since one binary digit (a bit) is not much use by itself, we tend to use bits in groups of 8, called bytes. Each bit in a group of 8 bytes is allocated a value according to the same rules as are used with all number systems.
In decimal the place values are 1, 10, 100, 1000 etc. In binary we have place values for 1, 2, 4, 8, 16 etc up to 128 at the leftmost position in the byte. Each byte, as it has only 8 bits, can hold a maximum value (in decimal) up to 255. To see a chart of decimal to byte values click here.
A table of place values is here:
Place values in decimal, binary and hexadecimal
Units
Decimal: 10000000 1000000 100000 10000 1000 100 10 1
Units
Binary: 128 64 32 16 8 4 2 1
Units
Hexadecimal: 268435456 16777216 1048576 65536 4096 256 16 01
| Place values in decimal, binary and hexadecimal | ||||||||
| Units | ||||||||
| Decimal: | 10000000 | 1000000 | 100000 | 10000 | 1000 | 100 | 10 | 1 |
| Units | ||||||||
| Binary: | 128 | 64 | 32 | 16 | 8 | 4 | 2 | 1 |
| Units | ||||||||
| Hexadecimal: | 268435456 | 16777216 | 1048576 | 65536 | 4096 | 256 | 16 | 01 |