Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Write an assembly code that subtract two numbers using 2s complement. In this case, we are performing the subtraction 10 7 = 3. 1) Store
Write an assembly code that subtract two numbers using 2s complement. In this case, we are performing the subtraction
10 7 = 3.
1) Store number 10 decimal in address 30H
2) Store number 3 decimal in address 31H
3) Copy the content of address 31H to A
4) Find the complement A, and store in A
5) Add 1 to A, and store in A (this is the 2s complement of A)
6) Add A and the content of address 30H(which is 10), and store in A
7) Move the content of A to address 32H (should be a 7)
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