# Instruction type RRC in 8085 Microprocessor

Microprocessor8085

#### Microprocessor 8085

50 Lectures 6.5 hours

In 8085 Instruction set, RRC stands for “Rotate Right Accumulator”. With the help of this instruction, we can rotate the Accumulator current content to the right by 1-bit position. The following Fig. will depict the rotation operation.

In this right rotation, the least significant bit will come out from the Accumulator and will be copied to Cy bit in the flag register and also will be copied to the most significant bit position of the Accumulator. Notice that the Cy flag is not involved in the rotation, and it is only 8-bit rotation of Accumulator contents. Only Cy flag is affected by this instruction execution.

Mnemonics, Operand Opcode(in HEX) Bytes
RRC 0F 1

This instruction can be used in multiple following operations −

• To check the value of the least significant bit value of the Accumulator through the value of the cy bit.

• It can be used to perform division by 2. We know that Accumulator’s content will have n-bits right shift if we divide the Accumulator by 2n.

The execution of this instructions has been depicted through following examples −

## Example 1

Before After

(A)

8AH 45H

(Cy)

Any Value 0

8AH --->    1000 1010
0100 0101 ---> 45H (Last bit 0 is copied to Cy bit)


2002 0F RRC Rotate Right Accumulator

Note that Accumulator value is halved.

## Example 2

Before After

(A)

8BH C5H

(Cy)

Any Value 1

8AH --->    1000 1011
1100 0101 --->C5H (Last bit 1 is copied to Cy bit)


2002 0F RRC Rotate Right Accumulator

Note that Accumulator value is not halved in this case because LS bit of Accumulator was a 1 before rotation.

The timing diagram against this instruction RRC execution is as follows −

Summary − So this instruction RRC requires 1-Byte, 1-Machine Cycle (Opcode Fetch) and 4 T-States for execution as shown in the timing diagram.

Updated on 30-Jul-2019 22:30:23