Docsity

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

Toggle sidebar
bg1
ECE 2030 B 12:00pm Computer Engineering Fall 2010
4 problems, 4 pages Exam Two Solutions 27 October 2010
Problem 1 (4 parts, 40 points) Safety in Numbers
Part A (10 points) Convert the following notations:
binary notation decimal notation
1 0111 1100. 256 + 64 + 32 + 16 + 8 + 4 = 380
1100.1011 8 + 4 + .5 + .125 + .0625 = 12.6875
1000101.0111 69.4375
binary notation hexadecimal notation
101 1001 0101.0101 101 595.5A
1000 1011 0110.0011 11 8B6.3C
Part B (12 points) For the 28 bit representations below, determine the most positive value and the
step size (difference between sequential values). All answers should be expressed in decimal
notation. Fractions (e.g., 3/16ths) may be used. Signed representations are two’s complement.
representation most positive value step size
unsigned fixed-point
(26 bits) . (2 bits) 64M 1/4
signed integer
(28 bits) . (0 bits) 128M 1
signed fixed-point
(21 bits) . (7 bits) 1M 1/128
signed fixed-point
(14 bits) . (14 bits) 8K 1/16K
Part C (6 points) A 40 bit floating point representation has a 30 bit mantissa field, a 9 bit
exponent field, and one sign bit.
What is the largest value that can be represented (closest to infinity)? 2 255
What is the smallest value that can be represented (closest to zero)? 2 -256
How many decimal significant figures are supported? 9
Part D (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 five bit
unsigned fixed-point and five bit two’s complement fixed-point representations.
11.011
+ 1.001
1.111
+ .001
1.010
-11.011
10.000
- 0.001
result 00.100 10.000 1.111 1.111
unsigned error? □ no ■ yes ■ no □ yes □ no ■ yes ■ no □ yes
signed error? ■ no □ yes □ no ■ yes ■ no □ yes □ no ■ yes
1
pf3
pf4

Partial preview of the text

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

4 problems, 4 pages Exam Two Solutions 27 October 2010

Problem 1 (4 parts, 40 points) Safety in Numbers

Part A (10 points) Convert the following notations:

binary notation decimal notation

binary notation hexadecimal notation

595.5A

1000 1011 0110.0011 11 8B6.3C

Part B (12 points) For the 28 bit representations below, determine the most positive value and the

step size (difference between sequential values). All answers should be expressed in decimal

notation. Fractions (e.g., 3/16ths) may be used. Signed representations are two’s complement.

representation most positive value step size

unsigned fixed-point

(26 bits). (2 bits)

64M 1/

signed integer

(28 bits). (0 bits)

128M 1

signed fixed-point

(21 bits). (7 bits)

1M 1/

signed fixed-point

(14 bits). (14 bits)

8K 1/16K

Part C (6 points) A 40 bit floating point representation has a 30 bit mantissa field, a 9 bit

exponent field, and one sign bit.

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

255

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

How many decimal significant figures are supported?

Part D (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 five bit

unsigned fixed-point and five bit two’s complement fixed-point representations.

result

unsigned error? □ no ■ yes ■ no □ yes □ no ■ yes ■ no □ yes

signed error? ■ no □ yes □ no ■ yes ■ no □ yes □ no ■ yes

4 problems, 4 pages Exam Two Solutions 27 October 2010

Problem 2 (3 parts, 18 points) State Representatives

Part A (8 points) Implement a transparent latch using only basics gates (AND, OR, NAND,

NOR, and NOT). Also complete the behavior table below.

IN EN OUT OUT

A 0

Q

0

Q

0

A 1

A A

Part B (4 points) Consider a register with a selectable write enable (WE) and read enable (RE). It

is implemented with transparent latches, a 2to1 mux, and a pass gate. Describe its behavior by

completing the output values. Also indicate when a write and/or a read is being performed.

Register

IN OUT

WE RE

φ

1

φ

2

IN WE RE CLK OUT write? read?

A 0 0 ↑↓

Z

0

A 1 0 ↑↓

Z

0

A 0 1 ↑↓

Q

0

A 1 1 ↑↓

A

Part C (6 points) Assume the following signals are applied to a register. Draw the output signal

Out. Draw a vertical line where In is sampled. Draw crosshatch where Out is unknown.

1

2

WE

In

Out

4 problems, 4 pages Exam Two Solutions 27 October 2010

Part C (10 points) Build a stopwatch that counts seconds and minutes using divide by N counters

drawn below. Be sure to fill in the needed divider for seconds, tens of seconds, and minutes.

Use any basic gates you require. Assume a one hertz clock is already connected.

Ext CLR

Ext CE

CE

Out

Max

Count

Divide by 6

CLR

CE

Out

Max

Count

Divide by 10

CLR

CE

Out

Max

Count

Divide by 10

CLR

Problem 4 (1 parts, 12 points) Minimal Packaging

Implement a 4to1 multiplexer using only pass gates and inverters. Label all inputs and outputs.