![]() |
VOOZH | about |
An Arithmetic Logic Shift Unit (ALSU) is an enhanced version of the Arithmetic Logic Unit (ALU) used in computer systems. It is a combinational digital circuit capable of performing arithmetic, logic, and shift micro-operations on binary data, and is a core part of the CPU datapath.
Rather than having registers perform micro-operations independently, the system routes their data to a central ALSU via a common bus. The operation is completed in a single clock pulse, and the result is stored in a destination register.
An ALSU integrates three primary sub-units: the arithmetic unit, the logic unit, and the shift unit. These sub-units work in parallel, and a multiplexer selects the final output based on control signals.
Operations within the ALSU are selected using five control inputs: S3 S2 S1 S0 (4-bit opcode) and Cin (carry-in). The result from the arithmetic, logic, or shift unit is chosen via a 4×1 multiplexer based on these control signals.
Shift operations are treated as special cases within ALSU and utilize neighboring bit values for computation. For left shift (SHL), the value of the next lower bit is used; for right shift (SHR), the next higher bit is used.
The ALSU is designed to perform 14 distinct operations using the control signals S3 S2 S1 S0 and Cin. These are logically grouped into arithmetic, logic, and shift operations.