Exam 1 Solutions ---------------- Problem 1: a. TRUE b. TRUE c. FALSE d. FALSE e. FALSE f. FALSE Problem 2: 7953 to 12048 Problem 3: a. 0x42100000 or 01000010 00010000 00000000 00000000 b. 0xc1580000 or 11000001 01011000 00000000 00000000 c. -13.5 Problem 4: lui $at, 0x34A3 lw $at, 0x8143($at) lw $t2, 0($at) Problem 5: a. C3 = G + P*C0 b. P = (A2+B2)*(A1+B1)*(A0+B0) c. G = (A2*B2) + (A2+B2)*(A1*B1) + (A2+B2)*(A1+B1)*(A0*B0) or: a. C3 = G | P&C0 b. P = (A2|B2)&(A1|B1)&(A0|B0) c. G = (A2&B2) | (A2|B2)&(A1&B1) | (A2|B2)&(A1|B1)&(A0&B0) or any of the various commutative or associative rearrangements of either of the above Problem 6: 1, 6, 8, 10, 13 Problem 7: 580 ns Problem 8: Z = AB + AC + BC Problem 9: 0 0 0 0 : 0 0 0 0 0 1 : 1 0 0 0 1 0 : 0 1 0 0 1 1 : 1 0 0 1 0 0 : 0 1 0 1 0 1 : 0 1 0 1 1 0 : 1 1 0 1 1 1 : 0 1 1 0 0 0 : 1 0 1 0 0 1 : 0 0 1 0 1 0 : 1 1 1 0 1 1 : 0 0 1 1 0 0 : 1 1 1 1 0 1 : 0 0 1 1 1 0 : 1 1 1 1 1 1 : 0 0 (listed in any order) Problem 10: add : 0 2 0 0 0 1 0 1 addi : 0 1 0 0 0 1 0 1 sub : 0 3 0 1 0 1 0 1 and : 0 2 1 X 0 1 0 1 andiu : 0 0 1 X 0 1 0 1 lw : 0 1 0 0 0 0 0 1 sw : 0 1 0 0 1 X 0 0 bltz : 1 1 0 0 0 X 1 0