ECE 30
Introduction to Computer Engineering
Lab Solutions #8
Winter 2016
1. Single Cycle Implementation
1
2
2. Multi Cycle Implementation
(a) (3 points) A:
i.
explanation: Add shift left logical unit. It shifts by left by 2 bits.
instruction: j
CPU sta

ECE 30
Introduction to Computer Engineering
Lab #7 Solutions
1. Booth Encoding
(a) Trace the steps of multiplying a 5-bit twos complement multiplicand 010112 with a
3-bit twos complement multiplier 1012 , using Booths algorithm. Assume that the
shift-add

ECE 30
Introduction to Computer Engineering
Lab #9 - Solutions
1. Assume we have a direct mapped write-back cache, with 2048 blocks, each containing 16
words. Assume that the memory address is 32 bits wide and the memory is byte-addressable.
(a) What is t

ECE 30
Introduction to Computer Engineering
Lab #3 solutions
2016
You may only use the MIPS assembly instructions listed below. Do not use any other instructions!
arithmetic add
sub
addi
sll
special
lui
slt
data
lw
transfer
sw
branch
beq
bne
jump
j
jal
jr

ECE 30
Introduction to Computer Engineering
Solutions to Lab Problems #1
Spring 2016
1. We will denote the execution time as ET.
a. False
ETA for Program 1 = 1 sec
ETB for Program 1 = 5 sec
ETA < ETB . Thus, A is faster than B.
b. True
ETA for Program 2 =

ECE 30
Introduction to Computer Engineering
Lab #2 Solutions
Spring 2016
Note: the more advanced programming problems often dont have one single right solution; in
that case, we suggest a possible solution.
1. Solution:
a.
li
add
$a0, 44
$a1, $a0, $zero
b