8051 instruction :: Cpl

CPL


Operation:CPL
Function:Complement Register
Syntax:CPL operand

InstructionsOpCodeBytesCyclesFlags
CPL A0xF411None
CPL C0xB311C
CPL bit addr0xB221None


Description: CPL complements operand, leaving the result in operand. If operand is a single bit then the state of the bit will be reversed. If operand is the Accumulator then all the bits in the Accumulator will be reversed. This can be thought of as "Accumulator Logical Exclusive OR 255" or as "255-Accumulator." If the operand refers to a bit of an output Port, the value that will be complemented is based on the last value written to that bit, not the last value read from it.









Post Your Comments Here :
 


User Login

Username :


Password :