Combinational Logic Circuits

In this tutorial, you will learn the fundamentals of combinational circuits in digital electronics, including their design process, types, and key differences from sequential circuits. You will also explore arithmetic adders and subtractors, examine the design of half and full subtractors using various logic gates, and understand the distinctions between half and full subtractors. Additionally, you will discover how to implement subtractors using 2-input NAND and NOR gates.

Contents:

  1. Combinational Circuits in Digital Electronics
  2. Designing a Combinational Circuit in Digital Electronics
  3. Differences Between Combinational and Sequential Circuits
  4. Types of Combinational Circuits
  5. Arithmetic Adders
  6. Arithmetic Subtractors
  7. Half Subtractor Using Logic Gates
  8. Full Subtractor Using Logic Gates
  9. Differences Between Half Subtractor and Full Subtractor
  10. Half Subtractor using 2-input NAND Gates
  11. Full Subtractor using 2-input NAND Gates
  12. Half Subtractor using 2-input NOR Gates
  13. Full Subtractor using 2-input NOR Gates

Combinational Circuits in Digital Electronics

  • A combinational circuit consists of the interconnection of logic gates whose outputs at any time are determined by the present combination of inputs without any involvement of previous inputs.
  • A combinational circuit performs a specific operation which is represented by a specific set of Boolean functions.
  • Input variables, logic gates, and output variables are the basic components of a combinational circuit.

Designing a Combinational Circuit in Digital Electronics

The steps below should be followed to design a combinational circuit.

  • Step-1: Determine the number of input and output variables from the specifications of the given circuit.
  • Step-2: Represent the input and output variables with letter symbols.
  • Step-3: Develop a truth table that can define the relationships between input and output variables.
  • Step-4: Obtain the simplified Boolean expressions for each output variable in either SOP or POS form with the help of K-maps or Boolean algebraic laws.
  • Step-5: Implement the logic circuit or draw its logic diagram.

Differences Between Combinational and Sequential Circuits

Here are some differences between combinational and sequential circuits listed below.

advertisement
advertisement
Parameters Combinational Circuits Sequential Circuits
Output Dependency The present output depends only on the present input. The present output depends on past inputs and outputs.
Memory Element They are known as memoryless. They are said to have a memory element.
Feedback Loops There are no feedback loops present in the circuit. There are feedback loops present in the circuit.
Examples Adders, decoders Flip-flops, latches, counters

Types of Combinational Circuits

Combinational circuits can be broadly studied under the following groups: –

  1. Arithmetic Logic group: – Circuits under this group perform arithmetic operations. For example, adders, subtractors, multipliers, etc
  2. Data transfer group: – Circuits under this group transfer data from one end to another via a logical circuit. For example, multiplexers and demultiplexers.
  3. Code interpretation group: – Circuits under this group are used to characterize code, generate them as well as interpret them. For example- decoders and encoders.

All combinational circuits take input in the form of 0s and 1s and produce digital outputs only. All input numbers are considered binary.

Arithmetic Adders

Adders are combinational logic circuits that are used to add two n-bit binary numbers together. They are used by the ALU to perform addition inside the CPU. We have many varieties of adder circuits present such as: –

  • Half Adder: – A half adder is used to add any 2 single bits together and produce a sum and a carry output.
  • Full Adder: – A full adder takes three inputs, two input bits and a carry-in bit from the previous addition. It produces a sum and a carry-out bit. Full adders are made up of half adders.
  • Parallel Ripple Carry Adder: – A ripple carry adder is made up of many full adders where each adder’s carry out is the carry-in for the next adder. Thus, it is named as ripple carry adder. It can be used to add an n-bit number.
  • Carry Look Ahead Adder: – In the carry look ahead adder, we obtain the carry for each bit directly from our inputs and we do not wait for the carry bit to appear as in the case of ripple carry adder. It is also used to add two n-bit numbers.

Arithmetic Subtractors

Subtractors are combinational logic circuits that are used to subtract two n-bit binary numbers. Like adders, they are also present in the ALU. There are two major subtractors: –

  • Half Subtractor: – The circuits are designed to subtract two single bits and produce a difference output and a borrow output which is 1 in case we subtract a greater digit from a smaller one else 0 for all other values.
  • Full Subtractor: – The full subtractor circuit takes three inputs, two single bits and a borrow-in bit, it produces a difference bit and a borrow-out bit. Full subtractors are connected in a cascaded manner to form an n-bit subtractor circuit.

Half Subtractor Using Logic Gates

The following diagram explains the design of a half subtractor using logic gates.

advertisement
Half Subtractor Circuit
  • A half subtractor takes two inputs as A and B. These are the minuend and subtrahend bits and it generates two outputs as a difference and a borrow bit.
  • A half subtractor is designed using one 2-input EX-OR gate, one NOT gate, and one 2-input AND gate.
  • The EX-OR gate generates the difference (D) bit. The NOT and the AND gate generates the borrow (b) bit.
  • The truth table of a half subtractor is shown below.
  • A B D b
    0 0 0 0
    0 1 1 1
    1 0 1 0
    1 1 0 0

Full Subtractor Using Logic Gates

The following diagram explains the design of a full subtractor using logic gates.

Full Subtractor Using Logic Gates
  • A full subtractor takes three inputs as A, B, and Bi. A and B are the minuend and subtrahend bits and Bi is the borrow bit.
  • A full subtractor produces two outputs as a difference (D) bit and an output borrow (Bo) bit. D = A XOR B XOR Bi and Bo = A’B + BBi + A’Bi.
  • One OR gate, two AND gates, two EX-OR gates, and two NOT gates are required to design a full subtractor circuit.
  • The truth table of a full subtractor is shown below.
    A B Bi D Bo
    0 0 0 0 0
    0 0 1 1 1
    0 1 0 1 1
    0 1 1 0 1
    1 0 0 1 0
    1 0 1 0 0
    1 1 0 0 0
    1 1 1 1 1

Differences Between Half Subtractor and Full Subtractor

The differences between a half subtractor and a full subtractor are listed below.

Parameters Half Subtractor Full Subtractor
Inputs The number of Inputs is two. The number of Inputs is three.
Borrow bit No borrow bit is considered as an input for the subtraction. One borrow bit is considered as an input for the subtraction.
Circuit construction It required one EX-OR, one NOT, and one AND gate to construct its circuit. It required one OR gate, two AND gates, two NOT gates, and two EX-OR gates to construct its circuit.
Difference expression D = A XOR B D = A XOR B XOR Bi
Borrow expression Bo = A’B Bo = A’B + BBi + A’Bi.

advertisement

Half Subtractor using 2-input NAND Gates

The following diagram explains the design of a half subtractor using 2-input NAND gates.

Half Subtractor using 2-input NAND Gates
  • Minimum five 2-input NAND gates are required to design a half subtractor.
  • In the circuit, D = A XOR B and b = A’B are representing the difference bit and the borrow bit respectively.
  • For the difference bit output, NAND1, NAND2, NAND3, and NAND4 gates are used to perform the EX-OR operation.
  • The output of NAND3 gate is Y = ((AB)’B)’ and Y will be the input for NAND5 gate. So,
    b = (AB)’B
    = (A’ + B’)B
    = A’B

Full Subtractor using 2-input NAND Gates

The following diagram explains the design of a full subtractor using 2-input NAND gates.

Full Subtractor using 2-input NAND Gates
  • Minimum nine 2-input NAND gates are required to design a full subtractor.
  • In the circuit diagram, eight NAND gates are used to perform the XOR operation to obtain to difference bit. D = A XOR B XOR Bi.
  • The output of the NAND3 gate is ((AB)’B)’ and the output of the NAND7 gate is ((D1Bi)’Bi)’. These are the inputs for the NAND9 gate.
  • The output of the NAND9 gate after the NAND operation will be Bo = A’B + BBi + A’Bi. This will be the expression for the borrow output bit.

Half Subtractor using 2-input NOR Gates

The following diagram explains the design of a half subtractor using 2-input NOR gates.

Half Subtractor using 2-input NOR Gates
  • Minimum five 2-input NOR gates are required to design a half subtractor.
  • For the difference bit output, all five NOR gates are used to perform the EX-OR operation.
  • For the borrow output bit, NOR1 and NOR2 gates are used.
  • The output of NOR2 gate is b = ((A + B)’ + A)’
    = (A + B)A’
    = A’B
  • So, the circuit is a half subtractor circuit because it produces the outputs D = A XOR B and b = A’B.

Full Subtractor using 2-input NOR Gates

The following diagram explains the design of a full subtractor using 2-input NOR gates.

Full Subtractor using 2-input NOR Gates
  • To design a full subtractor a minimum of nine 2-input NOR gates are required.
  • In the circuit, first four NOR gates are used to obtain D1 = A XNOR B, and the next four NOR gates are used to obtain D = D1 XNOR Bi.
    = A XNOR B XNOR Bi.
  • The XNOR operation of three variables is the same as the XOR operation of three variables. So, A XNOR B XNOR Bi. = A XOR B XOR Bi.
    Thus, the difference bit D = A XOR B XOR Bi.
  • An extra NAND9 gate has been used to produce the borrow output bit i.e. Bo = A’B + BBi + A’Bi.

Key Points to Remember

Here are the key points to remember in “Combinational Circuits”.

  • Combinational circuits are memoryless, with outputs dependent only on present inputs and not on previous inputs. They are designed using Boolean functions and logic gates.
  • Combinational circuits rely solely on present inputs, while sequential circuits have memory elements and depend on past inputs and outputs.
  • There are three major groups in combinational circuits namely, arithmetic logic group, data transfer group, and code interpreter group.
  • Combinational circuits can be classified into arithmetic circuits (like adders and subtractors), data transfer circuits (such as multiplexers), and code interpretation circuits (like encoders and decoders).
  • Various adders like half adders, full adders, ripple carry adders, and carry look ahead adders are used to do n-bit binary additions.
  • Half subtractors handle two single bits, while full subtractors deal with three inputs, including a borrow-in bit. They compute the difference and borrow bits.
  • Half subtractors are designed using EX-OR, NOT, and AND gates, while full subtractors add OR gates and require more complex logic.
  • Both subtractors can be constructed using 2-input NAND or NOR gates, with specific gate combinations to perform XOR/XNOR and other necessary operations.

advertisement
advertisement
Subscribe to our Newsletters (Subject-wise). Participate in the Sanfoundry Certification contest to get free Certificate of Merit. Join our social networks below and stay updated with latest contests, videos, internships and jobs!

Youtube | Telegram | LinkedIn | Instagram | Facebook | Twitter | Pinterest
Manish Bhojasia - Founder & CTO at Sanfoundry
Manish Bhojasia, a technology veteran with 20+ years @ Cisco & Wipro, is Founder and CTO at Sanfoundry. He lives in Bangalore, and focuses on development of Linux Kernel, SAN Technologies, Advanced C, Data Structures & Alogrithms. Stay connected with him at LinkedIn.

Subscribe to his free Masterclasses at Youtube & discussions at Telegram SanfoundryClasses.