9-19. Suppose we want to devise a binary code to represent the fuel levels in a car:
a) If we need only to describe the possible levels (empty, ¼ full, ½ full, ¾
full, full) how many bits are needed?
b) Give one possible binary code that describes the levels in a)
c) If we need to describe the levels (empty, 1/8 full, ¼ full, 3/8 full, ½ full,
5/8 full, ¾ full, 7/8 full, & full ) how many bits would be needed?
d) If we used an 8-bit code, how many levels could we represent?
Need: a) Number of bits = ____ (a decimal number); b) one possible
binary code; c) Number of bits = ____ (a decimal number); d) For an 8 bit
code, how many levels represented?