Problem 15
a. How many bits does it take to store a 3-minute song using an audio encoding method that samples at the rate of 40,000 samples/second, has a bit depth of 16, and does not use compression? What if it uses a compression scheme with a compression ratio of \(5: 1\) ? b. How many bits does it take to store an uncompressed \(1,200 \times 800\) RGB color image? If we found out that the image actually takes only \(2.4 \mathrm{Mbits}\), what is the compression ratio?
Problem 16
Show how run-length encoding can be used to compress the following text stream: xxxyyyyy zzzzzAAxxxx What is the compression ratio? (Assume each digit and letter requires 8 bits.)
Problem 19
Assume that \(a=1, b=2\), and \(c=2\). What is the value of each of the following
Boolean expressions?
a. \((a>1)\) OR \((b=c)\)
b. \([(a+b)>c]\) AND \((b
Problem 20
Assume that \(a=5, b=2\), and \(c=3\). What problem do you encounter when attempting to evaluate the following Boolean expression? \((a=1) \mathrm{AND}(b=2)\) OR \((c=3)\) How can this problem be solved?
Problem 21
The truth table for a Boolean expression with two variables has four rows. The truth table for a Boolean expression with three variables has eight rows. How many rows would there be in a truth table with five variables?
Problem 24
Build a majority-rules circuit. This is a circuit that has three inputs and one output. The value of its output is 1 if and only if two or more of its inputs are 1; otherwise, the output of the circuit is 0 . For example, if the three inputs are \(0,1,1\), your circuit should output a 1. If its three inputs are \(0,1,0\), it should output a 0 . This circuit is frequently used in faulttolerant computing-environments where a computer must keep working correctly no matter what, for example as on a deep-space vehicle where making repairs is impossible. In these conditions, we might choose to put three computers on board and have all three do every computation; if two or more of the systems produce the same answer, we accept it. Thus, one of the machines could fail and the system would still work properly.
Problem 25
Design an odd-parity circuit. This is a circuit that has three inputs and one output. The circuit outputs a 1 if and only if an even number \((0\) or 2\()\) of its inputs are a 1 . Otherwise, the circuit outputs a 0 . Thus, the sum of the number of 1 bits in the input and the output is always an odd number. (This circuit is used in error checking. By adding up the number of 1 bits, we can determine whether any single input bit was accidentally changed. If it was, the total number of \(1 \mathrm{~s}\) is an even number when we know it should be an odd value.)
Problem 26
Design a 1 -bit subtraction circuit. This circuit takes three inputs-two binary digits \(a\) and \(b\) and a borrow digit from the previous column. The circuit has two outputs-the difference \((a-b)\), including the borrow, and a new borrow digit that propagates to the next column. Create the truth table and build the circuit. This circuit can be used to build \(N\)-bit subtraction circuits.
Problem 27
How many selector lines would be needed on a four-input multiplexer? On an eight-input multiplexer?