Skip to main content

Computer Architecture · Datapath and control implementation

IEEE-754 binary32 operations are performed with round-to-nearest, ties-to-even, and…

Problem

Computer Architecture practice problem

IEEE-754 binary32 operations are performed with round-to-nearest, ties-to-even, and with traps disabled. For each operation below, list every flag among {invalid, overflow, underflow, divide-by-zero, inexact}\{\text{invalid},\text{ overflow},\text{ underflow},\text{ divide-by-zero},\text{ inexact}\} that the default exception handling must raise, and give the default result as a 3232-bit encoding. Use the after-rounding definition of underflow: underflow is raised if and only if the computed result is tiny (subnormal or zero) and inexact. Use the canonical quiet NaN 0 11111111 100000000000000000000000\ 11111111\ 10000000000000000000000 when a quiet NaN is the default result.

(a) (+∞)+(−∞)(+\infty)+(-\infty), where +∞+\infty is 0 11111111 000000000000000000000000\ 11111111\ 00000000000000000000000 and −∞-\infty is 1 11111111 000000000000000000000001\ 11111111\ 00000000000000000000000.

(b) M+MM+M, where MM is the largest finite binary32 value 0 11111110 111111111111111111111110\ 11111110\ 11111111111111111111111.

(c) P×QP\times Q, where PP is the smallest positive normal 0 00000001 000000000000000000000000\ 00000001\ 00000000000000000000000 and QQ is 2−242^{-24} encoded as 0 01100111 000000000000000000000000\ 01100111\ 00000000000000000000000.

(d) 1.0÷(+0)1.0\div(+0), where 1.01.0 is 0 01111111 000000000000000000000000\ 01111111\ 00000000000000000000000 and +0+0 is 0 00000000 000000000000000000000000\ 00000000\ 00000000000000000000000.

(e) (+0)÷(+0)(+0)\div(+0), with +0+0 as in (d).

Hint

Hint

Match each case to a standard default-exception rule: invalid ∞−∞\infty-\infty or 0/00/0; overflow of a huge finite; underflow of a tiny inexact; divide-by-zero of a nonzero finite by zero.

Check your work

Work the problem yourself first. Then open it in Training to check your answer and read the full worked solution.

The answer check and full solution for this problem come with ProofAnvil Practice membership ($19 USD monthly). See membership. Or start with the free Computer Architecture sample problem: Try the free sample problem.

More Computer Architecture practice problems