Solved

The MIPS Instruction Set Includes Several Shift Instructions

Question 3

Essay

The MIPS instruction set includes several shift instructions. They include logical-shift- left, logical-shift-right, and arithmetic-shift-right. Other architectures only provide an arithmetic- shift-right instruction.
a) Why doesn't MIPS offer an "arithmetic-shift-left" opcode?
b)How would you implement in the assembler a logical-shift-left (LSL) pseudo-operation for a machine that didn't have this particular instruction? Be sure your LSL instruction can shift up to W- bits where W is the machine word size in bits.

Correct Answer:

verifed

Verified

Related Questions