Question: You will provide a new version of the MIC-1 microcode which will support the implementation of three new MACRO machine instructions: . RSHIFT Right shift

 You will provide a new version of the MIC-1 microcode which

will support the implementation of three new MACRO machine instructions: . RSHIFT

You will provide a new version of the MIC-1 microcode which will support the implementation of three new MACRO machine instructions: . RSHIFT Right shift the current accumulator by the argument number of bits. This is a zero fill operation and the argument must be a value between 0 and 15 (a four bit magnitude only value, located in the least significant 4 bits) MULT multiply the value at the top of the stack by the six bit immediate value in the instruction (remember, we're using 10 bit opcodes here). The result of the multiplication should replace the value at the top of the stack, provided that no overflow occurred. If the multiplication would overflow a 16 bit result, the top of the stack must not be changed. After the operation, the accumulator must be set to 0 if the multiplication succeeded, and -1 if an overflow occurred DIV divide the 16 bit 2s complement number at the top stack location SP (the dividend) by the 16 bit 2s complement number at the location just under the top location SP+1 (the divisor), and push on two new locations with SP-1 having the (unsigned) remainder of the division and SP-2 (new top of stack) having the 16 bit 2s complement quotient. If the absolute value of the divisor is greater than the absolute value of the dividend, the quotient should be set to 0 and the (unsigned) remainder set to the absolute value of the dividend, and if the divisor is equal to 0 (this is an illegal case) the remainder should be set to -1 and the quotient should be set to 0. After the operation, the accumulator must be set to 0 if the division was legal, and -1 if an attempt to divide by 0. The approach we'll use here is to extend the op-code field from 7 bits (as used in the INSP and DESP instructions for example) to a total of 10 bits, using the eighth bit as a gateway (i.e., bit-on a means to break out to a 10 bit op-code, while bit-off means a 7 bit op-code) Since bit 8 is used as a gateway, the 10 bit op-code will provide us with 4 new combinations, and we'll use them as follows 1111111 1 00 mmmmmm for MULT (6 bit multiplier field mmmmmm as operand) You will provide a new version of the MIC-1 microcode which will support the implementation of three new MACRO machine instructions: . RSHIFT Right shift the current accumulator by the argument number of bits. This is a zero fill operation and the argument must be a value between 0 and 15 (a four bit magnitude only value, located in the least significant 4 bits) MULT multiply the value at the top of the stack by the six bit immediate value in the instruction (remember, we're using 10 bit opcodes here). The result of the multiplication should replace the value at the top of the stack, provided that no overflow occurred. If the multiplication would overflow a 16 bit result, the top of the stack must not be changed. After the operation, the accumulator must be set to 0 if the multiplication succeeded, and -1 if an overflow occurred DIV divide the 16 bit 2s complement number at the top stack location SP (the dividend) by the 16 bit 2s complement number at the location just under the top location SP+1 (the divisor), and push on two new locations with SP-1 having the (unsigned) remainder of the division and SP-2 (new top of stack) having the 16 bit 2s complement quotient. If the absolute value of the divisor is greater than the absolute value of the dividend, the quotient should be set to 0 and the (unsigned) remainder set to the absolute value of the dividend, and if the divisor is equal to 0 (this is an illegal case) the remainder should be set to -1 and the quotient should be set to 0. After the operation, the accumulator must be set to 0 if the division was legal, and -1 if an attempt to divide by 0. The approach we'll use here is to extend the op-code field from 7 bits (as used in the INSP and DESP instructions for example) to a total of 10 bits, using the eighth bit as a gateway (i.e., bit-on a means to break out to a 10 bit op-code, while bit-off means a 7 bit op-code) Since bit 8 is used as a gateway, the 10 bit op-code will provide us with 4 new combinations, and we'll use them as follows 1111111 1 00 mmmmmm for MULT (6 bit multiplier field mmmmmm as operand)

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!