Barrel Shifter
Barrel Shifter
A barrel shifter is a digital circuit that performs arithmetic or logical shifts on binary data by rotating the data bits a specified number of positions. It is commonly used in computer architectures to improve performance by reducing the number of clock cycles required for certain operations.
What does Barrel Shifter mean?
A barrel shifter is a digital Circuit that can perform a shift operation on data in parallel, meaning it can shift all the bits in a data Word simultaneously. This is in contrast to a serial shifter, which shifts the bits one at a time. Barrel shifters are used in a variety of applications, including computer arithmetic, data manipulation, and cryptography.
Barrel shifters are typically implemented using a set of multiplexers. Each Multiplexer has two data inputs and a select input. The select input determines which of the data inputs is passed to the output. In a barrel shifter, the select inputs are connected to the shift amount. This allows the shifter to shift the data by the specified amount in a single clock cycle.
The size of a barrel shifter is determined by the number of bits it can shift. Common sizes include 8-bit, 16-bit, and 32-bit barrel shifters. The larger the barrel shifter, the more bits it can shift in a single clock cycle. However, larger barrel shifters are also more complex and require more hardware.
Applications
Barrel shifters are used in a variety of applications, including:
- Computer arithmetic: Barrel shifters are used to perform multiplication and division operations in computer arithmetic. Multiplication is performed by shifting the multiplicand left by the number of bits in the multiplier. Division is performed by shifting the dividend right by the number of bits in the divisor.
- Data manipulation: Barrel shifters are used to manipulate data in a variety of ways, such as rotating, extracting, and inserting bits.
- Cryptography: Barrel shifters are used in a variety of cryptographic algorithms, such as the Advanced Encryption Standard (AES).
History
The barrel shifter was first invented in the early 1950s by Seymour Cray. Cray was working on the CDC 6600, which was one of the first supercomputers. The CDC 6600 used a barrel shifter to perform multiplication and division operations.
Barrel shifters have since become an essential component in many digital circuits. They are used in a wide variety of applications, including computer arithmetic, data manipulation, and cryptography.