Question
Download Solution PDFAssume initial value of register A is 08 H, B is 07 H and carry flag is 0. What should be the sequence of 8085 code to make the value in B, thrice its original value? (Suffix H denotes hexadecimal number)
Answer (Detailed Solution Below)
Detailed Solution
Download Solution PDFConcept:
In the 8085 microprocessor, we use instructions like MOV, ADD, and RLC to manipulate register values.
We are given:
A = 08H,
B = 07H,
Carry Flag = 0
Our goal is: Make B = 3 × original B = 3 × 07H = 15H
Step-by-Step Instruction Execution:
Instruction 1: MOV A, B
This copies the content of B (07H) into register A.
Now: A = 07H, B = 07H
Instruction 2: RLC (Rotate Accumulator Left)
This rotates A one bit to the left.
A = 07H = 0000 0111 (binary)
After RLC: 0000 1110 = 0EH (14 in decimal)
Now: A = 0EH
Instruction 3: ADD B
Add contents of B (07H) to A (0EH):
0EH + 07H = 15H (21 in decimal)
Now: A = 15H
Instruction 4: MOV B, A
Copy the final result in A to B.
So B = 15H (final answer)
Conclusion:
The value in register B becomes three times its original value (07H × 3 = 15H).
Thus, the correct sequence is:
MOV A, B
RLC
ADD B
MOV B, A
Answer:
Option 2: MOV A, B → RLC → ADD B → MOV B, A
Last updated on May 30, 2025
-> The ISRO Technical Assistant recruitment 2025 notification has been released at the official website.
-> Candidates can apply for ISRO recruitment 2025 for Technical Assistant from June 4 to 18.
-> A total of 83 vacancies have been announced for the post of Technical Assistant.
-> The Selection process consists of a written test and a Skill test.
-> Candidates can also practice through ISRO Technical Assistant Electrical Test Series, ISRO Technical Assistant Electronics Test Series, and ISRO Technical Assistant Mechanical Test Series to improve their preparation and increase the chance of selection.