Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

image text in transcribed

image text in transcribed

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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Oracle PL/SQL Programming Database Management Systems

Authors: Steven Feuerstein

1st Edition

978-1565921429

More Books

Students also viewed these Databases questions