The 6516 contains an ALU capable of performing arithmetical and logical operations on one or two data inputs. The ALU is also capable of returning flags which can indicate the outcome of an operation.

Inputs and Outputs

The ALU consists of the following input buses:

Two output buses:

Operations

The following operations are supported by the ALU:

ALU Operations

Flags

The ALU has four flags: ZERO, CARRY, OVERFLOW and NEGATIVE, arranged as follows on the flags-out bus:

0 - ZERO
1 - OVERFLOW
2 - CARRY
3 - NEGATIVE

These are set after each operation — it is up to the CPU to decide if it should pull these values into the FLAGS register.