RAR

 

Syntax: RAR
 
Byte: 1byte
 
Addressing Mode: Implicit Addressing

Working: 
1. This is one byte instruction.
2. Microproccessor will allocate one byte for opcode RAR and operand is Accumulator i.e. operand will not need memory allocation during execution.
3. This instruction rotates content of Accumulator one bit position towards Right.  i.e. The bit A0 is stored  in carry flag and content of carry flag will get stored in A7 bit position.
 
4. C Flag will get affected.

Example: RAR
 
where  [A]= 21H
After execution of RAR
[A] = 90H
 
 
A= 21 =  0010 0001

A7 ->  A6 -> A5 -> A4 -> A3 -> A2 -> A1 -> A0   -> Cy 
 |___<-____________________________<-________|
 
0         0         1        0       0         0       0         1         1             .....(INITIAL BIT POSITIONS)
1         0         0        1       0         0       0        0           1
                                                                                                .....(RESULTANT BIT POSITIONS)
              9                                        0        
 

Comments