What is barrel shifter?
A barrel shifter is a specialized digital electronic circuit with the purpose of shifting whole data word by a specified number of bits using only combinational logic without using sequential logic. The easiest way to accomplish this is to use a series of multiplexers with an output connected to the input of the next multiplexer in the chain in a specific way depending on the amount of shift specified.
Barrel shifters are specialized electronic circuitry used to shift the binary data bits and are often used by embedded digital signal processors and other general purpose processors to manipulate data. Data shifts are required for various low-level data applications, such as floating point arithmetic operations, bit indexing, and variable length coding. A barrel shifter is capable of shifting in a single one Clock cycle which gives it a huge advantage over a simple slider that can shift n bits in n clock cycles. It is used in conjunction with an arithmetic logic unit (ALU) of a processor or is otherwise embedded in the ALU itself.
A barrel shifter is able to shift the bits of binary data by shifting them from one multiplexer to the next, the supported number of bits being determined by the number of multiplexers used.