

Buses
In digital circuits, a bit bus (or simply bus) is a set of communication lines that carry data bits in parallel. It is used to interconnect different components of a system by transferring digital signals.
Bit shifting is a fundamental operation in data processing of a bus. It consists of moving all the bits of a register (or binary word) to the left or to the right.
Notation
In this section we will work with variables that represent binary numbers of
The range
Where
Example: Designing a 4-bit left-shift bus circuit
Suppose we work with binary data and need to move all the bits of a sequence one position to the left.
For example, 1010 binary is 10 in decimal:
If we shift left by one position we obtain 10100, which is equivalent to multiplying its value by 2.
A complete truth table for a high-number-of-bits
The following shows the truth table of a left-shifting circuit. The input is
| Input | Output |
|---|---|
| 0000 | 0000 |
| 0001 | 0010 |
| 0010 | 0100 |
| 0011 | 0110 |
| 0100 | 1000 |
| 0101 | 1010 |
| 0110 | 1100 |
| 0111 | 1110 |
| 1000 | 0000 |
| 1001 | 0010 |
| 1010 | 0100 |
| 1011 | 0110 |
| 1100 | 1000 |
| 1101 | 1010 |
| 1110 | 1100 |
| 1111 | 1110 |
Our objective is to design a 4-bit shift circuit. We have two options:
Use multiplexers, which are combinational circuits: This is the most common and flexible form for fixed or controlled shifts.
Use shift registers, which are sequential circuits and suitable for sequential shifts synchronised with a clock.
In this section we will use multiplexers. The circuit is the following:

The control signal
- If
, the output is equal to the input (no shifting). - If
, the multiplexers perform a left shift by one position.
For each output bit
- MUX for
- Input 0:
- Input 1:
- Output:
- Input 0:
- MUX for
- Input 0:
- Input 1:
- Output:
- Input 0:
- MUX for
- Input 0:
- Input 1:
- Output:
- Input 0:
- MUX for
- Input 0:
- Input 1:
(input bit) - Output:
- Input 0:
Exercises at Jutge.org: Introduction to Digital Circuit Design
Remember that to access the exercises and for the Judge to evaluate your solutions you must be enrolled in the course. You will find all the instructions here.



Xavier Casas, Francesc Madrid
Lliçons.jutge.org
© Universitat Politècnica de Catalunya, 2026
