Binary | Hexadecimal | Decimal |
---|---|---|
0000 0000 | 00 | 000 |
1111 1111 | FF | 255 |
Positive number range.
Binary | Hexadecimal | Decimal |
---|---|---|
0000 0000 | 00 | 000 |
0111 1111 | 7F | 127 |
Negative number range.
Binary | Hexadecimal | Decimal |
---|---|---|
1111 1111 | FF | -1 |
1000 0000 | 80 | -128 |
In decimal numbers, the thousands column has a weighting of 10^{3} (i.e. 10^{3} = 1000).
In binary numbers the column weightings are base on powers of 2, not powers of 10, so there is no true equivalent "thousands column"" in a binary number.
Consider the powers of 2 shown below.
2^{9} equals 512 decimal.
2^{10} equals 1024 decimal.
From above we can see that the closest binary column weighting to 10^{3} is 2^{10}.
For this reason 2^{10} is regarded as a "computer" thousand.
2^{10} in binary is 100 0000 0000 and is equal to 1024 in decimal.
For similar reasons a "computer" million is 2^{20} (1,048,576) rather than 10^{6} (1,000,000) and a "computer" billion is 2^{30} (1,073,741,824) rather than 10^{9} (1,000,000,000).
This can be confusing, particularly when decimal prefixes are used. e.g. A decimal thousand (1,000) and a computer thousand (1024) can both be written as 1k! (The same is true for 1M and 1G etc.)
This confusion is not made any easier, by the fact, that even within the computer systems field, we do not exclusively use computer thousands and millions etc. . e.g. When referring to say a kilobyte of memory, we almost certainly will mean 1024 bytes. However when referring to hard disk storage space, the industry standard meaning for Megabyte, is 1,000,000 bytes!
The options are summarised in the tables below.
Decimal Name |
Prefix | Symbol |
Binary Power |
Binary Value |
Decimal Equivalent |
Decimal Power |
Decimal Value |
---|---|---|---|---|---|---|---|
Thousand | Kilo | k | 2^{10} | 100 0000 0000 | 1024 | 10^{3} | 1,000 |
Million | Mega | M | 2^{20} |
1 0000 0000 0000 0000 0000 | 1,048,576 | 10^{6} | 1,000,000 |
Billion | Giga | G | 2^{30} |
100 0000 0000 0000 0000 0000 0000 0000 | 1,073,741,824 | 10^{9} | 1,000,000,000 |
When we use numbers to assign addresses for memory locations etc., we start by using 0 for the first address. Therefore, the total number of locations that we can address, is always 1 + the highest number we can write, with the number of digits available.
e.g. With an 8 bit binary number, the largest value we can write is 1111 1111, which is 255 in decimal. Therefore, we can write 256 different addresses (i.e. 255 (1 - 255), plus we can use 0 for the first location.