Barrel-shifter (8 bit)
The image above shows a thumbnail of the interactive Java applet embedded into this page. Unfortunately, your browser is not Java-aware or Java is disabled in the browser preferences. To start the applet, please enable Java and reload this page. (You might have to restart the browser.) Circuit Description
This applet demonstrates a multiplexer-based 8-bit barrel-shifter. The circuit allows shifting the input data word left, where the amount of shifting is selected via the control inputs. Several microprocessors include barrel-shifters as part of their ALUs to provide fast shift (and rotate) operations.
The circuit shown in the applet consists of three stages of 2:1
multiplexers, with one multiplexer per bit of the input data (here 8). When all multiplexer select inputs are inactive (low), the input data passes straight through the cascade of the multiplexers and the output data (Q7..Q0) is equal to the input data (D7..D0). When enabled via the SHL_1 input, the first stage of multiplexers performs a shift-left by one bit operation, due the their interconnection to the next-lower input. A low input value (0) is used for the least significant bit, so that the
shifter output becomes (Q6..Q1 0).