For this course you need to be able to convert between the following powers of two and their hexadecimal/decimal equivalents fluently. That is, you should not have to do any calculations, even in your head, to go from one to the other.
Power of Two | Binary | Hexadecimal | Decimal Value |
---|---|---|---|
20 | 0001 | 1 | 1 |
21 | 0010 | 2 | 2 |
22 | 0100 | 4 | 4 |
23 | 1000 | 8 | 8 |
24 | 0001 0000 | 10 | 16 |
25 | 0010 0000 | 20 | 32 |
26 | 0100 0000 | 40 | 64 |
27 | 1000 0000 | 80 | 128 |
28 | 0001 0000 0000 | 100 | 256 |
29 | 0010 0000 0000 | 200 | 512 |
210 | 0100 0000 0000 | 400 | 1,024 |
Power of Two | Binary | Decimal Value | Name | Prefix |
---|---|---|---|---|
210 | 0100 0000 0000 | 1,024 | Thousand | Kilo |
220 | 0001 0000 0000 0000 0000 0000 | 1,048,576 | Million | Mega |
230 | 0100 0000 0000 0000 0000 0000 0000 0000 | 1,073,741,824 | Billion | Giga |
240 | 0001 ... (40 zeros) | 1,099,511,627,776 | Trillion | Tera |
250 | 0001 ... (50 zeros) | 1,125,899,906,842,624 | Quadrillion | Peta |
Be sure to look at the Units of Measure web page for information about an alternate set of names for the prefixes listed here.
With these two tables in mind, you can easily construct large binary numbers by remembering that you add exponents when multiplying numbers with the same base. For example, a 256 Megabyte memory has 28 * 220 = 228 bytes. In binary, that would be a one followed by 28 zeros.
A number with a negative exponent is the reciprocal of the corresponding number with a positive exponent. It's not so important to memorize these values as the positive ones, but it is important to understand the pattern.
Power of Two | Binary | Power of Sixteen | Hexadecimal | Decimal Value |
---|---|---|---|---|
2-1 | 0.1000 | 8 * 16-1 | 0.8 | 0.500 |
2-2 | 0.0100 | 4 * 16-1 | 0.4 | 0.250 |
2-3 | 0.0010 | 2 * 16-1 | 0.2 | 0.125 |
2-4 | 0.0001 | 1 * 16-1 | 0.1 | 0.062,500 |
2-5 | 0.0000 1000 | 8 * 16-2 | 0.08 | 0.031,250 |
2-6 | 0.0000 0100 | 4 * 16-2 | 0.04 | 0.015,625 |
2-7 | 0.0000 0010 | 2 * 16-2 | 0.02 | 0.007,812,500 |
2-8 | 0.0000 0001 | 1 * 16-2 | 0.01 | 0.003,906,250 |
2-9 | 0.0000 0000 1000 | 8 * 16-3 | 0.008 | 0.001,953,125 |
Also see the Units of Measure web page.