Electronic Circuits - Electronic Tutorials - Electronic Hobby Projects - A Complete Electronic Resource Centre

MICROCONTROLLER TUTORIALS - 8052

Videos

Products

Sitemap

Circuits

Tutorials

8051

Introduction

Chapter 1
Types of Memory

Chapter 2
Special Function Registers

Chapter 3
Basic Registers

Chapter 4
Addressing Modes

Chapter 5
Program Flow

Chapter 6
Low Level Information

Chapter 7
Timers

Chapter 8
Serial Port Operations

Chapter 9
Interrupts

Additional Features in 8052

8052 Instruction Set

8051 / 8052 Microcontroller
Instruction Set 
CPL - Complement Register

Operation: CPL
Function: Complement Register
Syntax: CPL operand

 

Instructions OpCode Bytes Cycles Flags
CPL A 0xF4 1 1 None
CPL C 0xB3 1 1 C
CPL bit addr 0xB2 2 1 None

 

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.

See Also: CLR, SETB, Instruction Set

 
  <<< Click here to come back on (8051 / 8052 - Instruction Set)
 

<<<<  Back to 8051 / 52  Microcontroller Tutorial