You are on page 1of 1

MPI

 Difference between RLC and RAL instruction


1. **RLC (Rotate Left through Carry):**
- The RLC instruction is used to rotate the bits of a byte or a word to the left through the
Carry flag.
- It shifts all the bits one position to the left, and the most significant bit (bit 7 for an 8-bit
register) is rotated into the Carry flag, and the Carry flag is rotated into the least significant
bit position.
- Syntax: `RLC operand`
- Example (8085 assembly):
MOV A, 8Bh ; Move value to accumulator
RLC A ; Rotate left through carry
2. **RAL (Rotate Accumulator Left through Carry):**
- The RAL instruction is specifically used to rotate the bits of the accumulator to the left
through the Carry flag.
- Similar to RLC, but it only applies to the accumulator.
- Syntax: `RAL`
- Example (8085 assembly):
MOV A, 8Bh ; Move value to accumulator
RAL ; Rotate accumulator left through carry

You might also like