Docsity

Determine Out - Computer Engineering - Solved Exam, Exams of Computer Science

Toggle sidebar
bg1
ECE 2030B 1:00am Computer Engineering Fall 2004
4 problems, 4 pages Exam Two Solutions 15 October 2004
1
Problem 1 (2 parts, 27 points) Representations and Arithmetic
Part A (15 points) For the 28 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
(28 bits) . (0 bits) -128M +128M 1
unsigned fixed-point
(14 bits) . (14 bits) 0 16K 1/16K
unsigned fixed-point
(19 bits) . (9 bits)
0 512K 1/512
signed fixed-point
(19 bits) . (9 bits) -256K 256K 1/512
Part B (12 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 six bit
unsigned fixed point representation and a six bit two’s complement fixed-point representation.
10.111
+ 10.001 111.111
+ 111.111 1.010
- 100.101 100.000
- 000.001
result
101.000 111.110 100.101 011.111
unsigned
error? no yes yes no
signed
error? yes no yes yes
pf3
pf4

Partial preview of the text

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

4 problems, 4 pages Exam Two Solutions 15 October 2004

Problem 1 (2 parts, 27 points) Representations and Arithmetic

Part A (15 points) For the 28 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 (28 bits). (0 bits)

-128M +128M 1

unsigned fixed-point (14 bits). (14 bits)

0 16K 1/16K

unsigned fixed-point (19 bits). (9 bits)

0 512K 1/

signed fixed-point (19 bits). (9 bits)

-256K 256K 1/

Part B (12 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 six bit unsigned fixed point representation and a six bit two’s complement fixed-point representation.

result 101.000 111.110 100.101 011.

unsigned error?

no yes yes no

signed error?

yes no yes yes

4 problems, 4 pages Exam Two Solutions 15 October 2004

Problem 2 (3 parts, 30 points) Building Blocks

Part A (12 points) Consider the following circuit below. Assume the encoder has the following input priority: I 2 > I 0 > I 3 > I 1. Determine Out for the following Input patterns.

I 3 I 2 I 1 I 0

4 to 2 encoder

O 1 O 0

I 0 I 1 I 2 I 3

O

S 1 S 0

A B C D

W X Y Z

Out

oops

W X Y Z Out

0 0 1 0 C

1 0 1 0 D

0 0 1 1 A

1 1 1 1 B

Part B (10 points) Consider five possible definitions for the block below left. One block input is

the symbolic value A. The other input is a control value. The output behavior for each of the five

definitions is given. Give the logical (gate) name for each definition. Note that –A means not A.

A I N

C

Out

In C 1 2 3 4

A 0 0 A A 1 Z (^) o

A 1 A -A 1 0 A

1 AND^2 XOR^3 OR

4 NOT^5 PASS

Part C (8 points) The blocks in part B are used to create a new module below. X, Y, and Z are symbolic inputs. Complete the truth table and give its functional name.

I N C

O

I N C

O

I N C

O

I N C

Z O

X

Y

C

3 Out

C Out

0 X

1 Y It’s a:

2 to 1 MUX

4 problems, 4 pages Exam Two Solutions 15 October 2004

Problem 4 (2 part, 16 points) Arithmetic Unit

Part A (8 points) The adder below adds two four bit numbers A and B and produces a four bit result S. Add extra digital logic to support subtraction as well as addition. Label inputs X 3 , X 2 ,

X 1 , X 0 , Y 3 , Y 2 , Y 1 , Y 0 , ADD / SUB and outputs Z 3 , Z 2 , Z 1 , Z 0.

A 3 A 2 A 1 A 0 B^3 B^2 B^1 B^0

S 3 S 2 S 1 S 0

Cin

X 3 X 2 X 1 X 0

Y 3 Y 2 Y 1 Y 0

Z 3 Z 2 Z 1 Z 0

ADD/SUB

Part B (8 points) Now define the behavior for a two’s compliment overflow detection unit.

Assume the inputs are X 3 , Y 3 , Z 3 , and ADD / SUB. The output Error is 1 for overflow.

ADD / SUB = 0 ADD / SUB = 1

X 3 Y 3 Z 3 Error X 3 Y 3 Z 3 Error

0 0 0 0 0 0 0 0

1 0 0 0 1 0 0 1

0 1 0 0 0 1 0 0

1 1 0 1 1 1 0 0

0 0 1 1 0 0 1 0

1 0 1 0 1 0 1 0

0 1 1 0 0 1 1 1

1 1 1 0 1 1 1 0