Docsity

Exam Solutions for ECE 2030 Computer Engineering Fall 2001 - Problem 1 to 4, Exams of Computer Science

Toggle sidebar
bg1
ECE 2030 10:00am Computer Engineering Fall 2001
4 problems, 4 pages Exam Two Solutions 19 October 2001
1
Problem 1 (3 parts, 30 points) Numbers and Arithmetic
Part A (9 points) Convert some binary values (and powers of two) into decimal notation:
binary notation decimal notation
101.101 4 + 1 + .5 + .125 = 5.625
10111011 128 + 32 + 16 + 8 + 2 + 1 = 187
244 16 * 1K * 1K * 1K * 1K * = 16 Trillion
Part B (9 points) Convert the following hexadecimal values into octal notation:
hexadecimal notation octal notation
555 010101010101 = 2525
DEC 110111101100 = 6754
13.61 10011.01100001 = 23.302
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 0 1
+ 1 0 1 1 1 0 0 0
+ 1 1 1 11 1 1 0
− 0 1 1 1 1 0 1
− 1 1 0 1
result 0 0 0 00 1 1 10 1 1 11 0 0 0
signed
error? no yes yes yes
unsigned
error? yes yes no yes
pf3
pf4

Partial preview of the text

Download Exam Solutions for ECE 2030 Computer Engineering Fall 2001 - Problem 1 to 4 and more Exams Computer Science in PDF only on Docsity!

4 problems, 4 pages Exam Two Solutions 19 October 2001

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

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

binary notation decimal notation

101.101 4 + 1 + .5 + .125 = 5.

10111011 128 + 32 + 16 + 8 + 2 + 1 = 187

244 16 * 1K * 1K * 1K * 1K * = 16 Trillion

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

hexadecimal notation octal notation

555 010101010101 = 2525

DEC 110111101100 = 6754

13.61 10011.01100001 = 23.

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 0 0 0 0 0 1 1 1 0 1 1 1 1 0 0 0

signed error?

no yes yes yes

unsigned error?

yes yes no yes

4 problems, 4 pages Exam Two Solutions 19 October 2001

Problem 2 (3 parts, 28 points) Art of the State

Part A (10 points) Implement a transparent latch using only two-input NAND gates. Label the inputs In and En , and the output Out. No other gate types should be used.

Out

En

In

Part B (8 points) Implement register with write enable using transparent latches, pass gates, and inverters. Use an icon for the transparent latches. Label the inputs In , WE, Φ 1 , Φ 2 and the output Out.

In Out

En

Latch

In Out

En

Latch

WE

In Out

Part C (10 points) Assume the following signals are applied to your register. 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 19 October 2001

Problem 4 (2 part, 22 points) Building Blocks

Part A (11 points) Consider the following circuit. For each combination of inputs listed below, describe the corresponding outputs.

4 to 2

priority

encoder

In 0

In 1

In 2

In^3 In 3 > In 2 > In 1 > In 0

Out 0

Out 1

V

A

B

C

D

2 to 4

decoder

In 0

In 1

En

Out 0

Out 1

Out 2

Out 3

W

X

Y

Z

A B C D W X Y Z

Part B (11 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. Do not consider error determination here.

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