SLIDE 6 3.21
Powers of 2
20 = 1 21 = 2 22 = 4 23 = 8 24 = 16 25 = 32 26 = 64 27 = 128 28 = 256 29 = 512 210 = 1024
512 256 128 64 32 16 8 4 2 1 1024
3.22
Unique Combinations
- Given n digits of base r, how many unique numbers
can be formed? __
– What is the range? [________]
Main Point: Given n digits of base r, ___ unique numbers can be made with the range [________]
2-digit, decimal numbers (r=10, n=2) 3-digit, decimal numbers (r=10, n=3) 4-bit, binary numbers (r=2, n=4) 6-bit, binary numbers (r=2, n=6)
0-9 0-9 0-1 0-1 0-1 0-1 3.23
Approximating Large Powers of 2
- Often need to find decimal
approximation of a large powers of 2 like 216, 232, etc.
- Use following approximations:
– 210 ≈ _________________ – 220 ≈ _________________ – 230 ≈ _________________ – 240 ≈ _________________
- For other powers of 2, decompose
into product of 210 or 220 or 230 and a power of 2 that is less than 210
– 16-bit half word: 64K numbers – 32-bit word: 4G numbers – 64-bit dword: 16 million trillion numbers
216 = 26 * 210 ≈ 224 = 228 = 232 =
3.24
BASE 10 TO BASE 2 OR BASE 16
"Making change"