Describe the general syntax of MIPS arithmetic and logical operations which make use of a constant not directly associated with a register.
MIPS instructions that uses constant .
for example
(1)ADDI rt, rs, immediate
operands : rt, rs, immediate
syntax : rt <- rs + immediate
Description:
The 16-bit signed immediate is added to the 32-bit value in General
Purpose Register rs to produce a 32-bit result. If the addition
results in 32-bit 2's complement arithmetic overflow then the
destination register is not modified and an Integer Overflow
exception occurs. If it does not overflow, the 32-bit result is
placed into General Purpose Register rt.
(2)ANDI rt, rs, immediate
To do a bitwise logical AND with a constant.
operands : rt, rs, immediate
syntax : rt <- rs AND immediate
Description:
rt <- rs AND immediate
The 16-bit immediate is zero-extended to the left and combined with
the contents of General Purpose Register rs in a bitwise logical
AND operation. The result is placed into General Purpose Register
rt.
Get Answers For Free
Most questions answered within 1 hours.