AND
Binary AND
\(A \longleftarrow A \land s\)
7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 | |
---|---|---|---|---|---|---|---|---|
AND r | ||||||||
1 | 0 | 1 | 0 | 0 | r | |||
AND n | ||||||||
1 | 1 | 1 | 0 | 0 | 1 | 1 | 0 | E6 |
n | ||||||||
AND(HL) | ||||||||
1 | 0 | 1 | 0 | 0 | 1 | 1 | 0 | A6 |
AND (IX+d) | ||||||||
1 | 1 | 0 | 1 | 1 | 1 | 0 | 1 | DD |
1 | 0 | 1 | 0 | 0 | 1 | 1 | 0 | A6 |
d | ||||||||
AND (IY+d) | ||||||||
1 | 1 | 1 | 1 | 1 | 1 | 0 | 1 | FD |
1 | 0 | 1 | 0 | 0 | 1 | 1 | 0 | A6 |
d |
Register | r |
---|---|
B | 000 |
C | 001 |
D | 010 |
E | 011 |
H | 100 |
L | 101 |
A | 111 |
Flags Affected
Flags |
| ||||||||
---|---|---|---|---|---|---|---|---|---|
s | set if result negative | ||||||||
z | set if result is 0 | ||||||||
h | set | ||||||||
p/v | set if overflow | ||||||||
c | reset |
Opcode Matrix
A | B | C | D | E | H | L | (HL) | (IX+d) | (IY+d) | n | |
---|---|---|---|---|---|---|---|---|---|---|---|
A |
AND A,A
A714 |
AND A,B
A014 |
AND A,C
A114 |
AND A,D
A214 |
AND A,E
A314 |
AND A,H
A414 |
AND A,L
A514 |
AND A,(HL)
A617 |
AND A,(IX+d)
DDA6nn319 |
AND A,(IY+d)
FDA6nn319 |
AND A,n
E6nn27 |
Instruction
Opcode hexSize bytesCycle count
| Register | Memory | Implicit |
Last modified November 16, 2021: Add flags to math operations (63d34c2)