CodiodeCodiode
Home
Problem Solving
Skill Tracks
My Assignments
Contests
Leaderboard
Community
Settings
Codiode/Problems/Arithmetic

Logarithmic Barrel Shifter Left

MediumLogic CircuitBuild

High-performance ALUs and memory alignment units require fast, wide data shifts without consuming massive silicon area. The logarithmic barrel shifter achieves this by cascading multiplexer stages based on the binary weight of the shift control signal.

The circuit performs a 4-bit logical left shift on data inputs D3, D2, D1, and D0 by the amount specified by S1 and S0. Zeros must be shifted into the lower bits.

| S1 | S0 | Y3 | Y2 | Y1 | Y0 | |------|------|------|------|------|------| | 0 | 0 | D3 | D2 | D1 | D0 | | 0 | 1 | D2 | D1 | D0 | 0 | | 1 | 0 | D1 | D0 | 0 | 0 | | 1 | 1 | D0 | 0 | 0 | 0 |

Constraints

  • Use exactly two stages of 2-to-1 multiplexers.
  • Do not use sequential elements or clock signals.
  • Do not use N-to-1 multiplexers wider than 2-to-1.

Topics

Combinational LogicMultiplexersShifters

Solve this problem

Place the gates, wire them up and watch the signals settle. Every submission runs on the same simulation engine that grades it.

This problem is part of Codiode Pro. The statement above is free to read.

Sign in to solveSee what Pro unlocks

The circuit builder and code editor need a desktop screen. On a phone, read the problem here and open it on a laptop to solve.

Related problems

  • Half Adder Using Only XOR and ANDEasy
  • Floating Point Exception FlagsMedium
  • 1-Bit ALU SliceMedium
  • 4-bit Carry Lookahead BlockHard
  • BCD Adder Correction BlockMedium
  • IEEE 754 Mantissa Alignment ShifterHard
  • Four-Bit Bus AdderEasy
  • Debugging Twos Complement OverflowMedium

Browse all problems · Learning tracks