Presentation is loading. Please wait.

Presentation is loading. Please wait.

Boolean Operations This group of instructions is associated with the single-bit operations of the 8051. This group allows manipulating the individual bits.

Similar presentations


Presentation on theme: "Boolean Operations This group of instructions is associated with the single-bit operations of the 8051. This group allows manipulating the individual bits."— Presentation transcript:

1 Boolean Operations This group of instructions is associated with the single-bit operations of the 8051. This group allows manipulating the individual bits of bit addressable registers and memory locations as well as the CY flag. The P, OV, and AC flags cannot be directly altered. This group includes: Set, clear, and, or complement, move. Conditional jumps. 8-Nov-18 Micro 8051

2 Boolean Operations CLR SETB CPL Clear a bit or the CY flag.
CLR P1.1 CLR C SETB Set a bit or the CY flag. SETB A.2 SETB C CPL Complement a bit or the CY flag. CPL 40H ; Complement bit 40 of the bit addressable memory Micro 8051 8-Nov-18

3 Boolean Operations ORL / ANL MOV OR / AND a bit with the CY flag.
ORL C, 20H ; OR bit 20 of bit addressable memory with the CY flag ANL C, /34H ; AND complement of bit 34 of bit addressable memory with the CY flag. MOV Data transfer between a bit and the CY flag. MOV C, 3FH ; Copy the bit 3F of the bit addressable memory to CY flag . MOV P1.2, C ; Copy the CY flag to bit 2 of P1. 8-Nov-18 Micro 8051

4 Boolean Operations JC / JNC JB / JNB JBC
Jump to a relative address if CY is set / cleared. JB / JNB Jump to a relative address if a bit is set / cleared. JB ACC.2, <label> JBC Jump to a relative address if a bit is set and clear the bit. Micro 8051 8-Nov-18

5 Boolean Operations CLR C Clear carry flag 1 1
CLR bit Clear direct bit SETB C Set carry flag SETB bit Set direct bit CPL C Complement carry flag 1 1 CPL bit Complement direct bit 2 1 ANL C, bit AND direct bit to carry flag ANL C,/bit AND complement of direct bit to carry 2 2 ORL C, bit OR direct bit to carry flag ORL C,/bit OR complement of direct bit to carry MOV C, bit Move direct bit to carry flag MOV bit, C Move carry flag to direct bit 8-Nov-18 Micro 8051


Download ppt "Boolean Operations This group of instructions is associated with the single-bit operations of the 8051. This group allows manipulating the individual bits."

Similar presentations


Ads by Google