0% found this document useful (0 votes)
3 views28 pages

CSIT DL Unit 4 Combinational Logic

The document provides an overview of combinational logic circuits, highlighting their independence from time and reliance solely on current inputs. It details the types of combinational circuits, including adders, subtractors, and code converters, along with their design procedures and examples such as half adders and full adders. Additionally, it discusses practical design considerations and the implementation of binary operations using combinational logic.

Uploaded by

likeshmgr67
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
3 views28 pages

CSIT DL Unit 4 Combinational Logic

The document provides an overview of combinational logic circuits, highlighting their independence from time and reliance solely on current inputs. It details the types of combinational circuits, including adders, subtractors, and code converters, along with their design procedures and examples such as half adders and full adders. Additionally, it discusses practical design considerations and the implementation of binary operations using combinational logic.

Uploaded by

likeshmgr67
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

Unit 4

Combinational Logic
Introduction to Combinational Logic:
• Logic circuit may be combinational or sequential.
• Combinational Circuit is the type of circuit in which output is independent
of time and only relies on the input present at that particular instant.
• On other hand Sequential circuit is the type of circuit where output not
only relies on the current input but also depends on the previous output.
• Combinational circuit are mainly used for arithmetic as well as Boolean
operations.
• Elementary building blocks for combinational circuit are logic gates.
• They are less complex (simple) to implement in comparison to the
sequential logic circuits.
• A combinational circuit includes input variables, logic gates and output
variables.
Following is the block diagram of combinational logic circuit.

The input binary variables come from an external source (eg registers)
and combinational circuit implements some binary logic and the output
is transferred to some external destination (eg register).
For n input binary variables, there may be 2n possible combinations of
binary input. For each possible input combination, there is one and
only one output combination. A combinational circuit can be described
by m Boolean functions, one for each output variable. Each Boolean
function is expressed in terms of same n input variables.
Features of Combinational Circuits
• The output of combinational circuit at any instant of time, depends only on
the levels present at input terminals.
• The combinational circuit do not use any memory. The previous state of
input does not have any effect on the present state of the circuit.
• A combinational circuit can have an n number of inputs and m number of
outputs.
• There is no feedback element and circuit design is not complex.
• They are time independent circuits and doesn’t require clock signal.
• It is the combination of logic gates like AND, OR, NOT & EX-OR etc.
• The example of combinational circuits is Adder, Subtractor, Converter, and
Encoder/Decoder.
Types of Combinational Circuits:
There are three types of combinational circuits:

1. Arithmetic and logic circuits: Adder, Subtraction, Multiplication,


Comparator and Logic operation is done in this section.

2. Data manipulation Circuits:- Multiplexers, Demultiplexers, Encoder,


Decoder and Priority.

3. Code converter Circuits:- Binary to Gray, Gray to Binary, Binary to


Excess 3, seven-segment
Design Procedure:
• Design of combinational circuits start from the verbal outline of the problem and ends
with a logic circuit diagram or a set of Boolean functions from which the logic diagram can
be easily obtained.

• The procedure involves the following steps:

1. The problem is stated.


2. Number of available input variables and required output variables is determined.
3. Input and output variables are assigned with letter symbol.
4. Truth table that defines the required relationship between inputs and outputs is derived.
5. Simplified Boolean function for each output is obtained (Using K-map if needed).
6. Logic diagram is drawn.
A practical design method must consider the following points.

• Use of minimum number of logic gates.


• Minimum number of input variables.
• Minimum propagation time (less logic levels).
• Minimum number of interconnections.
1. Adders
• Addition of bits is one of the most important operation in computers.
• A number of other operations can also be defined in terms of
addition.
• The combinational circuit that performs addition of two or more bits
is called as adder.
• Two types of adders are:
a. Half Adder
b. Full Adder
c. Parallel Adder (Binary Adder)
a. Half Adder
• Half adder is a combination of logic adder circuit
with two inputs and two outputs.
• The circuit must add two bits. So input includes
augend (A) and addend (B), the output must be
the sum (S) and carry (C).
• In a block diagram, half adder will look like
follows;
• The carry shows any overflow of the addition of two binary digits
• It is found in arithmetic and logic units (ALU).
• In half adder we only add two binary bits. We can’t add three binary bits.
The third bit is previous carry bit. It is the major limitation of half adder.
• 'A' and' B' are the input states, and 'sum'
and 'carry' are the output states.

• The carry output is 0 in case where both


the inputs are not 1.

• The least significant bit of the sum is


defined by the 'sum' bit.

• The SOP form of the sum and carry are


as written. S=A⊕B

• The Half Adder is designed by


combining the 'XOR' and 'AND' gates
and provide the sum and carry. C=A.B
b. Full Adder
• A full adder is a combinational circuit that adds
three input bits.
• It requires three inputs and two outputs as in
the block diagram.
• It can also be constructed by the cascading of
two half adder.
• It is found in arithmetic and logic units (ALU).
• It has three inputs and two outputs. The inputs are A, B, and Cout (carry
input). The outputs of full adder are carry out (Cout ) other is sum (S).
• The inputs A & B are operands and the third Cin is a bit carried in from
the previous sum.
• It is used as building block for parallel adders and subtractor circuits.
• The sum output of first half adder is
given to another XOR gate of second
half adder.

• Input carry (Cin) is given as input to


second half adder.
= (A ⊕ B) ⊕ Cin

• Final sum is obtained from the sum


output of the second half adder.

• Final carry is obtained by OR’ing the


carry from two full adders.
= A.B + (A ⊕ B)
• 'A' and' B' are the input variables. These
variables represent the two significant
bits which are going to be added.
• 'Cin' is the third input which represents
the carry from the previous lower
significant position.

• The 'Sum' and 'Carry' are the output


variables that define the output values.

• The result of the three bit sum is


A+B+Cin = Cout S

= A.B + (A ⊕ B)
S=A⊕B⊕C
c. Parallel Adder (Binary Adder):
• The Binary Adder is a logical circuit which is used to perform the addition
operation of two binary number of any length.
• The Binary Adder is formed with the help of the Full-Adder circuit.
• The Full-Adders are connected in series, and the output carry of the first
Adder will be treated as the input carry of the next Full-Adder.
• In digital calculation, we need to add two n-bit binary numbers rather
than only single-bit binary numbers. For this purpose, we need to use n-
bit parallel Adder. In order to get N-bit parallel adder, we cascade the n
number of Full Adders. The carry output of the first Adder is treated as
the carry input of the second Adder.
Fig: Binary/Parallel Adder
• The 'A' and 'B' are the augend, and addend bits are defined by the
subscript numbers. The subscripts start from right to left, and the
lower-order bit is defined by subscript '0'.
• The C0, C1, C2, and C3 are the carry inputs which are connected
together as a chain using Full Adder. The C4 is the carry output
produced by the last Full-Adder.
• The Cout of the first Adder is connected as the Cin of the next Full-
Adder.
• The S0, S1, S2, and S3 are the sum outputs that produce the sum of
augend and addend bits.
• The inputs for the input variable 'A' and 'B' are fetched from different
source registers. For example, the bit for the input variable 'A' comes
from register 'R1', and a bit for the input variable 'B' comes from
register 'R2'.
• The outcome produced by adding both input variables is stored into
either third register or to one of the source registers
2. Subtractors
• The subtraction of two binary numbers may be accomplished by
taking the complement of the subtrahend and adding it to the
minuend.
• By this method, the subtraction operation becomes an addition
operation requiring full-adders for its machine implementation.
• By this method, each subtrahend bit of the number is subtracted
from its corresponding significant minuend bit to form a difference
bit.
• If the minuend bit is smaller than the subtrahend bit, a 1 is borrowed
from the next significant position.
• Just as there are half- and full-adders, there are half subtractor, full
subtractor and binary subtractor.
a. Half Subtractor:
• It is the combinational logic circuit
capable of subtracting two binary
digits.
• It has two inputs (A and B) and two
outputs (difference and borrow).
• The block diagram of Half-
Subtractor is shown in the diagram.
• 'A' and 'B' are the input variables whose values
are going to be subtracted.

• The 'Diff' and 'Borrow' are the variables whose


values define the subtraction result, i.e.,
difference and borrow.

• The first two rows and the last row, the


difference is 1, but the 'Borrow' variable is 0. Truth Table

• The Half Subtractor is designed by combining = (A⊕B)


the 'XOR', 'AND', and 'NOT' gates and
provide the Diff and Borrow.

• The third row is different from the remaining = A'.B


one. When we subtract the bit 1 from the bit
0, the borrow bit is produced. Logic Diagram
b. Full Subtractor:
• The Half Subtractor is used to subtract
only two numbers. To overcome this
problem, a full subtractor was
designed.
• The full subtractor is used to subtract
three 1-bit numbers A, B, and C, which
are minuend, subtrahend, and borrow,
respectively.
• The full subtractor has three input
states and two output states i.e., diff
and borrow.
•'A' and' B' are the input variables. These
variables represent the two significant bits
that are going to be subtracted.

•'Borrowin' is the third input which


represents borrow.

•The 'Diff' and 'Borrow' are the output


variables that define the output values.

•The eight rows under the input variable


designate all possible combinations of 0 Truth Table of Full Subtractor:
and 1 that can occur in these variables.
The SOP form can be obtained with the help of K-map as follows, where C = Borrowin

Diff (D)= A ⊕B⊕C Borrow (B) = A’C + A’B + BC

The full subtractor logic circuit can be constructed using the 'AND', 'XOR', and NOT gate with an OR gate.
c. Binary/Parallel Subtractor:
Binary subtractor (also called parallel subtractor) is the combinational logic circuit
capable subtracting two n-bit binary numbers. It is constructed by connecting n
different full adders in series as shown in the following figure.
It here, A4 A3 A2 A1 is the minuend
and B4 B3 B2 B1 is the
subtrahend. It uses 2’s complement
method of subtraction. The parallel
adder circuit adds the minuend with
2’s complement of subtrahend. the
2’s complement of subtrahend is
obtained by passing subtrahend bits
through not gates and keeping the
carry in as 1.
d. Binary Adder Subtractor:
Binary adder-subtractor is the
combinational logic circuit
capable of adding or
subtracting two n-bit binary
numbers. It is constructed by FA FA FA FA
using n full adders connected
in series as shown in the
figure.
The binary number B4 B3 B2 B1 (which is addend or subtrahend) is passed
through the XOR gate. when the input M is set to logic 0, the circuit acts as a
binary adder.
If the input M is set to logic 1, the XOR gate behaves as a NOT gate and
hence the circuit acts as a binary subtractor. The final answer is C4S4S3S2S1.
3. Code Converter:
• The Code converter is used to convert one type of binary code to another.
• There are different types of binary codes like BCD code, gray code, excess-3
code, etc. Different codes are used for different types of digital
applications.
• To get the required code from any one type of code, the simple code
conversion process is done with the help of combinational circuits.
• Common type of code converter circuits are:
a. Binary to BCD
b. BCD to Excess-3
c. BCD to Gray
d. Gray to Excess-3
a. BCD to Excess-3 Converter:
• It is the combinational circuit that converts
4-bit BCD code to 4-bit excess-3 code.
• For this conversion process, 4-bit BCD code
is considered as input, which is converted
into 4-bit Excess-3 code.
• Since 4-bit is considered for BCD code, the
output is produced only for the inputs from
0 to 9.
• The truth table shown below has only the
valid 4-bit BCD codes. For the remaining
input combinations, the output cannot be
predicted. So they are don’t care outputs.
From the truth table, the minterms are
obtained for each outputs(w, x, y, z).

w = ∑m(5, 6, 7, 8, 9)
x = ∑m(1, 2, 3, 4, 9)
y = ∑m(0, 3, 4, 7, 8)
z = ∑m(0, 2, 4, 6, 8,)

The minterms of each output in plotted in k-


map and simplified expression is obtained.
A B C D

The circuit diagram can be draws by


z

using the basic logic gates as shown y

in the diagram.

The BCD input is given through ABCD


and the equivalent Excess-3 code is
obtained as output wxyz.
x

BCD to Excess-3 Converter

You might also like