Logical Group in 8051
The Logical Group in the 8051 microcontrollers has been divided into 25 different instructions. There is a Carry Flag (CY) which directly affects the instructions of the RRC and RLC in this particular microcontroller. Here are the all instruction groups of the 8051 microprocessor as mentioned below.
Instruction | Operation | Description | Example |
---|---|---|---|
ANL | AND | Logical AND between operands. | ANL A, #0x0F |
ANL | AND | Logical AND between accumulator and direct address. | ANL 20H, A |
ANL | AND | Logical AND between direct address and source operand. | ANL 20H, #0x0F |
ORL | OR | Logical OR between operands. | ORL A, #0xF0 |
ORL | OR | Logical OR between accumulator and direct address. | ORL 20H, A |
ORL | OR | Logical OR between direct address and source operand. | ORL 20H, #0xF0 |
XRL | XOR | Logical XOR between operands. | XRL A, #0xFF |
XRL | XOR | Logical XOR between accumulator and direct address. | XRL 20H, A |
XRL | XOR | Logical XOR between direct address and source operand. | XRL 20H, #0xFF |
CPL | Complement | Complements all bits in the accumulator. | CPL A |
CPL | Complement | Complements the specified bit. | CPL P1.0 |
CLR | Clear | Clears all bits in the accumulator. | CLR A |
CLR | Clear | Clears the specified bit. | CLR P1.0 |
SETB | Set Bit | Sets the specified bit. | SETB P1.0 |
MOV | Move | Moves the carry flag to the specified bit. | MOV P1.0, C |
MOV | Move | Moves the specified bit to the carry flag. | MOV C, P1.0 |
Given below is the block diagram of 8051 microcontroller :
Logical Group in 8051
The 8051 microcontroller always operates on a single bit in a particular memory or register. The location of the bits is specific and it is specified as an offset value in the operand’s low-order end. In this article, we will discuss the logical groups or the logical instructions of the 8051 microcontroller in detail.
Table of Content
- Logical Group in 8051
- Advantages
- Disadvantages
- Applications