C7 · Problem set 5
Problem set 5: arithmetic, formats and simulation
These problems use lessons 16 to 24: building blocks, arithmetic circuits, delay and glitches, multipliers and number formats, and the number formats and gate simulation labs.
Check
The 8-bit two's-complement numbers 110 and 50 are added.
(a)
What signed value results?
(b)
What's the overflow flag?
Check
A single-precision float has sign 0, biased exponent 124 and fraction 0.75.
(a)
What value is it?
(b)
What's the spacing to the next float?
Check
Two Q15 values represent 0.5 and 0.125.
(a)
What integer stores 0.5?
(b)
What integer stores their product, rounded?
Check
An n-bit ripple adder with n = 16 has 20 ps of gate delay, with 2 gates per bit, between registers with 60 ps of overhead.
(a)
What's its worst delay?
Write units the way you normally would: 1.5 ps and 0.0015 ns are the same answer.
(b)
What's the fastest clock?
Check
An n-bit carry-select adder with n = 32 uses blocks of k = 2 bits: 2 gate delays per bit inside a block and 2 per block for the selects.
(a)
What's its delay, in gate delays?
(b)
What would the best block size, , give?
Check
An n × n array multiplier with n = 8 uses one full adder per partial-product bit after the first row.
(a)
About how many full adders?
(b)
How many bits wide is the product?
Check
Gray code with 4 bits.
(a)
What's the Gray code of 3, as a number?
(b)
How many steps does an n-bit Gray counter take to return to 0?
Check
SECDED memory protects 16-bit words with Hamming check bits plus one overall parity bit.
(a)
How many check bits per word?
(b)
What's the storage overhead?
Check
A 1-of-N multiplexer is built as a tree of 2:1 multiplexers, each with 30 ps of delay, N = 16.
(a)
How many levels deep is it?
(b)
How many 2:1 multiplexers does it use?
Check
Write a full adder's carry out using AND, OR and XOR.
Write AND as · or & (or just AB), OR as +, XOR as ⊕, and NOT as ¬ or a trailing ': A·B + C' works.
Check
Write a full adder's sum.
Write AND as · or & (or just AB), OR as +, XOR as ⊕, and NOT as ¬ or a trailing ': A·B + C' works.
Check
A path through three gates has delays of 1, 2 and 4 units, and a second path from the same input reaches the same output gate through one gate of 1 unit.
(a)
When does the long path's change arrive?
(b)
How long can the output glitch last, at most?
Check
A ripple-carry adder is built from two-input gates as in the gate simulation lab, for n = 8.
(a)
How deep is its carry-out?
(b)
How many gates does it use?
Check
A float has biased exponent 120; its fraction field is about 0.3.
(a)
What power of two scales it?
(b)
What's its relative precision, the spacing over the leading power of two?
Check
A 4-bit shift-and-add multiplier computes 7 × 5.
(a)
What's the product?
(b)
How many additions does it perform (one per 1 bit of the multiplier 5)?
Have paper and a calculator ready. Work each problem out by hand, then enter the answer. Your first try on each one counts toward your score.
Practice
Keep practicing
13 kinds of problem on this topic, dealt one at a time with new numbers every time, for as long as you like.