8051 Instruction Set Manual

ADD

The ADD instruction adds a byte value to the accumulator and stores the results back in the accumulator. Several of the flag registers are affected.

See Also: ADDC, SUBB

ADD A, #immediate
CACF0RS1RS0OV P
Bytes2
Cycles1
Encoding
00100100immediate
Operation
A = A + immediate
Example
ADD A, #03h
ADD A, @Ri
CACF0RS1RS0OV P
Bytes1
Cycles1
Encoding
0010011i
Operation
A = A + (Ri)
Example
ADD A, @R1
ADD A, direct
CACF0RS1RS0OV P
Bytes2
Cycles1
Encoding
00100101direct
Operation
A = A + (direct)
Example
ADD A, 20h
ADD A, Rn
CACF0RS1RS0OV P
Bytes1
Cycles1
Encoding
00101nnn
Operation
A = A + Rn
Example
ADD A, R0