




Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!





All the work is my own. I have no prior knowledge of the exam contents nor will I share the contents with others in CS61C
Instructions (Read Me!)
Problem M1 M2 M3 Ms F1 F2 F3 F4 Fs Total Minutes 20 20 20 60 30 30 30 30 120 180 Points 10 10 10 30 22 22 22 24 90 120
Score
Midterm Revisited
M1) āSon of a bitsā¦ā ( 10 pts, 20 min)
Number closest to...
...and its bit pattern
...and the velocity it represents
10 0b
12.5 0b
15 0b
M3) āWhat the MIPS is going on here?ā ( 10 pts, 20 min)
Mystery: la $t0, Mystery nop lw $t1, 20($t0) addiu $t1, $t1, 1 sw $t1, 20($t0) addiu $v0, $0, 0 jr $ra
// Mystery called < 100 times
______________ Mystery() {
Post-Midterm Questions
F1) āThe Datapath less traveledā¦ā ( 22 pts, 30 min)
RegDst RegWr nPC_sel ExtOp ALUSrc ALUctr MemWr MemtoReg
F3) āThese Pipes are Cleanā¦ā ( 22 pts, 30 min)
add $t1, $t2, $t xor $t1, $t4, $t lw $t3, 0($t1) beq $t3, $t3, 1 lw $t5, 0($t3) xor $t4, $t5, $t add $t5, $t5, $t
Cycleļ 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25
Inst 1
Inst 2
Inst 3
Inst 4
Inst 5
Inst 6
Cycleļ 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25
Inst 1
Inst 2
Inst 3
Inst 4
Inst 5
Inst 6
#define ITERATIONS 96 int s = serial(); // 40 cycles to complete for (int n = 0; n < ITERATIONS; n++) parallel(s,n); // 10 cycles per loop
F4) The CS61C Variety Pack⦠( 24 pts, 30 min)