You have to write a program in the machine language used by the SIM virtual computer simulator package to compute the sum of the four numbers stored in memory addresses A1, A2, A3 and A4. First, you introduce four hexadecimal numbers in 2's complement notation in the corresponding addresses; your program must get these numbers, calculate the sum of all the numbers and store the result of the addition at memory location A5. est Data and Results
Run your program with different set of numbers positive and negatives. See below two examples of what you need to do to create your test data:
Decimal numbers Hexadecimal Numbers Operation Expected Result Actual Result
(result obtained by the SIM program)
20, 30, 10, 15 14, 1E, 0A, 0F 20+30+10+15 = 75 4B
2, -5, 7, -12 02, FB, 07, F4 2-5+7-12=-8 F8