8-Bit Barrel Shifter Using Mux
8-Bit Barrel Shifter Using Mux
Presentation On
“ 8 Bit Barrel Shifter using Multiplexers”
Guided by: Presented by :
Dr. Ashish Kumar 1. Nikita Marndi
Asst. Professor 2. Krishna Kumar Sahu
Dept. of Electronics & Communication Eng. 3. Shubham Chandra
02/11/2024 Dept. of Electronics & Communication Engineering 1
Contents
1. Introduction
2. Block Diagram
3. Internal Operation
4. Flow Chart
5. Verilog Code
6. Test Bench
7. Simulation Waveform
8. Applications
9. Conclusion
10. References
What is a Shifter?
• It is digital circuit that is used for arithmetic shifting, logical shifting and rotation functions.
• It is commonly used in arithmetic operations and bit manipulation.
• Logical shifter, Barrel Shifter and Funnel shifter are different examples of Shifter circuits.
• If the input is a = 8’b10101010; shifting for 3 bit i.e,b = 3’b001 and dir = 0 for left shifting
the output is y = 8’b01010101.
• In barrel shifter, instead of shifting by 1 positions repeatedly, the control logic shifts the input
directly by 3 positions in 1 cycle.
For n bit number, number of 2:1 mux required for barrel shifter is n*log2(n).
For 8 bit : 8*log2(8) = 24 mux
Here input [7:0]a = 10101010, for 1 bit left shift we are getting output [7:0]y = 01010101
02/11/2024 Dept. of Electronics & Communication Engineering 7
Verilog Code
1. Signal Processing: Used in digital signal processing (DSP) for fast manipulation of data in Fourier transforms and filtering.
2. Graphics Processing: In video and image processing, shifting operations are needed for scaling, rotation, or manipulation
of pixel data, and barrel shifters can be used to perform these processes.
3. Processors/ALUs: Barrel shifters are used in processors for faster arithmetic and bit manipulation operations. For example,
they are used in multiplication, division, and other arithmetic operations that involve shifting.
4. Cryptography: Many cryptographic algorithms require fast bitwise operations, such as rotation and shifting, which can be
1. Efficient Bit Shifting: The 8-bit barrel shifter allows for fast shifting of data by multiple positions in a single clock cycle.
2. MUX-Based Design : The use of multiplexers simplifies the circuit and enables shifts of large magnitudes with minimal
hardware.
3. Versatility : Can be used for both left and right shifts by modifying the control logic. Suitable for a variety of digital
systems and hardware requiring rapid data manipulation.
4. Real-World Applications : Widely used in processors, cryptographic systems, digital signal processors (DSPs), and
floating-point arithmetic operations.
The barrel shifter is an important component in modern digital circuits, offering a balance between speed and simplicity,
with applications in various fields of computing and electronics
1. S. B. Jondhale, T. S. Mulla, and Sachin Patil Patil, “Design and Implementation of 8 Bit Barrel Shifter Using 2:1
Multiplexer in Verilog,” Journal of Advances in Science and Technology, vol. 12, 2016.