Nios® II Processor Reference Guide

ID 683836
Date 8/28/2023
Public
Document Table of Contents

2.3. Arithmetic Logic Unit

The Nios II ALU operates on data stored in general-purpose registers. ALU operations take one or two inputs from registers, and store a result back in a register. The ALU supports the data operations described in the table below. To implement any other operation, software computes the result by performing a combination of the fundamental operations.
Table 1.  Operations Supported by the Nios II ALU
Category Details
Arithmetic The ALU supports addition, subtraction, multiplication, and division on signed and unsigned operands.
Relational The ALU supports the equal, not-equal, greater-than-or-equal, and less-than relational operations (==, != >=, <) on signed and unsigned operands.
Logical The ALU supports AND, OR, NOR, and XOR logical operations.
Shift and Rotate The ALU supports shift and rotate operations, and can shift/rotate data by 0 to 31 bit positions per instruction. The ALU supports arithmetic shift right and logical shift right/left. The ALU supports rotate left/right.