Docsity

Following Circuit - Computer Engineering - Solved Exam, Exams of Computer Science

Toggle sidebar
bg1
ECE 2030B 1:00pm Computer Engineering Fall 2006
4 problems, 4 pages Exam Two Solutions 25 October 2006
1
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.375
238 256 x 1K x 1K x 1K = 256 billion
hexadecimal notation octal notation
8.1 1000.0001 = 10.04
DA.FA 11011010.11111010 = 332.764
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/4096
unsigned fixed-point
(18 bits) . (6 bits) 0 256 thousand 1/64
signed fixed-point
(18 bits) . (6 bits) - 128 thousand 128 thousand 1/64
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.
What is the largest value that can be represented (closest to infinity)? 2 127
What is the smallest value that can be represented (closest to zero)? 2 -128
How many decimal significant figures are supported? ~7
pf3
pf4

Partial preview of the text

Download Following Circuit - Computer Engineering - Solved Exam and more Exams Computer Science in PDF only on Docsity!

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.

What is the largest value that can be represented (closest to infinity)? 2 127

What is the smallest value that can be represented (closest to zero)? 2 -

How many decimal significant figures are supported? ~

Problem 2 (3 parts, 26 points) Building Blocks

A 1 1 Z 0 Z 0 Z 0 A

  • 4 problems, 4 pages Exam Two Solutions 25 October - I Part A (7 points) Consider the following circuit below. Determine its input priority. - I - I - I - O - O - I 0 I 1 I 2 I 3 V O 1 O - 1 X 0 0 0 0 0 X X - X X 1 X - X X - I 2 > I 3 > I 0 > I
  • Part B (7 points) Derive a simplified expression for O - O 1 = I 2 + I
  • block using only pass gates and inverters. Label inputs In, S 1 , S 0 , and outputs O 0 , O 1 , O 2 , O Part C (12 points) Complete the truth table for a 1 to 4 demux. Then implement the building
    • In S 1 S 0 O 0 O 1 O 2 O
      • A 0 0 A Z 0 Z 0 Z
      • A 0 1 Z 0 A Z 0 Z
      • A 1 0 Z 0 Z 0 A Z - O In - O - O - O - S 1 S

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

error? yes^ no^ yes^ yes

signed

error? yes^ yes^ no^ yes

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.

ADD / SUB = 0 ADD / SUB = 1

X 31 Y 31 Z 31 Error X 31 Y 31 Z 31 Error