Quiz 2 -- 10 April, 1995

This is an open book, open notes exam; however, the use of calculators is forbidden. The exam is to be turned in by 8:30 PM.

Problem 1. (15 points)

Show how to construct a 4×16 decoder out of five 2×4 decoders with enable inputs.

Problem 2. (8 points)

How many address lines and data lines are needed for a 4M × 8 memory?

Problem 3. (8 points)

Convert the decimal number 185 into a binary number.

Problem 4. (8 points)

Convert the binary number 100011101 into a decimal number.

Problem 5. (8 points)

Convert -254 into a ten-bit two's complement binary number.

Problem 6. (10 points)

Convert the decimal number 47.375 into a floating point number with one sign bit, an eight-bit exponent expressed using excess-127 notation, and a 23-bit mantissa.

Problem 7. (8 points)

Represent the following Pascal statement in register transfer language:

```          IF (NOT Q) THEN S := T
ELSE IF (NOT P) THEN S := T+1
```

Problem 8. (10 points)

If registers S and T have the following values:

• S = 1010101011
• T = 1100010110

what are their values after each of the following RTL statements are performed

• S &lt- S+T, T &lt- T+1
• S &lt- shr T

where shr is logical shift right.

Problem 9. (15 points)

Show the hardware needed to implement the following RTL statements for eight-bit registers S and T:

• p q : S &lt- T, T &lt- S + T
• p' q : T &lt- 1

You may use eight-bit adders, eight-bit multiplexers, eight-bit registers and assorted logic gates in your solution.