and

Sizes

byte, word, long

Default Size

word

Affected Flags

X
N
Z
V
C
-
✱
✱
0
0

Operands

Op 1
Dn/(An)/d(An)/d(An,Xn)/Ea/<label>/d(PC)/d(PC,Xn)/Im
Op 2
Dn/(An)/d(An)/Ea/<label>/d(An,Xn)

Performs a logical AND between the first and second operand, stores the result in the second operand

move.l #%11110000, d0
move.l #%10101010, d1
and.b d1, d0 ; d0 = %10100000

* --- Use for masking (keeping specific bits) ---
move.l #$ABCD, d2
and.w #$00FF, d2 ; keep low byte only: d2 = $00CD