Engineers Garage

  • Electronic Projects & Tutorials
    • Electronic Projects
      • Arduino Projects
      • AVR
      • Raspberry pi
      • ESP8266
      • BeagleBone
      • 8051 Microcontroller
      • ARM
      • PIC Microcontroller
      • STM32
    • Tutorials
      • Audio Electronics
      • Battery Management
      • Brainwave
      • Electric Vehicles
      • EMI/EMC/RFI
      • Hardware Filters
      • IoT tutorials
      • Power Tutorials
      • Python
      • Sensors
      • USB
      • VHDL
    • Circuit Design
    • Project Videos
    • Components
  • Articles
    • Tech Articles
    • Insight
    • Invention Stories
    • How to
    • What Is
  • News
    • Electronic Product News
    • Business News
    • Company/Start-up News
    • DIY Reviews
    • Guest Post
  • Forums
    • EDABoard.com
    • Electro-Tech-Online
    • EG Forum Archive
  • DigiKey Store
    • Cables, Wires
    • Connectors, Interconnect
    • Discrete
    • Electromechanical
    • Embedded Computers
    • Enclosures, Hardware, Office
    • Integrated Circuits (ICs)
    • Isolators
    • LED/Optoelectronics
    • Passive
    • Power, Circuit Protection
    • Programmers
    • RF, Wireless
    • Semiconductors
    • Sensors, Transducers
    • Test Products
    • Tools
  • Learn
    • eBooks/Tech Tips
    • Design Guides
    • Learning Center
    • Tech Toolboxes
    • Webinars & Digital Events
  • Resources
    • Digital Issues
    • EE Training Days
    • LEAP Awards
    • Podcasts
    • Webinars / Digital Events
    • White Papers
    • Engineering Diversity & Inclusion
    • DesignFast
  • Guest Post Guidelines
  • Advertise
  • Subscribe

Logic gate implementation of arithmetic circuits – DE Part 11

By Hai Prasaath K January 30, 2022

In the previous tutorial, the basic combinational arithmetic circuits like half adder, full adder, half subtractor and full subtractor were discussed in details. Now, in this tutorial, the truth table and derivation of the boolean expressions for all those circuits will be considered. With the derived boolean expressions, all those circuits will be practically designed using digital ICs.

As discussed in the previous tutorial, the half adder can be constructed using an EX-OR gate and the AND gate. The full adder can be constructed using an OR gate, two EX-OR gates and two AND gates. The half subtractor can be constructed using an EX-OR gate, a NOT gate and an AND gate. The full subtractor can be constructed with an OR gate, two EX-OR gates, two AND gates and two NOT gates. So, for testing all the circuits, two AND gates, two EX-OR gates, two NOT gates and an OR gate are required. For AND gate, 7408 IC can be used which has four AND Gates in-built. For OR gate, 7432 IC can be used which has four OR gates in-built. For EX-OR gate, 7486 IC can be used which has four EX-OR gates in-built. For NOT gate, 7404 IC can be used which has six NOT gates in-built. The input to the digital circuits built from these ICs can be given from a DC supply of 2V while the supply voltage to the ICs can be given from a DC supply of 5V. The 5V DC supply can be constructed using a battery and 7805 IC. The same voltage can be dropped for inputs using a variable resistor. The output can be checked by connecting LEDs at the respective digital output pins.

So, Let us start testing the basic combinational circuits with digital ICs mentioned above.

Circuit Diagrams –

The Half adder has the following circuit diagram –

Circuit Diagram of Half Adder

Fig. 1: Circuit Diagram of Half Adder

The Full Adder has the following circuit diagram –

Circuit Diagram of Full Adder

Fig. 2: Circuit Diagram of Full Adder

The half subtractor has the following circuit diagram –

Circuit Diagram of Half Subtractor

Fig. 3: Circuit Diagram of Half Subtractor

The full subtractor has the following circuit diagram –

Circuit Diagram of Full Subtractor

Fig. 4: Circuit Diagram of Full Subtractor

Circuit Connections –

All the combinational arithmetic circuits are built by interconnecting the logic gates. Each combinational circuit has its own unique truth table where each output is linked to the inputs by some boolean function. The circuits are built by interconnecting the logic gate ICs. The following logic gate ICs are used in the construction of the circuits –

7408 IC – The 7408 IC has quad 2-input AND gates. The IC has the following pin configuration –

Table Listing Pin Configuration of 7408 IC

Fig. 5: Table listing pin configuration of 7408 IC

 The IC has the following Pin Diagram –
Pin Diagram of 7408 IC

Fig. 6: Pin Diagram of 7408 IC

The IC requires a supply voltage of 5V which can be tolerated up to 7V. The voltage at the inputs of AND gates must be 2V for high logic and 0V for low logic. The output of the AND gates has a voltage of 3.4 V for high logic and 0.2 V for low logic. The IC operates on positive logic system. The propagation delay while transiting from LOW to HIGH level at the output is 27 ns while propagation delay while transiting from HIGH to LOW level at the output is 19 ns.

7432 IC – The 7432 IC has quad 2-input OR gates. The IC has the following pin configuration –

Table Listing Pin Configuration of 7432 IC

Fig. 7: Table listing pin configuration of 7432 IC

The IC has the following Pin Diagram –
Table Listing Pin Configuration of 7432 IC

Fig. 7: Pin Diagram of 7432 IC

The IC requires a supply voltage of 5V which can be tolerated up to 7V. The voltage at the inputs of OR gates must be 2V for high logic and 0V for low logic. The output of the OR gates has a voltage of 3.4 V for high logic and 0.35 V for low logic. The IC operates on positive logic system. The propagation delay while transiting from LOW to HIGH level at the output comes 3 to 15 ns while propagation delay while transiting from HIGH to LOW level at the output also comes 3 to 15 ns.

7486 IC – The 7486 IC has quad 2-input EX-OR gates. The IC has the following pin configuration –

Pin Diagram of 7432 IC

Fig. 8: Table listing pin configuration of 7486 IC

The IC has the following Pin Diagram –
Table Listing Pin Configuration of 7486 IC

Fig. 9: Pin Diagram of 7486 IC

The IC requires a supply voltage of 5V which can be tolerated up to 7V. The voltage at the inputs of EX-OR gates must be 2V for high logic and 0V for low logic. The output of the EX-OR gates has a voltage of 3.4 V for high logic and 0.2 V for low logic. The IC operates on positive logic system. The propagation delay while transiting from LOW to HIGH level at the output is 23 ns if other inputs are low and 30 ns if other inputs are high while propagation delay while transiting from HIGH to LOW level at the output is 17 ns if other inputs are low and 22 ns if other inputs are high.

7404 IC – The 7404 IC has six inverting gates. The IC has the following pin configuration –

Table Listing Pin Configuration of 7404 IC

Fig. 10: Table listing pin configuration of 7404 IC

The IC has the following Pin Diagram –
Pin Diagram of 7404 IC

Fig. 11: Pin Diagram of 7404 IC

The IC requires a supply voltage of 5V which can be tolerated up to 7V. The voltage at the inputs of NOT gates must be 2V for high logic and 0.8 V for low logic. The output of the NOT gates have a voltage of 3.4 V for high logic and 0.2 V for low logic. The IC operates on positive logic system. The propagation delay while transiting from LOW to HIGH level at the output is 22 ns while propagation delay while transiting from HIGH to LOW level at the output is 15 ns.

It must be noted that the selected ICs have compatible input, output and supply voltage levels. They are taken from a common family (74XX series) of digital ICs.

The half adder is constructed by connecting the inputs to an EX-OR gate (pins 1 and 2 of 7486 IC) and an AND gate (pins 1 and 2 of 7408 IC). The Sum bit is drawn from output of the EX-OR gate (pin 3 of 7486 IC) and the carry is drawn from output of the AND gate (pin 3 of 7408 IC).

The full adder is constructed by connecting the inputs to one EX-OR gate (pins 1 and 2 of 7486 IC) and one AND gate (pins 1 and 2 of 7408 IC). The output from first EX-OR gate (pin 3 of 7486 IC) is connected to input of second EX-OR gate (pin 4 of 7486 IC) and input of second AND gate (pin 4 of 7408 IC). The Carry input is connected to another input of the second EX-OR gate (pin 5 of 7486 IC) and other input of second AND gate (pin 5 of 7408 IC). The sum bit is drawn from output of the second EX-OR gate (pin 6 of 7486 IC). The output from second AND gate (pin 6 of 7408 IC) is connected to one input of OR gate (pin 1 of 7432 IC) and output from first AND gate (pin 3 of 7408 IC) is connected to other input of OR gate (pin 2 of 7432 IC). The carry out is drawn from output of the OR gate (pin 3 of 7432 IC).

The half subtractor is constructed by connecting the inputs to an EX-OR gate (pins 1 and 2 of 7486 IC) and connecting one input to input of NOT gate (pin 1 of 7404 IC) and one directly to the input of an AND gate (pin 2 of 7408 IC). The output from NOT gate (pin 2 of 7404 IC) is connected to input of the AND gate (pin 1 of 7408 IC). The Difference bit is drawn from output of the EX-OR gate (pin 3 of 7486 IC) and the borrow is drawn from output of the AND gate (pin 3 of 7408 IC).

The full subtractor is constructed by connecting the inputs to first EX-OR gate (pins 1 and 2 of 7486 IC) and connecting one input to input of first NOT gate (pin 1 of 7404 IC) and one directly to the input of first AND gate (pin 2 of 7408 IC). The output from first NOT gate (pin 2 of 7404 IC) is connected to input of the first AND gate (pin 1 of 7408 IC). The output from first EX-OR gate (pin 3 of 7486 IC) is connected to input of second EX-OR gate (pin 4 of 7486 IC) and input of second NOT gate (pin 3 of 7404 IC). The Carry input is connected to another input of the second EX-OR gate (pin 5 of 7486 IC) and other input of second AND gate (pin 5 of 7408 IC). The Difference bit is drawn from output of the second EX-OR gate (pin 6 of 7486 IC). The output from second AND gate (pin 6 of 7408 IC) is connected to one input of OR gate (pin 1 of 7432 IC) and output from first AND gate (pin 3 of 7408 IC) is connected to other input of OR gate (pin 2 of 7432 IC). The borrow out is drawn from output of the OR gate (pin 3 of 7432 IC).

How the circuit works –

Each combinational circuit has its own truth table and respective boolean expressions for the outputs. The circuits constructed above and their expected outputs are discussed below –

Half Adder

The binary adder is the basic arithmetic circuit as the operation of adding binary numbers is a fundamental task in computing. The binary addition follows the following rules –

0 + 0 = 0

1 + 0 = 1

0 + 1 = 1

1 + 1 = 10

In the first three operations, each binary addition gives sum as one bit, i.e., either 0 or 1. But the fourth addition operation gives a sum that consists of two binary digits. In such case, lower significant bit is called as the sum bit, whereas the higher significant bit is called as the carry bit.

The half adder has the following truth table –

Truth Table of Half Adder

Fig. 12: Truth Table of Half Adder

From the above truth table, the following K-map are drawn for deriving the boolean expressions for the sum and carry output –
K-Map for Sum in Half-Adder

                  Fig. 13: K-Map for Sum in Half-Adder                 

 K-Map for Carry Out in Half-Adder

Fig. 14: K-Map for Carry Out in Half-Adder

So, the boolean expressions for Sum and Carry output are as follow –

SUM = A’B + AB’ or SUM = A B

CARRY = AB

So, the binary adder constructed in this project gives a sum with carry. This Half adder has two inputs for the two bits to be added and two outputs one from the sum ‘ S’ and other from the carry ‘ c’ into the higher adder position. In the circuit for half adder, the carry signal from the addition of the less significant bits is drawn from the output of AND gate while the sum is drawn from the output of the EX-OR Gate.

Full Adder

Full adder is a combinational circuit that forms the arithmetic sum of input. It consists of three inputs and two outputs. A full adder is useful to add three bits at a time but a half adder cannot do so. The full adder has the following truth table –

Truth Table of Full Adder

Fig. 15: Truth Table of Full Adder

From the above truth table, the following K-map are drawn for deriving the boolean expressions for the sum and carry output –
K-Map for Sum in Full-Adder

Fig. 16: K-Map for Sum in Full-Adder

K-Map for Carry Out in Full-Adder

Fig. 17: K-Map for Carry Out in Full-Adder

So, the boolean expressions for Sum and Carry output are as follow –

SUM = A’B’C + A’BC’ + ABC

  = A’(B’C  BC’) + A(BC’  BC)

  = A’(B  C) + A (B  C)

  = A  B  C

CARRY = A’BC + ABC + ABC’ + AB’C

= AB + A’BC + AB’C

= AB + C(A  B)

= AB + BC + AC

Half Subtractor 

The half subtractor is constructed using X-OR and the AND Gates. The half subtractor has two input and two outputs. The outputs are difference and borrow. The difference can be applied using X-OR Gate, borrow output can be implemented using an AND Gate and an inverter. The half Subtractor has the following truth table –

Truth Table of Half Subtractor

Fig. 18: Truth Table of Half Subtractor

From the above truth table, the following K-map are drawn for deriving the boolean expressions for the difference and borrow output –
K-Map for Difference in Half-Subtractor

Fig. 19: K-Map for Difference in Half-Subtractor

K-Map for Borrow in Half-Subtractor

Fig. 20: K-Map for Borrow in Half-Subtractor

So, the boolean expressions for Difference and Borrow output are as follow –

DIFFERENCE = A’B + AB’

BORROW = A’B

Full Subtractor

The full subtractor is a combination of X-OR, AND, OR, NOT Gates. In a full subtractor the logic circuit should have three inputs and two outputs. The two half subtractor put together gives a full subtractor. The full subtractor has the following truth table –

Truth Table of Full Subtractor

Fig. 21: Truth Table of Full Subtractor

From the above truth table, the following K-map are drawn for deriving the boolean expressions for the difference and borrow output –

 K-Map for Difference in Full-Subtractor

Fig. 22: K-Map for Difference in Full-Subtractor

K-Map for Borrow in Full-Subtractor

Fig. 23: K-Map for Borrow in Full-Subtractor

So, the boolean expressions for Difference and Borrow output are as follow –

DIFFERENCE = A  B  C

BORROW = A’B + BC + A’C

Testing the circuits –

The combinational circuits designed above can be tested by giving supply voltage to the ICs by a battery via 7805 voltage regulator. The same voltage can be dropped to 2V level using a variable resistor for HIGH logic while providing LOW logic through ground. The output signals can be checked by connecting LEDs at the output pins of each combinational circuit. The circuits can be checked by verifying truth tables for each circuit.

In the next tutorial, learn about code converter circuits.

Circuit Diagrams

Circuit-Diagram-Full-Adder
Circuit-Diagram-Full-Subtractor


Filed Under: Digital Electronics, Featured Contributions, Tutorials

 

Next Article

← Previous Article
Next Article →

Questions related to this article?
👉Ask and discuss on EDAboard.com and Electro-Tech-Online.com forums.



Tell Us What You Think!! Cancel reply

You must be logged in to post a comment.

EE TECH TOOLBOX

“ee
Tech Toolbox: 5G Technology
This Tech Toolbox covers the basics of 5G technology plus a story about how engineers designed and built a prototype DSL router mostly from old cellphone parts. Download this first 5G/wired/wireless communications Tech Toolbox to learn more!

EE Learning Center

EE Learning Center
“engineers
EXPAND YOUR KNOWLEDGE AND STAY CONNECTED
Get the latest info on technologies, tools and strategies for EE professionals.

HAVE A QUESTION?

Have a technical question about an article or other engineering questions? Check out our engineering forums EDABoard.com and Electro-Tech-Online.com where you can get those questions asked and answered by your peers!


RSS EDABOARD.com Discussions

  • Resistor Selection for Amplifier Layout
  • Permittivity and Permealibility in CST
  • Testing 5kW Grid Tied inverter over 200-253VAC
  • Single ended measuring ports and balanced antenna
  • Thermal modelling of repetitive power pulse

RSS Electro-Tech-Online.com Discussions

  • Can I make two inputs from one??
  • Beats Solo 4
  • Behlke swich
  • Is AI making embedded software developers more productive?
  • Simple LED Analog Clock Idea

Featured – LoRa/LoRaWan Series

  • What is the LoRaWAN network and how does it work?
  • Understanding LoRa architecture: nodes, gateways, and servers
  • Revolutionizing RF: LoRa applications and advantages
  • How to build a LoRa gateway using Raspberry Pi
  • How LoRa enables long-range communication
  • How communication works between two LoRa end-node devices

Recent Articles

  • RPi Python Programming 21: The SIM900A AT commands
  • RPi Python Programming 22: Calls & SMS using a SIM900A GSM-GPRS modem
  • RPi Python Programming 23: Interfacing a NEO-6MV2 GPS module with Raspberry Pi
  • RPi Python Programming 24: I2C explained
  • RPi Python Programming 25 – Synchronous serial communication in Raspberry Pi using I2C protocol

EE ENGINEERING TRAINING DAYS

engineering

Submit a Guest Post

submit a guest post
Engineers Garage
  • Analog IC TIps
  • Connector Tips
  • Battery Power Tips
  • DesignFast
  • EDABoard Forums
  • EE World Online
  • Electro-Tech-Online Forums
  • EV Engineering
  • Microcontroller Tips
  • Power Electronic Tips
  • Sensor Tips
  • Test and Measurement Tips
  • 5G Technology World
  • Subscribe to our newsletter
  • About Us
  • Contact Us
  • Advertise

Copyright © 2025 WTWH Media LLC. All Rights Reserved. The material on this site may not be reproduced, distributed, transmitted, cached or otherwise used, except with the prior written permission of WTWH Media
Privacy Policy

Search Engineers Garage

  • Electronic Projects & Tutorials
    • Electronic Projects
      • Arduino Projects
      • AVR
      • Raspberry pi
      • ESP8266
      • BeagleBone
      • 8051 Microcontroller
      • ARM
      • PIC Microcontroller
      • STM32
    • Tutorials
      • Audio Electronics
      • Battery Management
      • Brainwave
      • Electric Vehicles
      • EMI/EMC/RFI
      • Hardware Filters
      • IoT tutorials
      • Power Tutorials
      • Python
      • Sensors
      • USB
      • VHDL
    • Circuit Design
    • Project Videos
    • Components
  • Articles
    • Tech Articles
    • Insight
    • Invention Stories
    • How to
    • What Is
  • News
    • Electronic Product News
    • Business News
    • Company/Start-up News
    • DIY Reviews
    • Guest Post
  • Forums
    • EDABoard.com
    • Electro-Tech-Online
    • EG Forum Archive
  • DigiKey Store
    • Cables, Wires
    • Connectors, Interconnect
    • Discrete
    • Electromechanical
    • Embedded Computers
    • Enclosures, Hardware, Office
    • Integrated Circuits (ICs)
    • Isolators
    • LED/Optoelectronics
    • Passive
    • Power, Circuit Protection
    • Programmers
    • RF, Wireless
    • Semiconductors
    • Sensors, Transducers
    • Test Products
    • Tools
  • Learn
    • eBooks/Tech Tips
    • Design Guides
    • Learning Center
    • Tech Toolboxes
    • Webinars & Digital Events
  • Resources
    • Digital Issues
    • EE Training Days
    • LEAP Awards
    • Podcasts
    • Webinars / Digital Events
    • White Papers
    • Engineering Diversity & Inclusion
    • DesignFast
  • Guest Post Guidelines
  • Advertise
  • Subscribe