Barrel Shifter

Why Trust Techopedia

What Does Barrel Shifter Mean?

A barrel shifter is a specialized digital electronic circuit with the purpose of shifting an entire data word by a specified number of bits by only using combinational logic, with no sequential logic used. The simplest way of achieving this is by using a series of multiplexers where one output is connected to the input of the next multiplexer in the chain, in a specific manner that depends on the amount of shift specified.

Advertisements

Techopedia Explains Barrel Shifter

Barrel shifters are specialized electronic circuits used to shift the bits of binary data and often employed by embedded digital signal processors and other general-purpose processors in order to manipulate data. Data shifting is required for various low-level data applications such as floating-point arithmetic operations, bit indexing and variable-length coding. A barrel shifter is able to complete the shift in a single clock cycle, giving it a great advantage over a simple shifter which can shift n bits in n clock cycles. It is used in conjunction with a processor’s arithmetic logic unit (ALU) or otherwise embedded in the ALU itself.

A barrel shifter is able to shift the bits of binary data by moving it from one multiplexer to the next, with the supported number of bits dictated by how many multiplexers are used.

The formula for determining how many multiplexers are required is n log2(n) where n is the number of bits supported. So for an 8-bit barrel shifter the calculation is 8 × log2(8) = 8 × 3 = 24.

Advertisements

Related Terms

Margaret Rouse
Technology expert
Margaret Rouse
Technology expert

Margaret is an award-winning writer and educator known for her ability to explain complex technical topics to a non-technical business audience. Over the past twenty years, her IT definitions have been published by Que in an encyclopedia of technology terms and cited in articles in the New York Times, Time Magazine, USA Today, ZDNet, PC Magazine, and Discovery Magazine. She joined Techopedia in 2011. Margaret’s idea of ​​a fun day is to help IT and business professionals to learn to speak each other’s highly specialized languages.