S2- Chapter 1 Combinational Logic Circuits
S2- Chapter 1 Combinational Logic Circuits
Chapter I
Combinational Logic Circuits
Presented by:
✓ Apply Boolean Algebra to Simplify and design logic key combinational logic circuit such as adders, multiplexers,
decoders, and encoders.
✓ Solve Real-World Problems – Implement logic functions using multiplexers, demultiplexers or decoders
• Circuits are used in combinatorial logic to carry out operations such as data manipulation
and selection, coding, decoding, etc.
• The presence of a bubble attached to the box indicates the complemented state for the
corresponding input. (example: input B).
Each output is defined by its logic expression based on the inputs’ values. It remains unaffected by
the states of other outputs or the historical states of that specific input.
A
• In certain combination logic systems, we encounter not B Combinational
LOGIC S1
only inputs and outputs, but also command and control SYSTEM S2
inputs (for example: x, y). N
X Y
Copyright © Karim Ben Si Said L1 – MI -2024/2025 5
Chapter- 2: Combinational Logic
Implementing combinational logic
The different steps involved in the design of a combinational logic circuit are as follows:
1. Define the Problem Clearly: Statement of the problem and identification of input and
output variables.
2. Expressing the relationship between the input and output variables.
3. Construction of a truth table to meet input–output requirements.
4. Writing Boolean expressions for various output variables in terms of input variables.
5. Minimization of Boolean expressions.
6. Implementation of minimized Boolean expressions.
1. The circuit should have the minimum number of gates, and the gates to use should have the
minimum number of inputs.
2. The number of interconnections should be a minimum to reduce the propagation time from
the inputs to the outputs
3. Consider Fan-out and Fan-in: Avoid excessive fan-out and fan-in to maintain signal integrity.
• fan-out (the number of gates connected to the output)
• fan-in (the number of inputs to a gate).
I. Combinational circuits
→ Arithmetic circuits
→ Arithmetic circuits
• This category concerns combinational circuits designed for carrying out arithmetic operations,
including addition, subtraction, multiplication, and division, specifically on binary data
• Addition and subtraction are the two most commonly used arithmetic operations, as the other
two, namely multiplication and division, are respectively the processes of repeated addition
and repeated subtraction
• Thus the full-adder performs additions between three bits: two bits of the numbers to sum A
and B, and the carry bit from the previous two bits addition CIN
4. logic diagram
Parallel adder is a multiple bit adder, this circuit exists as an integrated circuit, it performs
addition of two 4-bits numbers
• Exercise:
• The BORROW output specifies whether a ‘1’ has been borrowed to perform the subtraction.
To develop such circuit, the same steps as in half adder are followed:
3. Derive and simplify the Boolean expressions of the outputs B Subtractor Bout
Copyright © Karim Ben Si Said L1 – MI -2024/2025 18
Chapter- 2: Arithmetic circuits
→ Half-Subtractor A B D Bout
0 0 0 0
1. Box Diagram
2. Truth Table 0 1 1 1
1 0 1 0
1 1 0 0
D =AB
3. Simplified logic expression
D= A ഥ. B + A. B
ഥ = AB 4. logic diagram
ഥ. B
Bout = A ഥ B
Bout = A.
A
Full D
B
Bin Subtractor Bout
• Thus the full-adder performs additions between three bits: two bits of the numbers to sum A
and B, and the carry bit from the previous two bits addition CIN
Copyright © Karim Ben Si Said L1 – MI -2024/2025 20
Chapter- 2: Arithmetic circuits
→ Full-Subtractor
1. Box Diagram 3. Simplified logic expression
The expression of the difference output D is determined
following the same method as in the full-adder:
2. Truth Table
D = A. B BIN
A B BIN D Bout
0 0 0 0 0 For the expression of the Borrow output Bout, a Karnaugh
0 0 1 1 1 map is determined the simplified expression:
0 1 0 1 1 B BIN
A 00 01 11 10
0 1 1 0 1
0 0 1 1 1
1 0 0 1 0
1 0 0 1 0
1 0 1 0 0
1 1 0 0 0 ഥ. BIN + A
ഥ. B
Bout = B. BIN + A
1 1 1 1 1
Copyright © Karim Ben Si Said L1 – MI -2024/2025 21
Chapter- 2: Arithmetic circuits
→ Full-Subtractor
4. logic diagram
Thus, a full subtractor performs subtraction between three bits and has two outputs: difference result (D)
and Borrow (Bout)
D = A. B BIN
ഥ. BIN + A
Bout = B. BIN + A ഥ. B
Bout
Develop a subtractor of two numbers with 4-bits each, using the 74283 IC (4-bits binary adder)
and the two’s complement calculation method 𝐴 − 𝐵 = 𝐴 + (−𝐵)
→ Magnitude Comparator
• A magnitude comparator is an arithmetic combinational circuit that can compare between two
binary numbers. It allows to detect whether two numbers are equal or different, and indicates if
a number is greater or smaller than another.
✓ E = 1 when A is equal to B
G= S= E=
A B
A>B A<B A=B
0 0 0 0 1
0 1 0 1 0
1 0 1 0 0
1 1 0 0 1
ഥ
𝐺 = A. B
𝑆=A ഥ. B
𝐸=A ഥ. B
ഥ + A. B = AB
Copyright © Karim Ben Si Said L1 – MI -2024/2025 26
Chapter- 2: Arithmetic circuits
→ 2-bits-Magnitude Comparator
Example: Create a 2-bits comparator using 1-bit comparators and some logic gates
Exercise:
1. Create a 4-bits comparator using 1-bit
comparators and some logic gates
I. Combinational circuits
→ Data routing and transmission circuits:
Multiplexer and demultiplexer circuits
• A multiplexer has several inputs (I0, I1, … IN) and one output (S). The output is connected to the
input (I0 for example) being selected using the address inputs (A0, A1, … AM).
➢ The input combinations 00, 01, 10 and 11 on the select lines respectively A1 A0 S
switch I0, I1, I2 and I3 to the output. 0 0 I0
0 1 I1
ഥ0 A
S =A ഥ1. I0 + A
ഥ0 A1. I1 + A0 A
ഥ1. I2 + A0 A1. I3
1 0 I2
1 1 I3
Copyright © Karim Ben Si Said L1 – MI -2024/2025 31
Chapter- 2: Data routing and transmission
→ Multiplexer
The logic diagram of the 4x1 multiplexer is given bellow
A1
A0
Copyright © Karim Ben Si Said L1 – MI -2024/2025 32
Chapter- 2: Data routing and transmission
→ Multiplexer
• In certain combinational logic circuits, an enable input is used. It allows to activate or disactivate
the circuit.
The output takes the value of the inputs only when the system in
enabled (En = 0)
En A0 S
ഥ 0 En. I0+ A0En. I1
S =A 1 X 0
0 0 I0
0 1 I1
Copyright © Karim Ben Si Said L1 – MI -2024/2025 33
Decimal A B C F2
Chapter- 2: Data routing and transmission 0 0 0 0 0
→ function implementation with multiplexer 1 0 0 1 0
2 0 1 0 1
• One of the most common applications of a multiplexer is its use for
3 0 1 1 0
implementation of combinational logic Boolean functions.
4 1 0 0 1
Example: implement the following expression F using a 8-to-1 MUX 5 1 0 1 0
6 1 1 0 0
F A, B, C = 2, 4, 7 7 1 1 1 1
• The function F has true value (1) for the three minterms (2, 4 and 7)
present in the given Boolean function, and false value (0) for the
other combinations (0, 1, 3, 5, and 6)
• Thus, the three minterms inputs are tied to logic ‘1’. The remaining
five possible minterms absent in the Boolean function are tied to
logic ‘0’.
Copyright © Karim Ben Si Said L1 – MI -2024/2025 34
Chapter- 2: Data routing and transmission
→ Demultiplexer
• The demultiplexer (DEMUX) is a data switching circuits. Contrary to
multiplexer, a demultiplexer can transform information presented in the form
of n bits word into information presented in the form of n parallel bits.
• A demultiplexer has several outputs (S0, S1, … SN) and one input (I). The input
is directed to the output (S1 for example) being selected using the address
inputs (A0, A1, … AM).
ഥ0 A
𝑆0 = A ഥ1. I. En
𝑆1 = ഥA0 A1. I. En
ഥ1. I. En
𝑆2 = A0 A
𝑆3 = A0 A1. I. En
Example: Instead of using 8-bits bus to transmit data (fig-1), with a 8x1 MUX and 1x8 DEMUX , we
can use only one wire for the transmission bus (fig-2)
(fig-1) (fig-2)
Copyright © Karim Ben Si Said L1 – MI -2024/2025 38
Chapter- 2: Data routing and transmission
→ Encoder
• An encoder is a multiplexer without its single output line. It has n output lines and 2N or fewer
inputs. The output corresponds to a binary code of the inputs on N lines (bits).
• Thus, such system converts a binary input to a unique binary code output
This type of encoder has ten inputs—one for each decimal digit—and four outputs corresponding to the BCD code, as
shown in Figure 6–36. This is a basic 10-line-to-4-lin 1
1
• It efficiently identifies and encodes the highest-priority active input, ensuring that the output
accurately reflects the most significant input, thus resolving conflicts and providing a
systematic approach to handle multiple input signals.
• The priority function means that the encoder will produce a code for the output corresponding
to the highest-order decimal digit input that is active and will ignore any other lower-order
active inputs
A B
D1 D0 D1 D0
D3 D2 00 01 11 10 D3 D2 00 01 11 10
00 X 0 0 0 00 X 0 1 1
01 1 1 1 1 01 0 0 0 0
11 1 1 1 1 11 1 1 1 1
10 1 1 1 1 10 1 1 1 1
• A decoder is a demultiplexer without its single input line. It has N input lines and 2N or fewer
outputs. Each output represents the code of the N bit inputs.
• Thus, such system decodes a unique binary input to a unique binary code output.
44
Copyright © Karim Ben Si Said L1 – MI -2024/2025
Chapter- 2: Data routing and transmission
→ Decoder - Basic decoder
• In basic decoder are used usually to decode and indicate that some combinations are present
at the input.
Example: we need to create a decoder which indicates when a binary 1001 occurs on the
inputs of a digital circuit.
• In this case, the decoder has 4 inputs, and 1 output 𝑆 ; a HIGH level is produced when the right
combination (1001) occurs on the inputs (𝐴0 = 1, 𝑎𝑛𝑑 𝐴1 = 0, 𝑎𝑛𝑑 𝐴2 = 0, 𝑎𝑛𝑑 𝐴3 =1).
𝑆 = A0 ഥA1 A
ഥ2 A3
45
Copyright © Karim Ben Si Said L1 – MI -2024/2025
Chapter- 2: Data routing and transmission
→ Decoder – 4-bits decoder
Decoding functions and truth table for a 4-line to 16-line (1-of-16) decoder with active-low outputs
46
Copyright © Karim Ben Si Said L1 – MI -2024/2025
Chapter- 2: Data routing and transmission
ഥ . B + A. B
S = AB = A ഥ
C = A. B
ഥ. B or A. B
The output S is true for the combinations A ഥ
Exercise: develop a full-adder using a 3x8 decoder and some logic gates
Copyright © Karim Ben Si Said L1 – MI -2024/2025 48
Chapter II: Combinational Logic
I. Combinational circuits
→ Code Converters