Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Hi I'm trying to solve these questions using machine language: 1. 24-12 2. -125-30 I decided to change the negative numbers to hex signed 2
Hi I'm trying to solve these questions using machine language:
1. 24-12 2. -125-30
I decided to change the negative numbers to hex signed 2 compliment form to solve the questions. Is that the best way to go? I feel like there should be a better way. Also in question 2 I only get the result FF instead of FF65. How do I fix that?
This is a picture of the codes.
Here are the codes: 1R:XY Load register R with bit pattern in memory cell with adress XY 2R:XY Load register R with bit pattern XY 3R:XY Store bit pattern in register R in memory cell with adress XY 40:RS Move bit pattern in register R in register S 5R:ST Add bit pattern in register S and T. Put the result in register R. Bit pattern is supposed to be in 2-complement. 6R:ST Add bit pattern in register S and T. Put the result in register R. 7R:ST OR the bit patterns in register S and T. Put the result in register R. 8R:ST AND the bit patterns in register S and T. Put the result in register R. 9R:ST XOR the bit patterns in register S and T. Put the result in register R. AR:OX Rotate bit pattern in register R one bit to the right X times. BR:XY Jump to memory cell with adress XY if bit pattern in register R is equal to bit pattern in register 0 . C0:00 Halt the program DR:0X Shift bit pattern in register R one bit to the left X times. ER:OX Shift bit pattern in register R one bit to the right X times. Memory Memory Control Unit Registers
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