EE 333 Exam 1 September 28, 2006
-
Upload
carlos-goff -
Category
Documents
-
view
26 -
download
1
description
Transcript of EE 333 Exam 1 September 28, 2006
Fall 2006
Lillevik 333f06-a1 1
University of Portland School of Engineering
EE 333
EE 333 Exam 1September 28, 2006
Instructions1. Print your name, student ID, and seat in the above
blanks.2. This is a Closed Book exam.3. Do all of the problems. They may vary in points but the
total is 100. Questions are short answer and problems.4. Do not use any additional pages of paper. If you run out
of room, use the back sides. Do not remove the staple.5. Please write clearly or print. Illegible or unreadable
answers may not be graded for partial credit.6. Mark your answer with a box or star.
Name Student ID
Seat1 10
2 10
3 10
4 10
5 10
6 10
7 10
8 10
9 10
10 10
100
Answers
Fall 2006
Lillevik 333f06-a1 2
University of Portland School of Engineering
EE 333
MIPS machine language (decimal)
You may also use the following pseudo-instructions:
la rdest, address
lb rt, address
sb rt, address
Fall 2006
Lillevik 333f06-a1 3
University of Portland School of Engineering
EE 333
MIPS architecture
Fall 2006
Lillevik 333f06-a1 4
University of Portland School of Engineering
EE 333
Problem 1, (10 pts)
What are the five classic components of a computer and what do they do?
1) Memory: holds instructions and data
2) Datapath: routes information around computer
3) Input: brings information into computer
4) Output: takes information away from computer
5) Control: coordinates the activities of computer
Fall 2006
Lillevik 333f06-a1 5
University of Portland School of Engineering
EE 333
Problem 2, (10 pts)
For the 16-bit hex number 0xff85 in two’s complement notation:
A. What is it’s decimal value?
B. What is it’s hex representation sign extended to 32-bits?
ff850_n
007b01007a0n 10
01 123111121611167
ff85 ffff0
Fall 2006
Lillevik 333f06-a1 6
University of Portland School of Engineering
EE 333
Find the assembly instruction for:
0x ac82 0010
Problem 3, (10 pts)
1010 1100 1000 0010 0000 0000 0001 0000op rs rt immed
43 4 2 16
sw $2, 16($4)
rt rs
Fall 2006
Lillevik 333f06-a1 7
University of Portland School of Engineering
EE 333
Problem 4, (10 pts)
For the MIPS assembly instruction div $9, $2A. What is the op code?
B. What is rs?
C. What is rt?
D. What is the function?
E. What is machine instruction in hex?
op = 0
rs = 9
rt = 2
func = 26 = 0x 1a
0000 0001 0010 0010 0000 0000 0001 1010
0x 0122 001a
Fall 2006
Lillevik 333f06-a1 8
University of Portland School of Engineering
EE 333
Problem 5, (10 pts)Write a program segment for c = a + b
Fall 2006
Lillevik 333f06-a1 9
University of Portland School of Engineering
EE 333
Problem 6, (10 pts)
Address Contents
0x 0040 000c 0x 24020004
0x 0040 0008 0x 2108ffff
0x 0040 0004 0x 1420fffd
0x 0040 0000 0x 48656c6c
Address Byte
0x 0040 0006 0x20
0x 0040 000d 0x00
0x 0040 0001 0x6c
0x 0040 000f 0x24
0x 0040 0002 0x65
(hex)
Find the memory byte in hex.
memory
Fall 2006
Lillevik 333f06-a1 10
University of Portland School of Engineering
EE 333
Problem 7, (10 pts)
Func M Cn S3 S2 S1 S0
Add L H H L L H
Xor H X L H H L
Shift Left
L H H H L L
Invert H X L L L L
Decrement
L H H H H H
Complete the table below for LS181 ALU
Fall 2006
Lillevik 333f06-a1 11
University of Portland School of Engineering
EE 333
Problem 8, (10 pts)Design a “shift left logical” circuit that accepts a 16-bit input A and 2-bit shift amount Shamt that shifts A either 0, 1, 2, or 3 positions. Use only 16-bit shift left logical one position (SLL1) circuits and 16-bit Muxes.
Fall 2006
Lillevik 333f06-a1 12
University of Portland School of Engineering
EE 333
Problem 9, (10 pts)
InstructionTotal
Clocks
Clock
1 2 3 4 5
add $1, $2, $3 4 x x x x
beq $1, $2, label 3 x x x
lw $1, offset ($2) 5 x x x x x
sub $1, $2, $3 4 x x x x
sw $1, offset ($2) 4 x x x x
j label 3 x x x1 = Instruction Fetch
2 = Decode & Register Read
3 = Execution
4 = Memory Access
5 = Register Write
For the MIPS architecture, complete the table
Fall 2006
Lillevik 333f06-a1 13
University of Portland School of Engineering
EE 333
Problem 10, (10 pts)Draw the trace for signal Sout