Question: Hi! I'm trying to solve these questions using machine language: 1. 24-12 2. -125-30 I am suppost to covert these numbers to hexadecimal form in
Hi!
I'm trying to solve these questions using machine language:
1. 24-12 2. -125-30
I am suppost to covert these numbers to hexadecimal form in order to calculate it using tge program I'm using.
This is how I solved the first question.
24=0018 -12=FFF4
1010 1111 21F4 5101 3112 C000
Which gives the correct result of 0C.
This is how I tried solving the second one.
1010 1111 2083 21E2 5101 3112 C000
Which gives the result 65, when the result is suppost to be FF65.
Is there a way of getting the full result?

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
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
