Question: ou are writing a Pep/9 simulator in a high-level language. You represent 16-bit registers by 16-element integer arrays thus int RegA (16], Regx [16]; Assuming

 ou are writing a Pep/9 simulator in a high-level language. You

ou are writing a Pep/9 simulator in a high-level language. You represent 16-bit registers by 16-element integer arrays thus int RegA (16], Regx [16]; Assuming the element [0] is the most significant bit and element [15] is the least significant bit, write (in Java or C or C++ or pseudocode) (a) code that performs an arithmetic left shift on register A (as represented by RegA), (b) Assume there are global integer variables Cbit, NBit, V bit and Zbit that represent the status bit values. How is your answer to (a) modified to set the Cbit and Vbit variables appropriately? (You do not need to be concerned with Nbit or Zbit.)

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!