How many items can be represented by 3 bytes?
- Given k bits → 2^k items
- 3 bytes = 24 bits = 2^24 items
How many bits needed for 97 items?
- for k items, invert exponent → log_2(k)
- next highest power of 2 above 97 is 128, therefore we need 2^7 items so 7 bits
How to convert from decimal to binary?
- Given decimal n, if power of 2 put a 1 at that index w/ trailing 0s
- else find power of 2 just below n, put a 1, and then n = n - 2^k, repeat
How to convert from decimal to hexadecimal?




Arithmetic such as addition and multiplication are not associative
-
Strawman Solution:
