CS/COE 447: Spring 2010 Homework 3 YOUR NAME: It's fine to discuss the questions in general with other people, but your solutions should be your own individual work. Please show your work. 1. Represent the following decimal numbers in the IEEE 754 single-precision format. Please show your work. Give your answer in binary AND in hex. -4.75 43.375 2. Convert the following unsigned binary numbers into decimal numbers 110010110.11011 101.10001 3. Construct a truth table for a four-input odd-parity function. (see page C-65-66 for a description of parity). Here is some more information about parity. Parity is used when characters are transmitted over communication lines. The sender and the receiver take different actions. Suppose we are transmitting an ascii 'E' over a serial communication port, and that we are using odd parity. ascii E = _1000101. The sender will count the number of 1s and add a parity bit such that the total number of 1s in the 8 bits is odd. So, for 'E', the parity bit would be 0: 01000101 --- odd total number of 1s. The receiver, on the other hand, will read the received character, and check whether the recieved 8-bit value has an odd number of 1s. This is a simple error detection scheme. If the values of an odd number of bits were changed during transmission (due to error), then the parity of the received value will be even, and the receiver will know that an error occurred. (If an even number of bits were changed, however, the parity would still be odd, and the error would not be detected.) Write a truth table for the sender and write one for the receiver. 4. Prove a multiplexor is universal by showing how to build the AND, OR and NOT gates using a multiplexor. (Hint: input and control lines can be connected to power or ground where power = 1 and ground = 0.) Specifically, build AND, OR and NOT gates using MUX'es with two control lines and 4 inputs. 5. Assume X consists of 3 bits: x2 x1 x0. Write logic functions which are true if and only if: A. X contains only a single zero B. X when interpreted as an unsigned binary number less than 4 C. X when interpreted as a two's complement number is negative. 6. Implement the three functions from question 5 using a PLA: A. X contains only a single zero B. X when interpreted as an unsigned binary number less than 4 C. X when interpreted as a two's complement number is negative. 7. Assume X consists of 3 bits: x2, x1, x0, and Y consists of 3 bits: y2, y1, y0. Write logic functions which are true if and only if: A. X < Y, where X and Y are interpreted as unsigned binary numbers B. X < Y, where X and Y are interpreted as two's complement numbers 8. Implement a switching network which has two data inputs (A and B), two data outputs (C and D), and a control input (S). If S = 1, the network is in pass-through mode and C = A, and D = B. If S = 0, the network is in crossing mode and C = B, and D = A.