NEG

Operation

A <- 0 - A

Mnemonic

NEG

Operands

None

b7b6b5b4b3b2b1b0
1 1 1 0 1 1 0 1$ED
0 1 0 0 0 1 0 0$44

Description

The contents of the Accumulator are negated (two's complement). This method is the same as subtracting the contents of the Accumulator from zero.

NOTE:The $80 address remains unchanged.

Condition Bits Affected

Sis set if result is negative, otherwise it is reset.
Zis set if result is 0, otherwise it is reset.
His set if borrow from bit 4, otherwise it is reset.
P/Vis set if Accumulator was $80 before operation, otherwise it is reset.
Nis set.
Cis set if Accumulator was not $00 before operation, otherwise it is reset.

Example

If the Accumulator contains 1001 1000, then upon the execution of

	NEG

the Accumulator contains 0110 1000.