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

The instructions and problems for the final exam of the ece 2030 computer engineering course given in fall 1999. The exam consists of five problems, each with a specific instruction and points allocated. The problems cover various topics such as combinational logic, counters, simplification, assembly language programming, and microcode. Students are required to show their work and are not allowed to use calculators or notes during the exam. The document also includes a key for various instruction mnemonics used in the assembly language programming problem.

Typology: Exams

2012/2013

Uploaded on 04/08/2013

seetamraju_555
seetamraju_555 🇮🇳

3.6

(5)

67 documents

1 / 7

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
ECE 2030 Computer Engineering Fall 1999
5 problems, 7 pages Final Exam 13 December 1999
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. For maximum credit, show your work.
Good Luck!
Your Name (please print) ________________________________________________
Your Lecture Time (circle one) MWF 1:00pm MWF 2:00pm
12345 total
30 20 10 40 30 130
pf3
pf4
pf5

Partial preview of the text

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

5 problems, 7 pages Final Exam 13 December 1999

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. For maximum credit, show your work.

Good Luck!

Your Name ( please print ) ________________________________________________

Your Lecture Time ( circle one ) MWF 1:00pm MWF 2:00pm

1 2 3 4 5 total

5 problems, 7 pages Final Exam 13 December 1999

Problem 1 (3 parts, 30 points) Art of the State

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

Part B (10 points) Implement register with write enable using transparent latches, NAND gates, and inverters. Use an icon for the transparent latches. Label the inputs In , WE, ΦΦΦΦ 1 , ΦΦΦΦ 2 and the output 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.

Φ 1

Φ 2

WE

In

Out

5 problems, 7 pages Final Exam 13 December 1999

Problem 3 (1 part, 10 points) Simplification

Part A (10 points) For the following expression, derive a simplified product of sums expression using a Karnaugh Map. Circle and list the prime implicants, indicating which are essential. Then write the simplified POS expression.

F = AB + BCD + BC + C D

simplified POS expression

instruction example meaning add add $1,$2,$3 $1 = $2 + $ subtract sub $1,$2,$3 $1 = $2 - $ add immediate addi $1,$2,100 $1 = $2 + 100 multiply mul $1,$2,$3 $1 = $2 * $ divide div $1,$2,$3 $1 = $2 / $ and and $1,$2,$3 $1 = $2 & $ or or $1,$2,$3 $1 = $2 | $ and immediate andi $1,$2,100 $1 = $2 & 100 or immediate ori $1,$2,100 $1 = $2 | 100 shift left logical sll $1,$2,5 $1 = $2 << 5 shift right logical srl $1,$2,5 $1 = $2 >> 5 load word lw $1,100($2) $1 = memory [$2 + 100] store word sw $1,100($2) memory [$2 + 100] = $ load upper immediate lui $1,100 (^) $1 = 100 x 2 16 branch if equal beq $1,$2,100 if ($1 = $2), PC = PC + 4 + 100 branch if not equal bne $1,$2,100 (^) if ($1 ≠ $2), PC = PC + 4 + 100 set if less than slt $1, $2, $3 if ($2 < $3), $1 = 1 else $1 = 0 set if less than immediate slti $1, $2, 100 if ($2 < 100), $1 = 1 else $1 = 0 jump j 10000 PC = 10000 jump register jr $31 PC = $ jump and link jal 10000 $31 = PC + 4; PC = 10000

5 problems, 7 pages Final Exam 13 December 1999

Problem 4 (5 parts, 40 points) Assembly Language Programming

Consider the following MIPS program fragment. The attached sheet lists the instruction set.

address label instruction 1000 start: addi $1, $0, 496 1004 add $2, $0, $ 1008 loop: lw $3, 5000($1) 1012 slt $4, $3, $ 1016 beq $4, $0, skip 1020 sub $3, $0, $ 1024 skip1: add $2, $2, $ 1028 addi $1, $1, - 1032 slt $4, $1, $ 1036 beq $4, $0, loop

Part A (10 points) What operation does the code fragment at addresses 1012, 1016, and 1020 perform?

Part B (10 points) How many times is the loop body in this program fragment executed?

number of loop iterations:

Part C (5 points) What is the branch offset (in bytes) of the BEQ instruction at address 1036.

branch offset (in bytes)

Part D (10 points) What is the purpose of register $2 (i.e., what is the significance of its value when the fragment completes)?

Part E (5 points) What instruction would we add to the end of this fragment if we wanted to use it as a subroutine? NOTE: specify both the instruction name and operand.

5 problems, 7 pages Final Exam 13 December 1999

memory

register file 32 x 32

5 5 5

rwe

X Y Z

au en

-a/s arithmetic unit

sign extender

im en im va

lu en

logical unit

lf 4

addr

data

r/-w msel

st en

ld en

shift types 0 = logical 1 = arithmetic 2 = rotate

  • count shifts right
  • count shifts left

logical functions X Y out 0 0 lf 0 1 0 lf 1 0 1 lf 2 1 1 lf 3

cycle cycle number X register driven onto X bus Y register driven onto Y bus Z register written from Z bus rwe register write enable im en immediate enable on Y bus im va immediate value

au en arithmetic unit enable -a/s -add / sub (0 = add, 1 = subtract) lu en logical unit enable lf logical function su en shift unit enable st shift type ld en load enable st en store enable r/-w read/-write (0 = write, 1 = read) msel memory select description operation description

su en

shift unit

st 2

count

16

32