...
Question 2540 – Computer-Organization
May 30, 2024
Question 7878 – Digital-Logic-Design
May 30, 2024
Question 2540 – Computer-Organization
May 30, 2024
Question 7878 – Digital-Logic-Design
May 30, 2024

Question 3685 – Computer-Organization

The content of the accumulator after the execution of the following 8085 assembly language program, is:
MVI A, 42H
MVI B, 05H
UGC: ADD B
DCR B
JNZ UGC
ADI 25H
HLT

Correct Answer: C

Question 456 Explanation: 
Step-1: MVI A, 42H given 42 value in hexadecimal and storing value in Accumulator A.
For solving problem, convert (42)​ 16​ into decimal is (66)​ 10
Step-2: MVI B, 05H given 05 value in hexadecimal and storing value in Accumulator B.
For solving problem, convert (05)​ 16​ into decimal is (05)​ 10
Step-3: ADD B until UGC will fail. Contents of accumulator A value and B value will add.
66+5=71
Step-4: DCR B it means decrement by 1.
71+4=75
Step-5: JNZ means jump not equals to zero.
75+3=78
78+2=80
80+1=81
Step-6: It became false, then execute next statement.
ADI 25H means add 25H to (81)​ 10
(25)​ 16​ = (37)​ 10
37+81=(118)​ 10
Finally
convert decimal value into Hexadecimal.
(118)​ 10​ = (76)​ 16
Step-7: HLT means halt the program.
Note: We are converting hexadecimal into decimal for only calculation. without conversion also we can solve a problem.
A
82 H
B
78 H
C
76 H
D
47 H
0 0 votes
Article Rating
Subscribe
Notify of
0 Comments
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x
error: Alert: Content selection is disabled!!