Docsity

ECE 2030 Fall 2000 Computer Engineering Final Exam Solutions, Exams of Computer Science

Toggle sidebar
bg1
ECE 2030 Computer Engineering Fall 2000
4 problems, 3 pages Final Exam Solutions 12 December 2000
1
Problem 1 (1 part, 20 points) Instruction Formats
An ancient Egyptian hieroglyphic tablet has been found which may be the earliest record of an
instruction set architecture (perhaps alien?). The example shown below has all fields shown with
zeros. Do your best to interpret its meaning and answer the questions below.
000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000
opcode dest. reg. source 1 reg. immediate value
What is the maximum number of opcodes? 4096
What is the number of registers? 512
What is the range of the signed immediate value? ±
±±
±128K
What is the instruction word size? 48 bits
How many are bits needed to specify a branch if
equal instruction in this format?
48 bits
Problem 2 (1 part, 20 points) addition and subtraction
For each problem below, (a) compute the operations using the rules of addition and subtraction,
(b) indicate whether an error occurs assuming all numbers are expressed using a five bit two’s
complement representation, and (c) indicate whether an error occurs assuming all numbers are
expressed using a five bit unsigned representation.
1 0 1 0 1
+ 1 1 1 0 1
1 0 1 0 1
- 1 0 1 1
1 1 1 1
- 1
1 1 1 1 0
+ 1 1 1 1 0
result 1 0 0 1 0 1 0 1 0 1 1 1 0 1 1 1 0 0
signed
error? no yes no no
unsigned
error? yes no no yes
pf3

Partial preview of the text

Download ECE 2030 Fall 2000 Computer Engineering Final Exam Solutions and more Exams Computer Science in PDF only on Docsity!

4 problems, 3 pages Final Exam Solutions 12 December 2000

Problem 1 (1 part, 20 points) Instruction Formats

An ancient Egyptian hieroglyphic tablet has been found which may be the earliest record of an instruction set architecture (perhaps alien?). The example shown below has all fields shown with zeros. Do your best to interpret its meaning and answer the questions below.

000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 opcode dest. reg. source 1 reg. immediate value

What is the maximum number of opcodes? 4096

What is the number of registers? (^) 512

What is the range of the signed immediate value? (^) ±±±± 128K

What is the instruction word size? 48 bits

How many are bits needed to specify a branch if equal instruction in this format?

48 bits

Problem 2 (1 part, 20 points) addition and subtraction

For each problem below, (a) compute the operations using the rules of addition and subtraction, (b) indicate whether an error occurs assuming all numbers are expressed using a five bit two’s complement representation, and (c) indicate whether an error occurs assuming all numbers are expressed using a five bit unsigned representation.

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

signed error? no yes no no

unsigned error?

yes no no yes

4 problems, 3 pages Final Exam Solutions 12 December 2000

Problem 3 (3 part, 35 points) Storage

Part A (10 points) Implement a transparent latch using only the devices drawn below. Be sure to attach the wiring to the labeled inputs and outputs.

In Out

En

Part B (15 points) Use the two copies of the latch implemented above, plus additional devices drawn below to implement a register with one read and one write port. Be sure to attach the wiring to the labeled inputs and outputs.

In Out

WE

In Out

En

Latch

In Out

En

Latch

Phi1 Phi2 RE

Part C (10 points) Assume the following signals are applied to your register. Draw the output signal Out. Assume RE is always high and Out starts at zero.

Φ 1

Φ 2

WE

In

Out