cpl
Complement A
Inverts every bit of A, giving its one's complement.
1 byte · 4 cycles
Used in
- 8-bit and 16-bit arithmetic, logic and bitsZ80 assembly
SZHP/VNC ––1–1–
- 1 always 1
- – not changed
Forms
cplThe contents of A are inverted (one's complement).
.org 0x8000
ld a, 5
cpl
halt