Docsity

ECE 2030 Fall 2006 Computer Engineering Final Exam, Exams of Computer Science

Toggle sidebar
bg1
ECE 2030 1:00pm Computer Engineering Fall 2006
5 problems, 6 pages Final Exam 14 December 2006
1
Instructions: This is a closed book, closed note exam. Calculators are not permitted. If you have
a question, raise your hand and I will come to you. Please work the exam in pencil and do not
separate the pages of the exam. For maximum credit, show your work.
Good Luck!
Your Name (please print) ________________________________________________
1 2 3 4 5 total
27 32 24 24 30 137
pf3
pf4
pf5

Partial preview of the text

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

5 problems, 6 pages Final Exam 14 December 2006

Instructions: This is a closed book, closed note exam. Calculators are not permitted. If you have

a question, raise your hand and I will come to you. Please work the exam in pencil and do not

separate the pages of the exam. For maximum credit, show your work.

Good Luck!

Your Name ( please print ) ________________________________________________

1 2 3 4 5 total

5 problems, 6 pages Final Exam 14 December 2006

Problem 1 (3 parts, 27 points) Microcode

Using the supplied datapath, write microcode fragments to accomplish the following procedures.

Express all values in hexadecimal notation. Use ‘X’ when a value is don’t cared. For maximum

credit, complete the description field. Recall that ⊕ means XOR. Use only registers 1, 2, and 3.

Part A (15 points)

1

R R R

R.

# X Y Z rwe im en

im va au en

-a /s

lu en

lf su en

st description

Part B (6 points) Assume R 1 contains three packed unsigned integer bytes (A, B, and C). Assume

A is the least significant byte, then B, then C. Write a microcode fragment that unpacks B,

placing it in the lowest eight bits of R 1. All other bits should be zero.

# X Y Z rwe im en

im va au en

-a /s

lu en

lf su en

st description

Part C (6 points) Write a microcode sequence that averages the initial values of R 1 and R 2. The

result should be placed in R 1.

# X Y Z rwe im en

im va au en

-a /s

lu en

lf su en

st description

5 problems, 6 pages Final Exam 14 December 2006

Problem 3 (3 parts, 24 points) Instruction Formats

Part A (9 points) Consider the instruction set architecture below with fields containing zeros.

opcode dest. reg. source 1 reg. immediate value

What is the maximum number of opcodes?

What is the number of registers?

What is the range of the signed immediate value?

Part B (9 points) List three differences between a branch and a jump in the MIPS ISA.

Part C (6 points) Instructions and 32 bit integers are “word-aligned” in MIPS. Explain what this

means for a byte addressed processor?

Problem 4 (2 parts, 24 points) Minimally Processed, Whole Grain Design

In the space below, implement a full adder using only 2 and 3 input NAND gates and inverters.

Label inputs A, B, and CIN. Label outputs Sum and COUT.

5 problems, 6 pages Final Exam 14 December 2006

Problem 5 (3 parts, 30 points) Reverse Engineering

For each part below, determine the behavior and write as a Boolean expression.

A

A

B

B

B

C

C

C

OUTW

OUT W =

A

B

C

E

OUTX

D OUTY

OUTx =

OUTY =

Outz

A

B

E

C

D

C

A

B

D

E

OUTZ =