A barrel shifter moves a machine word by a variable number of bit positions through a bounded-depth combinational logic circuit. For a -bit machine word, cascade banks of multiplexers selecting optional shifts of . The binary shift-amount bits select the stages; the chosen distances add. Logical shifts fill vacated positions with zero, whereas bit rotations reconnect the discarded positions. A 32-bit logical barrel shifter can use five banks of 32 two-input multiplexers.

Articles by others on the same topic (1)

A barrel shifter is a digital circuit typically used in computer architecture, specifically in the context of arithmetic logic units (ALUs) and microprocessors. Its primary function is to perform bitwise shifting and rotation operations on binary values. The term "barrel" refers to the ability of the circuit to shift or rotate data in a single clock cycle, allowing for efficient manipulation of bits.