How many times the ‘rl' instruction needs to be executed, in order to mimic the ‘swap' instruction in an 8051 microcontroller? 24 26 28 30?
Answers
Answered by
2
there r 9 times in an instruction gives by controller
Answered by
0
Answer:
The correct answer is - 4 times.
Explanation:
Many applications have a need to carry out a bitwise rotation of the operand. The 8051 microcontrollers also have rotation instructions like RR, RL, RRC, and RLC that have been specifically designed for this purpose. They give a program that allows the left or right rotation of the accumulator.A SWAP instruction has the higher and the lower nibble of a byte. Therefore, the RL command will have to be used 4 times. This will swap the higher nibble and the lower nibble exactly like it is for the SWAP instruction. However. using the using RL 4 times will take up 4 times more of the memory and the time.Similar questions