Barrel shifter
From Free net encyclopedia
A barrel shifter is a digital circuit that can shift a data word by any number of bits in a single operation. It is implemented like a multiplexer: each output can be connected to any input depending on the shift distance.
Take for example a four-bit barrel shifter, with inputs A, B, C and D. The shifter can cyclically alter the order of the outputs. That is, it can 'shift' all of the outputs up to three units to the right (and thus make any cyclic combination of A, B, C and D). Barrel shifters have a variety of applications, including being a vital component in micro-processors (alongside the ALU).
The barrel shifter is vital in floating point arithmetic hardware operations. For a floating point add or subtract operation, the mantissas of the numbers must be aligned, which requires shifting one of them to match the other. If a conventional shifter is used, shifting a 32-bit number, in a worst-case scenario, would require 32 clock cyles, creating a significant overhead.
External links
- Google Answers has a good explanation, and collection of links
References
- This article was originally based on material from the Free On-line Dictionary of Computing, which is licensed under the GFDL.