Answered step by step
Verified Expert Solution
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: 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
Brookshears Appendix C
registers F memory cells FF bits each
bit instructions R S T register numbers values or addresses
tableOpcode,Operand,DescriptionRXYtableLOAD the register R with the bit pattern found in the memory cell whose address is XYExample: would cause the contents of the memory cell located at address A to beplaced in register RXYtableLOAD the register with the bit pattern Example: would cause the value to be placed in register RXYtableSTORE the bit pattern found in register in the memory cell whose address is XYExample: would cause the contents of register to be placed in the memory cellwhose address is BORS,tableMOVE the bit pattern found in register to register Example: would cause the contents of register to be copied into register RSTtableADD the bit pattems in registers and as though they were two's complementrepresentations and leave the result in register Example: would cause the binary values in registers and to be added and the sumplaced in register RSTtableADD the bit pattems in registers and as though they represented values in floatingpointnotation and leave the floatingpoint result in register Example: would cause the values in registers and to be added as floatingpointvalues and the result to be placed in register RSTtableOR the bit patterns in registers and and place the result in register Example: would cause the result of ORing the contents of registers and to beplaced in register RSTtableAND the bit pattems in registers and and place the result in register Example: would cause the result of ANDing the contents of registers and to beplaced in register RSTtableXOR the bit patterns in registers and and place the result in register Example: would cause the result of XORing the contents of registers and to beplaced in register AROX,tableROTATE the bit pattern in register one bit to the right times. Each time place the bit thatstarted at the loworder end at the highorder end.Example: would cause the contents of register to be rotated bits to the right in acircular fashion.BRXYtableJUMP to the instruction located in the memory cell at address XY if the bit pattem in register is equal to the bit pattern in register number Otherwise, continue with the normalsequence of execution. The jump is implemented by copying into the program counterduring the execute phase.Example: BC would first compare the contents of register with the contents of register If the two were equal, the pattern C would be placed in the program counter so that the nextinstruction executed would be the one located at that memory address. Otherwise, nothingwould be done and program execution would continue in its normal sequence.CtableHALT execution.Example: COO@ would cause program execution to stop.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started