Keil Logo Arm Logo

8051 Instruction Set Manual

CPL

The CPL instruction logically complements the value of the specified destination operand and stores the result back in the destination operand. Bits that previously contained a 1 will be changed to a 0 and bits that previously contained a 0 will be changed to a 1.

CPL A
C AC F0 RS1 RS0 OV   P
Bytes 1
Cycles 1
Encoding
11110100
Operation
CPL
A = NOT A
Example
CPL A
CPL bit
C AC F0 RS1 RS0 OV   P
Bytes 2
Cycles 1
Encoding
10110010 bit
Operation
CPL
(bit) = NOT (bit)
Example
CPL 55h
CPL C
C AC F0 RS1 RS0 OV   P
Bytes 1
Cycles 1
Encoding
10110011
Operation
CPL
C = NOT C
Example
CPL C

arm-logo-small

Keil logo
Important information

This site uses cookies to store information on your computer. By continuing to use our site, you consent to our cookies.