View Source Chip8.Interpreter.Instruction.ADD (chip8 v1.0.0)

Adds the first operand with the second operand.

This operation always returns an 8-bit number, that is stored in the first operand. When an _overflow happens, the result is always wrapped to fit into the specified size.

In some variants a carry bit is also returned, when an overflow happens the carry bit will be 1, and 0 otherwise.

variants

Variants

OpcodeMnemonicDescription
7xkkADD Vx, byteSet Vx = Vx + byte.
8xy4ADD Vx, VySet Vx = Vx + Vy and VF = carry.
Fx1EADD I, VxSet I = I + Vx.