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 103 (i.e. 103 = 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.
29 equals 512 decimal.
210 equals 1024 decimal.
From above we can see that the closest binary column weighting to 103 is 210.
For this reason 210 is regarded as a "computer" thousand.
210 in binary is 100 0000 0000 and is equal to 1024 in decimal.
For similar reasons a "computer" million is 220 (1,048,576) rather than 106 (1,000,000) and a "computer" billion is 230 (1,073,741,824) rather than 109 (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 | 210 | 100 0000 0000 | 1024 | 103 | 1,000 |
Million | Mega | M | 220 |
1 0000 0000 0000 0000 0000 | 1,048,576 | 106 | 1,000,000 |
Billion | Giga | G | 230 |
100 0000 0000 0000 0000 0000 0000 0000 | 1,073,741,824 | 109 | 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.