Answered step by step
Verified Expert Solution
Link Copied!
Question
1 Approved Answer

Using the model CPU demonstrated in class, write code using the simple machine language of the Language Description Table to solve the following problem: (

Using the model CPU demonstrated in class, write code using the simple machine language of the Language Description Table to solve the following problem: (17+9)*6. Store the result in memory location EE. Your code must include a loop, meaning it needs to have a conditional and unconditional jump. Do not forget to convert the decimal values into hex when writing the code.Language Description Table
(Brookshear's Appendix C)
16 registers [0..F]256 memory cells [00..FF](8 bits each)
16-bit instructions (4+12) R, S, T = register numbers x,Y= values or addresses
\table[[Op-code,Operand,Description],[1,RXY,\table[[LOAD the register R with the bit pattern found in the memory cell whose address is XY.],[Example: 14A3 would cause the contents of the memory cell located at address A 3 to be],[placed in register 4.]]],[2,RXY,\table[[LOAD the register R with the bit pattern xY.],[Example: 20A3 would cause the value A3 to be placed in register 0.]]],[3,RXY,\table[[STORE the bit pattern found in register R in the memory cell whose address is XY.],[Example: 35B1 would cause the contents of register 5 to be placed in the memory cell],[whose address is B1.]]],[4,ORS,\table[[MOVE the bit pattern found in register R to register S.],[Example: 40A4 would cause the contents of register A to be copied into register 4.]]],[5,RST,\table[[ADD the bit pattems in registers S and T as though they were two's complement],[representations and leave the result in register R.],[Example: 5726 would cause the binary values in registers 2 and 6 to be added and the sum],[placed in register 7.]]],[6,RST,\table[[ADD the bit pattems in registers S and T as though they represented values in floating-point],[notation and leave the floating-point result in register R.],[Example: 634E would cause the values in registers 4 and E to be added as floating-point],[values and the result to be placed in register 3.]]],[7,RST,\table[[OR the bit patterns in registers S and T and place the result in register R.],[Example: 7CB4 would cause the result of OR-ing the contents of registers B and 4 to be],[placed in register C.]]],[8,RST,\table[[AND the bit pattems in registers S and T and place the result in register R.],[Example: 8045 would cause the result of AND-ing the contents of registers 4 and 5 to be],[placed in register 0.]]],[9,RST,\table[[XOR the bit patterns in registers S and T and place the result in register R.],[Example: 95F3 would cause the result of XOR-ing the contents of registers F and 3 to be],[placed in register 5.]]],[A,ROX,\table[[ROTATE the bit pattern in register R one bit to the right x times. Each time place the bit that],[started at the low-order end at the high-order end.],[Example: A403 would cause the contents of register 4 to be rotated 3 bits to the right in a],[circular fashion.]]],[B,RXY,\table[[JUMP to the instruction located in the memory cell at address XY if the bit pattem in register],[R is equal to the bit pattern in register number 0. Otherwise, continue with the normal],[sequence of execution. (The jump is implemented by copying xY into the program counter],[during the execute phase.)],[Example: B43C would first compare the contents of register 4 with the contents of register 0.],[If the two were equal, the pattern 3C would be placed in the program counter so that the next],[instruction executed would be the one located at that memory address. Otherwise, nothing],[would be done and program execution would continue in its normal sequence.]]],[C,,\table[[HALT execution.],[Example: COO@ would cause program execution to stop.]]]]
image text in transcribed

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_2

Step: 3

blur-text-image_3

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

Data And Databases

Authors: Jeff Mapua

1st Edition

1978502257, 978-1978502253

More Books

Students explore these related Databases questions