Multiplexers, Demultiplexers, and RTL
Multiplexers, Demultiplexers, and RTL
Sender end
Receiver end
Many to one
One to Many
MUX
A MUX (Multiplexer) is a combinational circuit that has 2n communication lines and a single
output line.
Basic Function: Combines multiple input signals into a single output signal.
● You press a button to choose whether the TV shows HDMI1, HDMI2, USB, or AV input.
● Only one input is displayed at a time, but multiple devices are connected.
Similarly, the MUX selects one input signal and sends it to a single output device.
Implementing Function using MUX
● Selection lines: S₁ = A, S₀ = B
001 010 101 111
● Inputs: I₀, I₁, I₂, I₃ depend on C
A B
Types of Multiplexers (MUX)
A multiplexer is represented as n:1,
Formula Reminder:
4:1 4 1 2
8:1 8 1 3
16:1 16 1 4
DEMUX (Demultiplexer)
A DEMUX takes one input and sends it to one of many outputs.
Which output is chosen depends on the selection lines.
Also known as a data distributor, since it takes a single input and distributes it to one of many outputs based on selection lines.
Basic Function: Splits a single input signal into multiple output signals.
Selection line:Used to select which output will receive the input signal.
Typical Applications:Data distribution, signal demultiplexing in communication systems, and serial-to-parallel conversion.
Simple Analogy
Selection line = Address The DEMUX has selection lines that decide
which output line will carry the input.
Output line = House
Types of DEMUX
A demultiplexer is represented as 1:n,
Formula Reminder:
1:4 1 4 2
1:8 1 8 3
1:16 1 16 4
Which output is chosen depends on the
selector lines (A, B).
The computer is the single If the selector lines are 10, the data is sent to
input (data source). the Color Inkjet Printer.
An encoder is a device that converts information from one format into another. In
digital electronics, encoders are logic circuits that convert a set of input signals into a
coded output, often a binary code.
● 4 to 2 Encoder
● Octal to Binary Encoder (8 to 3 Encoder)
● Decimal to BCD Encoder
● Priority Encoder
Encoder
Purpose: Converts 2ⁿ input lines into n output lines (binary form).
Main Use:
○ To reduce multiple inputs into a smaller number of bits for efficient data representation.
○ Used in digital circuits to convert information (like keys pressed on a keyboard) into a binary code.
○ Saves hardware wiring by encoding large input sets into compact binary outputs.
Example: A Decimal-to-Binary Encoder converts 10 decimal inputs into a 4-bit binary output.
Decoder
A decoder is a combinational logic circuit that converts coded binary input data
into a set of unique output signals. Essentially, it translates binary information from
a smaller number of input lines into a larger number of output lines.
Main Use:
○ Used in memory address decoding, where the binary address selects a particular memory location.
Example: A Binary-to-Decimal Decoder takes 4 input bits and activates one of the 16 output lines.
Register Transfer Language (RTL)
In symbolic notation, RTL is used to describe how data (micro-operations) is transferred from one register to
another.
Register Transfer:
When information is moved from one register to another, it is shown in symbolic form using the replacement
operator. This process is called register transfer.
Replacement Operator :
In the statement, R2 <- R1, <- acts as a replacement operator.
Example:
R1 ← R2
This means the contents of register R2 are copied into register R1.
Micro-operations
Micro-operations are the smallest basic operations performed on the data stored inside registers of a
computer.
● Example:
R1 ← R2 EXAMPLE
(Contents of R2 are copied into R1 always).
Simple Transfer : R2 <- R1
The content of R1 are copied into
R2 without affecting the content of
R1. It is an unconditional type of
transfer operation.
Conditional Transfer
● Data is transferred only if a certain condition is true.
● The condition is usually based on status flags (Zero, Carry, Sign, etc.).
● Example:
If (P = 1) then R1 ← R2
(Contents of R2 are copied into R1 only if condition P = 1 is satisfied).
Example:
If (Z = 1) then R3 ← R4
● This means:
○ If the last operation result was zero, then copy the contents of R4 into R3.
○ Otherwise, do nothing.
Conditional Transfer Control Circuit:
Notation (T : R2 ← R1):
Key Point:
A combinational circuit is a type of digital logic circuit where the output depends only on the current
inputs—not on any previous input or stored data. That means it has no memory and no feedback loops.
Key Characteristics:
•Output is determined solely by present input values.
•No clock signal is needed.
•No storage or memory element involved.
•Built using basic logic gates like AND, OR, NOT, NAND, NOR, XOR.
EXAMPLE
SYMBOLIC NOTATION FOR SHIFT
OPERATION
SYMBOLIC NOTATION FOR SHIFT OPERATION
LOGICAL SHIFT
1. AND (·)
○ Example: A·B
Truth Table:
Basic Operations
OR (+)
● Example: A + B
● Truth Table:
Basic Operations
NOT (’)
● Example: A’
● Truth Table:
Boolean Algebra Rules (Simplification)
AND .
OR +
Logic Gate Symbols
A + B’C
2. AND next:
○ Multiply (AND) B’ with C → B’·C.
3. OR last:
○ Add (OR) A with the result → A + (B’·C).
● A Flip-Flop is the basic sequential logic circuit used to store 1 bit of data (either 0 or 1).
● It has two stable states → so it’s also called a bistable device. (It has two stable states → ON (1) or OFF
(0).)
1. SR Flip-Flop (Set-Reset)
2. JK Flip-Flop
○ Inputs: J and K.
3. D Flip-Flop (Data/Delay)
4. T Flip-Flop (Toggle)
○ Used in counters.
S = 1, R = 0 → Set → Output becomes 1.
CLK ON
Output remains same as before.
VALUE : 1
0 0 0 0 (No Change)
0 0 1 1 (No Change)
0 1 0 0 (Reset → stays 0)
0 (Reset →
0 1 1
becomes 0)
1 (Set → becomes
1 0 0
1)
1 0 1 1 (Set → stays 1)
1 1 0 Invalid
1 1 1 Invalid
CLK ON
VALUE : 1
0 0 No Change (Qn)
0 1 0
1 0 1
1 1 Toggle (¬Qn)
● J = 0, K = 0 → Output stays the same (No Change).
CLK ON
VALUE : 1
1 0 1 (changes to 1)
1 1 1 (stays 1)
T Qn (Current State) Qn+1 (Next State)
0 0 0 (No Change)
CLK ON
0 1 1 (No Change)
1 0 1 (Toggle) VALUE : 1
1 1 0 (Toggle)
T = 0 → no change
● It is the future value (what the output will become) after the next clock
pulse, depending on inputs and the current state.
● Example: If D = 0 and clock comes → the next state = 0, even if current
state was 1.
TWO WAYS TO CONSTRUCT THE BUS
1) BY USING MULTIPLEXERS
2) BY THREE STATE BUFFER
R1
R2←R1
b = a;
8 wires
For 32 bits?
Expensive
R2
A0
A1 Register A
0,0 A2
A3
A3 A0
A2 A1
4 I/P, 1 O/P
Bus <- A
B<- Bus
A0
A1 Register A
0,0 A2
A3
A3 A0
A2 A1
4 I/P, 1 O/P
Bus <- A
Load Signal
C<- Bus
LOAD = 0
LOAD of C = 1 (Active) LOAD = 0
LOAD = 0
Control Signal
Memory Read
R ← M[AR]
// Read: data from memory at address AR goes into register R
Memory Write
M[AR] ← R
// Write: data from register R goes into memory at address AR
NOTE
Number of multiplexers required = Number of bits in a register
● If register size = 8 bits → 8 multiplexers required (one multiplexer per bit line).
• Number of input in Multiplexers = No. of Registers ( If number of registers = N → Each multiplexer has N
inputs)
MCQ
If number of bits = 8 → 8 multiplexers required
The bus consists of four 4 x 1 multiplexers each having four data inputs, 0 through 3, and two selection inputs, S1 and
S0. In order not to complicate the diagram with 16 lines crossing each other, we use labels to show the connections from
the outputs of the registers to the inputs of the multiplexers.
For example, output 1 of register A is connected to input 0 of MUX 1 because this input is labelled A1. The diagram
shows that the bits in the same significant position in each register are connected to the data inputs of one multiplexer to
form one line of the bus.
Thus MUX 0 multiplexes the four 0 bits of the registers, MUX 1 multiplexes the four 1 bits of the registers, and
similarly for the other two bits.
The two selection lines S1 and S0 are connected to the selection inputs of all four multiplexers.
The selection lines choose the four bits of one register and transfer them into the four-line common bus. When S1S0 =
00, the 0 data inputs of all four multiplexers are selected and applied to the outputs that form the bus.
This causes the bus lines to receive the content of register A since the outputs of this register are connected to the 0 data
inputs of the multiplexers. Similarly, register B is selected if S1S0 = 01, and so on. Table below shows the register that
is selected by the bus for each of the four possible binary value of the selection lines.
In general, a bus system will multiplex k registers of n bits each to produce an n-line common bus. The number
of multiplexers needed to construct the bus is equal to n, the number of bits in each register. The size of each
multiplexer must be k x 1 since it multiplexes k data lines.
For example, a common bus for eight registers of 16 bits each requires 16 multiplexers, one for each line in the
bus. Each multiplexer must have eight data input lines and three selection lines to multiplex one significant bit in
the eight registers.
The transfer of information from a bus into one of many destination registers can be accomplished by
connecting the bus lines to the inputs of all destination registers and activating the load control of the particular
destination register selected.
The symbolic statement for a bus transfer may mention the bus or its presence may be implied in the statement.
When the bus is includes in the statement, the register transfer is symbolized as follows: BUS ← C, R1 ← BUS
The content of register C is placed on the bus, and the content of the bus is loaded into register R 1 by
activating its load control input. If the bus is known to exist in the system, it may be convenient just to show the
direct transfer. R1 ← C
From this statement the designer knows which control signals must be activated to produce the transfer
through the bus.
A buffer is often a set of flip-flops or
The digital buffer is important in data transmission, translating voltage pulses between connected
systems.
Buffers are used in registers (data storage device) and buses (data transferring device).
10 1
0
0
E – EXTENDED BIT (To store the
Extra bit, Example : Carry)
MEMORY
4096 SLOTS, 16 Bits
Data
INPUT FROM INPUT DEVICE(Keyboard)
PC
AR
MEMORY UNIT
BUS
COMMON BUS SYSTEM
Basic Computer Registers connected to a common BUS.
• 4 registers DR, AC, IR (Instruction R – Holds Instruction code) and TR (Temporary R – Holds
Temporary data) have 16 bits and 2 registers AR and PC have 12 bits. The INPR and OUTR have 8
bits each.
• The INPR receives character from input device and delivers it to the AC while the OUTR receives
character from AC and transfers it to the output device.
• 5 registers have 3 control inputs LD (load), INR (increment) and CLR (clear).
Abbreviation Register name
COMMON BUS SYSTEM OUTR Output register
• A typical digital computer has many registers, and paths
Temporary
must be provided to transfer information from one TR
register to another.
register
• Note : The content of any register can be placed on the AR Address register
common bus and an operation can be performed in the
adder and logic circuit during the same clock cycle.
• The adder and logic circuit provides the 16 inputs of AC. This circuit has 3
sets of inputs. One set comes from the outputs of AC which implements
register micro operations. The other set comes from the DR (data register)
which are used to perform arithmetic and logic micro operations. The result
of these operations is sent to AC while the end around carry is stored in E
as shown in diagram. The third set of inputs is from INPR.
• Connections: The outputs of all the registers except the OUTR (output
register) are connected to the common bus. The output selected depends
upon the binary value of variables S2, S1 and S0. The lines from common
bus are connected to the inputs of the registers and memory. A register
receives the information from the bus when its LD (load) input is activated
while in case of memory the Write input must be enabled to receive the
information. The contents of memory are placed onto the bus when its
Read input is activated.