


Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!



4 problems, 4 pages Exam Two Solutions 25 October 2006
Problem 1 (3 parts, 28 points) Representations and Arithmetic
Part A (10 points) Convert the following notations:
binary notation decimal notation (^11011) 16 + 8 + 2 + 1 = 27
1010.011 8 + 2 + .25 + .125 = 10.
(^238) 256 x 1K x 1K x 1K = 256 billion hexadecimal notation octal notation 8.1 (^) 1000.0001 = 10.
DA.FA (^) 11011010.11111010 = 332.
Part B (10 points) For the 24 bit representations below, determine the most negative value, most positive value, and step size (difference between sequential values). All answers should be expressed in decimal notation. Fractions (e.g., 3/16ths) may be used. All signed representations are two’s complement.
representation most negative value most positive value step size
signed integer (24 bits). (0 bits) - 8 million^ 8 million^1 unsigned fixed-point (12 bits). (12 bits) 0 4 thousand^ 1/ unsigned fixed-point (18 bits). (6 bits) 0 256 thousand^ 1/ signed fixed-point (18 bits). (6 bits) - 128 thousand^ 128 thousand^ 1/
Part C (8 points) Complete the statements and answer the questions.
“A fixed-point representation has a constant step size
where a floating-point presentation has a constant number of significant figures.”
A 32 bit single precision floating point representation has a 23 bit mantissa field, an eight bit exponent field, and one sign bit.
A 1 1 Z 0 Z 0 Z 0 A
4 problems, 4 pages Exam Two Solutions 25 October 2006
Problem 4 (2 parts, 22 points) Arithmetic
Part A (16 points) For each problem below, compute the operations using the rules of arithmetic, and indicate whether an overflow occurs assuming all numbers are expressed using a four bit unsigned fixed-point and four bit two’s complement fixed-point representations.
result
unsigned
signed
Part B (6 points) Consider an arithmetic unit that either adds or subtracts two 32-bit values (X
and Y) based on a control signal ADD / SUB. The result is Z. Define the behavior for a 32 bit two’s complement overflow detection unit. Assume the inputs are X 31 , Y 31 , Z 31 , and
ADD / SUB. The output Error is 1 for overflow.
X 31 Y 31 Z 31 Error X 31 Y 31 Z 31 Error