Ch1 Metric Prefixes Bit Questions
Ch1 Metric Prefixes Bit Questions
Bit Questions
Mohammad Ali Javidian
Powers of 2 – Memorize These
• 20 = 1 • 28 = 256
• 21 = 2 • 29 = 512
• 22 = 4 • 210 = 1024
• 23 = 8 • 211 = 2048
• 24 = 16 • 212 = 4096
• 25 = 32 • 213 = 8192
• 26 = 64
• 27 = 128
Metric Prefixes
One byte is equivalent to eight bits. A bit is the smallest unit of data measurement.
A bit can be either 0 or 1.
Converting bits to prefix and vice
versa
• Rules for Exponents:
a) Zero Exponent Rule: ,
b) The Product Rule for Exponents: ,
c) The Quotient Rule for Exponents: ,
d) The Power Rule for Exponents: ,
e) Negative Exponent Rule:
• To convert bits to prefix and vice versa we use the product rule for
exponents as explained in the following examples:
• Example: 22 bits = 35 bits =
• 32K = 8G =
Minimum and Maximum in Binary
and 2's Complement Representation
• What is the smallest value we can express in 8 bits if we use unsigned
numbers? Express in binary?
• 135 mod 2 =
• 3%5=
• Example: Find the least residues of 53 modulo 4 and of 107 modulo 11.
Behavior of modding by 4:
0 mod 4 0/4 = 0r0 0 = 00
1 mod 4 1/4 = 0r1 1 = 01
2 mod 4 2/4 = 0r2 2 = 10
3 mod 4 3/4 = 0r3 3 = 11
4 mod 4 4/4 = 1r0 4 = 00 (100 can't store 1)
5 mod 4 5/4 = 1r1 5 = 01 (101)
6 mod 4 6/4 = 1r2 6 = 10 (110)
7 mod 4 7/4 = 1r3 7 = 11 (111)
8 mod 4 8/4 = 2r0 8 = 00 (1000)
9 mod 4 9/4 = 2r1 9 = 01 (1001)
… …
• 2 bits acts like mod 4. This means when counting up, 2-bit number reset to
zero at 4. What mod does 5 bits act like?