Questions: Barrel Shifter and Rotation Circuits

5 questions to test your understanding

Score: 0 / 5
Question 1 Multiple Choice

An 8-bit barrel shifter must shift its input by 6 positions. The shift amount 6 in binary is 110. Which stages activate?

AOnly the stage that shifts by 6
BThe 4-shift stage (bit 2 = 1) and the 2-shift stage (bit 1 = 1); the 1-shift stage passes through
CThe 4-shift stage and the 1-shift stage; the 2-shift stage passes through
DAll three stages activate since the shift is larger than 4
Question 2 Multiple Choice

A 32-bit barrel shifter uses a logarithmic decomposition. How many mux stages does it require, and how does this compare to a serial shift register performing a 31-position shift?

A32 stages vs. 31 clock cycles — roughly the same cost
B5 stages (log₂ 32) completing in 1 cycle vs. 31 clock cycles
C5 stages but requiring 5 clock cycles vs. 31 clock cycles — a 6x speedup
D32 stages each taking one half-cycle vs. 31 clock cycles — a slight speedup
Question 3 True / False

A barrel shifter requires multiple clock cycles to complete a shift — more cycles for larger shift amounts.

TTrue
FFalse
Question 4 True / False

The number of multiplexer stages in an n-bit barrel shifter grows as log₂(n), making the hardware cost scale sublinearly with word width.

TTrue
FFalse
Question 5 Short Answer

Explain why the logarithmic decomposition strategy used in a barrel shifter makes it both faster than a serial shifter and more area-expensive. What is the fundamental tradeoff?

Think about your answer, then reveal below.