A barrel shifter is a digital circuit that can shift a data word by a specified number of bits in one clock cycle. It can be implemented as a sequence of multiplexers (mux.), and in such an implementation the output of one mux is connected to the input of the next mux in a way that depends on the shift distance.
For example, take a four-bit barrel shifter, with inputs A, B, C and D. The shifter can cycle the order of the bits ABCD as DABC, CDAB, or BCDA; in this case, no bits are lost. That is, it can shift all of the outputs up to three positions to the right (and thus make any cyclic combination of A, B, C and D). The barrel shifter has a variety of applications, including being a useful component in microprocessors (alongside the ALU).
Read more about Barrel Shifter: Implementation, Cost, Uses
Famous quotes containing the word barrel:
“I do not know if you remember the tale of the girl who saves the ship under mutiny by sitting on the powder barrel with her lighted torch ... and all the time knowing that it is empty? This has seemed to me a charming image of the women of my time. There they were, keeping the world in order ... by sitting on the mystery of life, and knowing themselves that there was no mystery.”
—Isak Dinesen [Karen Blixen] (18851962)