ROR

ROR R[x], R[y] - Bit - Rotation to the right

 

Operating Mode

 

R[x] := R[y] after rotating one position right, with old Carry at the beginnning

PC := PC + 1

 

Description

 

Rotates all Bits of R[y] one position to the right and fills up with Carry - Bit at the beginning.

Saves result to register R[x].

 

Status Register

 

Carry - Bit := last Bit of R[y] before shifting

Zero - Bit := 1 if old Carry and first 15Bit of R[y] are 0

 

Binary Command

15 14 13 12 11

10 9 8

7 6

5 4 3

2 1 0

10101

Adr(x)

--

Adr(y)

---

Example

 

ROR R[3], R[6]   

15 14 13 12 11

10 9 8

7 6

5 4 3

2 1 0

10101

011

--

110

---

Note
Arithmetic and Logical Commands always affect the Status Bits Carry and Zero.