Question: The input to the circuit is a 5 bit 2s complement integer B 4 B 3 B 2 B 1 B 0 and the output


The input to the circuit is a 5 bit 2s complement integer B4B3B2B1B0 and the output is its absolute integer value G.
1. What is the instruction for the arithmetic function that finds the absolute value of a Negative Number G= absolute value of B.
Does that need the use of bit G ? How will this bit be set? Verify for the maximum possible output.
2. What opcode can be used to detect a negative number? Verify for the minimum negative number.
A bare-bones Arithmetic Logic Unit (ALU) design is proposed. Note that simple inverters are used instead of XOR gates to find B's complement. Table below shows the various operations possible with the code (OpCode) given to the control lines S2S1SoCinIt also has ZERO and SIGN detect. in Operation Function G-A G=A+1 G=A+B G A +B+1 G=A+B G=A+B+1 G=A-1 G=A Transfer A Increment A Addition Add with carry input of 1 A plus 1s complement of Subtraction Decrement A Transfer A AND OR XOR NOT (1s complement) G-AB G-A A bare-bones Arithmetic Logic Unit (ALU) design is proposed. Note that simple inverters are used instead of XOR gates to find B's complement. Table below shows the various operations possible with the code (OpCode) given to the control lines S2S1SoCinIt also has ZERO and SIGN detect. in Operation Function G-A G=A+1 G=A+B G A +B+1 G=A+B G=A+B+1 G=A-1 G=A Transfer A Increment A Addition Add with carry input of 1 A plus 1s complement of Subtraction Decrement A Transfer A AND OR XOR NOT (1s complement) G-AB G-A
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
