MIPS Assembly Language Please take your time to help out Que
MIPS Assembly Language. Please take your time to help out. Questions are little tricky.
(Q1) Which kind of element is the ALU (Arithmetic Logic Unit)? Sequential, combinational, or both?
(a) Combinational
(b) Sequential
(c) Both
===========================================================================
(Q2) If a signal is written at the same time it is read, what could be the read value?
Select all that apply.
(a) The read value will correspond to the newly written value
(b) The read value could correspond to the old value
(c) The read value will correspond to the old value
(d) The read value could correspond to the newly written value
===========================================================================
(Q3) Imagine that you have a branch instruction with an offset equal to 1610 (00000000000100002), and the PC contains the address 3001010
If the branch is taken, which will be the new address stored in the PC?
(a) 30074
(b) 30026
(c) 30030
(d) 30078
===========================================================================
(Q4) The multiplexer used to select the next instruction after a branch instruction is piloted by an AND port. Which are the input of this port?
(a) The Zero output from the ALU and the PC
(b) The Opcode field from the instruction plus the ALU output
(c) The branch signal from the ALU Control and the Zero signal from the ALU
(d) The branch signal from the Control Unit and the Zero output from the ALU
===========================================================================
(Q5) The operation performed by the ALU, in case of an R-Type instruction, depends by a specific amount of bits. How many?
(a) 6
(b) 8
(c) 12
(d) 2
===========================================================================
(Q6) Which of these sentences is TRUE? Select all that apply.
(a) Pipelining improves the throughput of the instructions but doesn\'t increase the execution time of a single instruction
(b) Pipelining improves the throughput of the instructions and in the same time increases the execution time of a single instruction
(c) Pipelining improves the execution time of a single instruction
(d) Any stage of a pipelined processor has a different clock cycle time
===========================================================================
(Q7) Which of these instructions could cause a Data Hazard? Select all that apply.
(a) lw $t0, offset($s3)
(b) add $s3, $zero, $s4
(c) sub $t4, $s1, $s2
(d) beq $t0, $t1, offset
===========================================================================
(Q8) Which of these instructions could cause a Control Hazard? Select all that apply.
(a) sw $s1, offset($s4)
(b) sub $t1, $t2, $t3
(c) add $s3, $t1, $s4
(d) beq $t1, $t2, offset
Solution
1) ALU is combinational and sequential circuit both.
2) The read value could be newly written value , old value or could be mix of two otherwise we need to specify timings.

