Explore BrainMass
Share

add hardware to ALU

This content was STOLEN from BrainMass.com - View the original, and get the already-completed solution here!

The MIPS ALU (see enclosed figure) is extended to support an instruction "set-on-not-equal-signs". The instruction 'snes $rd, $rs, $rt' is similar to 'slt'. It sets $rd to '1' if the sign bit of $rs sign bit of $rt. Your task is to add the minimum required hardware to the ALU so that this instruction is executable in one execute cycle (that is one cycle not counting the fetch and execute).

© BrainMass Inc. brainmass.com October 25, 2018, 12:39 am ad1c9bdddf
https://brainmass.com/computer-science/hardware/add-hardware-to-alu-235547

Solution Summary

The MIPS ALU (see enclosed figure) is extended to support an instruction "set-on-not-equal-signs". The instruction 'snes $rd, $rs, $rt' is similar to 'slt'. It sets $rd to '1' if the sign bit of $rs sign bit of $rt. Your task is to add the minimum required hardware to the ALU so that this instruction is executable in one execute cycle (that is one cycle not counting the fetch and execute).

$2.19
See Also This Related BrainMass Solution

Correct the ALU

The ALU supports set on less than (slt) using just the sign bit of the adder. Let's try a set on less than operation using the values -7ten and 6ten. To make it simpler to follow the example, let's limit the binary representations to 4 bits: 1001two and 0110two. 1001two - 0110two = 1001two + 1010two = 0011two This result would suggest that -7 > 6, which is clearly wrong. Hence, we must factor in overflow in the decision. Modify the 1-bit ALU depicted below to handle slt correctly.

View Full Posting Details