6.3.1 Arithmetic Logic Unit (ALU)
The Arithmetic Logic Unit (ALU) supports arithmetic and logic operations between working registers or between a constant and a working register. Also, single-register operations can be executed.
The ALU operates in connection with all the 32 general-purpose working registers in the register file. The arithmetic operations between working registers or between a working register and an immediate operand execute in a single clock cycle, and the result is stored in the register file. After an arithmetic or logic operation, the CPU’s Status Register (SREG) is updated to reflect information about the result of the operation.
ALU operations are divided into three main categories – arithmetic, logical, and bit functions. Both 8- and 16-bit arithmetic are supported, and the instruction set allows for an efficient implementation of 32-bit arithmetic, while the hardware multiplier supports signed and unsigned multiplication and fractional formats.