Discussion
In an 8085 microprocessor, the accumulator contains AAH and CY = 0. If the RAL instruction is executed twice, what will be the data in the accumulator?
Answer: D
RAL rotates the accumulator one bit to the left through the carry flag: the most significant bit goes into CY, and the old CY goes into bit 0.
\[ \text{AAH} = 1010\ 1010,\quad CY = 0 \]
After the first RAL: the accumulator is \(0101\ 0100 = 54\text{H}\) and CY = 1.
After the second RAL: the accumulator is \(1010\ 1001 = \text{A9H}\) and CY = 0.
The value AAH would result from rotating by 8 positions through the carry, 9AH and 99H come from wrong rotations. The answer is A9H, option D.
Post your comment
Please log in or register to post a comment.
Examination Categories
- SSC Exams
- Banking Exams
- Teaching Exams
- Civil Services Exams
- Railways Exams
- Engineering Recruitment Exams
- Defence Exams
- State Government Exams
- Police Exams
- Insurance Exams
- Nursing Exams
- Other Government Exams
- NRA CET
- PG Entrance Exams
- Campus Placement
- MBA Entrance Exams
- CUET and UG Entrance
- Judiciary Exams
- Regulatory Body Exams
- Software Development