Docsity

Each Row - Computer Engineering - Solved Exam, Exams of Computer Science

Toggle sidebar
bg1
ECE 2030 1:00pm Computer Engineering Spring 2002
4 problems, 4 pages Exam Two Solutions 20 March 2002
1
Problem 1 (3 parts, 30 points) Numbers and Arithmetic
Part A (9 points) Convert some decimal values (and powers of two) into binary notation:
decimal notation binary notation
942 1110101110
41.6875 101001.1011
512 billion 239
Part B (9 points) Convert the following octal values into hexadecimal notation:
octal notation hexadecimal notation
555 16D
1234 29C
276.41 BE.84
Part C (12 points) For each problem below, (a) compute the operations using the rules of
arithmetic, (b) indicate whether an error occurs assuming all numbers are expressed using a four
bit two’s complement representation, and (c) indicate whether an error occurs assuming all
numbers are expressed using a four bit unsigned representation.
1 1 1
+ 1
0 0 0 0
- 1 0 0 0
1 1 1 0
−1 0 0 1
1
− 1 1 1 1
result 1 0 0 0 1 0 0 0 0 1 0 1 0 0 1 0
signed
error? Yes Yes No No
unsigned
error? No Yes No Yes
pf3
pf4

Partial preview of the text

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

4 problems, 4 pages Exam Two Solutions 20 March 2002

Problem 1 (3 parts, 30 points) Numbers and Arithmetic

Part A (9 points) Convert some decimal values (and powers of two) into binary notation:

decimal notation binary notation

942 1110101110

41.6875 101001.

512 billion 239

Part B (9 points) Convert the following octal values into hexadecimal notation:

octal notation hexadecimal notation

555 16D

1234 29C

276.41 BE.

Part C (12 points) For each problem below, (a) compute the operations using the rules of arithmetic, (b) indicate whether an error occurs assuming all numbers are expressed using a four bit two’s complement representation, and (c) indicate whether an error occurs assuming all numbers are expressed using a four bit unsigned representation.

result 1 0 0 0 1 0 0 0 0 1 0 1 0 0 1 0

signed error?

Yes Yes No No

unsigned error?

No Yes No Yes

4 problems, 4 pages Exam Two Solutions 20 March 2002

Problem 2 (3 parts, 30 points) Storage

Part A (10 points) For the circuit below, complete the truth table describing its behavior. Then label the status of each row from the following choices: SET, RESET, HOLD, META-STABLE.

A B Out status 0 0 1 Meta-Stable 1 0 0 Reset 0 1 1 Set 1 1 Q 0 Hold

Part B (10 points) Now implement a transparent latch using this circuit plus additional basic gates (AND, OR, NAND, NOR, and NOT). Label inputs IN and EN. Label output OUT. Do not attempt to employ mixed logic notation.

IN OUT

EN

Part C (10 points) Assume the following signals are applied to a register with write enable. Draw the output signal Out. Draw a vertical line where In is sampled. Assume Out starts at zero.

WE

In

Out

4 problems, 4 pages Exam Two Solutions 20 March 2002

Problem 4 (2 part, 20 points) Arithmetic Unit

Part A (10 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 (10 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