Lectures
Binary
GB(decimal) vs. GiB(binary)
Gigabyte vs. Gibibyte
Proposed standard.
For the most part still not practiced.
Binary - usually used with memory addressing.
Large
Terabyte (TiB tebibyte) - 1 * 2^40
Gigabyte (GiB gibibyte) - 1 * 2^30 = 1073741824
= 1.074 GB or 1.074 * 10^9 bytes
Megabyte (MiB mebibyte) - 1 * 2^20 = 1048576
Kilobyte (KiB kibibyte) - 1 * 2^10 = 1024
Other powers of 2
1*2^16 = 65536 (memory range of many early cpus)
1*2^8 = 256 (byte)
1*2^4 = 16 (nibble)
1*2^2 = 4
1*2^1 = 2
1*2^0 = 1
Binary math.
32 bit address line = 2^2 * 2^30 or 4 * 1 GiB or 4GiB
Example
If cpu capable of address 1Mi byte memory, and memory chips come in 64Ki byte
units, how many memory chips are needed?
1MiB = 1*2^20 bytes, 64KiB = 64*1Ki = 2^6*2^10 = 2^16 bytes/chip
(2^20 bytes)/(2^16 bytes/chip) = 2^(20-16) = 2^4 chips = 16 chips.
How many address lines are on each chip? 16
A decoder will be needed to select the appropriate chip, how
many select lines are needed? 2^4 = 16 or 4 lines