Implementation of Full Adder using NAND Gates
Last Updated :
25 Apr, 2024
In Digital Logic Circuit, Full Adder is a Digital Logic Circuit that can add three inputs and give two outputs. The three inputs such as A, B, and input carry as Cin. The output carry is represented as Cout and the normal output is represented as S, Sum. The Cout is also known as the majority 1âs detector, whose output goes high when more than one input is high.
In Digital Logic Circuits, Full Adders are implemented using digital logic gates such as OR gate, AND gate, NOT gate, NAND gates, NOR gates, etc. In this article, we will explore Full Adders, and NAND Gates and execute the Implementation of Full Adder using NAND Gates.
What is a Full Adder?
Full Adder is a Digital Logic Circuits that can add three inputs and give two outputs i.e. three inputs such as A, B, and input carry as Cin and gives a sum output and carry output i.e. two outputs. A Full Adder Circuit performs as the brain of the most of Digital Logic Circuits that execute addition or subtraction.
A Full Adder require the use of nine NAND gates. The Arithmetic Logic Unit, ALU uses Full Adders. In a computer, Full Adders are utilized by the ALU to produce memory addresses and relocate the Program Counter to the next instruction.
Now, Here we will understand Full Adder by Block Diagram of Full Adder where we will discuss and explain it by using :
- Truth Table of Full Adder
- Logical Expression for Full Adder
Block Diagram of Full Adder
The Block Diagram of Full Adder is shown below
Full Adder
Logical Expression of a Full Adder
Given below is the Expression for Full Adder which includes Sum and Carry
Sum=A â B â Cin
Cout= AB + ACin + BCin
Where, A, B, Cin are the Inputs of the Full Adder
Applications of Full Adder
- Arithmetic Circuits:Â Full adders are used in arithmetic circuits to add two double fold numbers. When unique Full Adders are connected in a chain, they can compute multi-bit paired numbers.
- Data Handling:Â Full adders are used in information handling applications such as advanced signal manipulation, encoding of information, and mistake correction.
- Counters:Â Full adders are used in counters to perform addition or decrement the count by one.
- Multiplexers and Demultiplexers:Â Full adders are used in multiplexers and demultiplexers to choose and course information.
- Addressing Memory:Â Full adders are used in memory addressing circuits to produce the location of a particular memory area.
- ALUs:Â Full adders are used as a basic part of Number juggling Rationale Units (ALUs) used in chip and computerized signal processors.
What is a NAND Gate?
A NAND gate is one of the type of Universal Gates in which the two basic logic gates are combined as the NAND gate can implement any Boolean function without the use of basic gates and also find the results of logical inputs without the use of any other logic gates.
The NAND gate or âNotANDâ gate is the combination of two basic logic gates are connected in series i.e. the AND gate and the NOT gate. NAND gate output is high when one of the two inputs is high or if both inputs are low. It means the output is always high and when both the inputs are high then the output is low.
Symbol of a NAND Gate
Given Below is the Symbol For NAND Gate
Logical expression of a NAND Gate
In the expression, Two inputs are represented as A and B and the Output is X, then the expression is â
X = (A.B)â
NAND Gate
Applications of NAND Gate
- Universal Gate:Â NAND gate is known as Universal Gate because basic logic gates can be created using Universal Gate.
- Data Store:Â NAND gates are utilized to establish sequential circuits such as Flip-Flops and Latches, which is a main part of data storage.
- Arithmetic Logic:Â NAND gates are highly utilized in Arithmetic Logic Units (ALUs) of a computing device to execute operations such as addition, subtraction, etc.
- Encoder and Decoder:Â NAND gates are utilized in Encoder and Decoder circuits to transform a binary code directly into a group of digital signals and vice versa.
- Multiplexers and Demultiplexers:Â NAND gates are utilized in Multiplexers to conclude that a signal should take which path to arrive a single output. Demultiplexer is the reverse of Multiplexer.
- Clock Generators:Â NAND gates utilized in Clock generators to execute clock signals where various operations are synchronized in Digital Circuit.
- Logical Operations:Â NAND gates are also utilized to implement logical operations.
Implementation of Full Adder using NAND Gates
Implementation of Full Adder using NAND Gates is realization of Full Adder by using minimum nine NAND Gates during which we will have 2 outputs at the end namely Cout and Sum.
Given Below is the Circuit For Implementation of Full Adder using NAND Gates :
Full Adder Using NAND GatesLogical Expression for Full Adder using NAND Gate
Using Half Adder Equation of Sum, we get
Sum=A\overline{B}+\overline{A}B
=AA\overline{B}+\overline{A}B+A\overline{A}+B\overline{B} Because A\overline{A}=0
=A\overline{B}+A\overline{A}+\overline{A}B+B\overline{B} Because B\overline{B}=0
=A(\overline{B}+\overline{A})+B(\overline{A}+\overline{B})
=A(\overline{AB})+B(\overline{AB}) By De-Morgan's Theorem
=\overline{\overline{A(\overline{AB})+B(\overline{AB})}} Because \overline{\overline{A}}=A
Sum=\overline{\overline{A(\overline{AB})}.\overline{B(\overline{AB})}} By De-Morgan's Theorem
Using Half Adder Equation of Carry, we get
Carry=A.B
=\overline{\overline{A.B}} Because \overline{\overline{A}}=A
Sum=A\overline{B}+\overline{A}B
=\overline{\overline{A(\overline{AB})}.\overline{B(\overline{AB})}} Equation-1
For Full Adder Equation of Sum, we realize
Sum=AâBâCin Put AâB=x
=xâCin
=\overline{\overline{x(\overline{xCin})}.\overline{Cin(\overline{xCin})}} Comparing xâCin with AâB, Using Equation 1, we get
Sum={(\overline{A\overline{B}+\overline{A}B).(\overline{(A\overline{B}+\overline{A}B).Cin)}.\overline{Cin(\overline{(A\overline{B}+\overline{A}B).Cin)}}}
Carry=AB+(A\overline{B}+\overline{A}B).Cin
=\overline{\overline{AB+(A\overline{B}+\overline{A}B).Cin}}
=\overline{\overline{AB}.\overline{((A\overline{B}+\overline{A}B).Cin)}}
Steps To Implement the Full Adder using NAND Gate
- To realize Full Adder Using NAND Gate, We apply Inputs as A and B to Gate 1 then Output of Gate 1 is \overline{A.B}.
- Output of Gate 1 is given as input to Gate 2 and we give another input as A to Gate 2 then Output of Gate 2 is AB+\overline{A}.
- Output of Gate 1 is also given as input to Gate 3 and we give another input as B to Gate 3 then Output of Gate 3 is AB+\overline{B}.
- Output of Gate 2 is given as input to Gate 4 and Output of Gate 3 is given as another input to Gate 4 then Output of Gate 4 is A\overline{B}+\overline{A}B.
- Output of Gate 4 is given as input to Gate 5 and we give another input as Cin to Gate 5 then Output of Gate 5 is (\overline{A\overline{B}+\overline{A}B).Cin}.
- Output of Gate 5 is given as input to Gate 6 and Output of Gate 4 is given as another input to Gate 6 then Output of Gate 6 is \overline{(A\overline{B}+\overline{A}B).((\overline{A\overline{B}+\overline{A}B).Cin})}.
- Output of Gate 5 is also given as input to Gate 7 and we give another input as Cin to Gate 7 then Output of Gate 7 is \overline{Cin.((\overline{A\overline{B}+\overline{A}B).Cin})}.
- Output of Gate 6 is given as input to Gate 8 and Output of Gate 7 is given as another input to Gate 8 then Output of Gate 8 is \overline{\overline{(A\overline{B}+\overline{A}B).((\overline{A\overline{B}+\overline{A}B).Cin})}.\overline{Cin.((\overline{A\overline{B}+\overline{A}B).Cin})}}.
- So, we can see that output of Gate 8 is Sum, S i.e. AâBâCin
- Output of Gate 5 is given as input to Gate 9 and Output of Gate 1 is given as another input to Gate 9 then Output of Gate 9 is \overline{\overline{AB}.((\overline{A\overline{B}+\overline{A}B).Cin})}.
- Also, we can realize that output of Gate 9 is Carry, Cout i.e. AB+(AâB).Cin
Applications of Implementation of a Full Adder using NAND Gates
Given Below are the Applications of Implementation of a Full Adder using NAND Gates
- Digital Calculators: Full adders are utilized in digital calculators to execute an arithmetic addition of two binary numbers. As an implementation of a Full Adder using NAND gates decreases the required number of gates , so that clarifies the design and decreases the overall circuit size.
- Microprocessors: Full adders are utilized in microprocessors to execute arithmetic addition of two binary numbers. As an implementation of a Full Adder using NAND gates decreases the propagation delay, which enlarges the microprocessor speed.
- Digital Signal Processing: Full adders are utilized in digital signal processing applications such as audio and video processing. As an implementation of a Full Adder using NAND gates decreases the power consumption and enlarges the circuit performance.
- Cryptography: In cryptography, Full adders are utilized as applications like encryption and decryption. As an implementation of Full Adder using NAND gates reduces the circuit complexity, which makes the implementation more efficient and secure.
- Control Systems: In control systems, Full Adders are utilized to perform some arithmetic operations on binary signals. As an implementation of full adder using NAND gates decreases the required number of gates, so that simplify the design and decreases the overall size of the circuit. Ultimately, Implementation of Full Adder using NAND gates gives several advantages, for eg decreased complexity, minimized overall size of circuit, and simplified design, making it a great choice in many applications of digital circuit.
Conclusion
Here, we saw how we can use a universal gate called the 'NAND' gate to implement the Full Adder. This is important as it helps us analyze the working behind universal gates and we can understand how we can implement Full Adder using universal gates. As NAND gates are the only type of gate available, or where NAND gates are more cost-effective than other gates.
Although, it is foremost to account that NAND gates outcomes in a small size circuit, which can be essential for applications where space is restricted. NAND gates are known for their high reliability, and using them in a full adder can result in a more reliable circuit.
Subsequently NAND gates are fundamental building blocks of digital logic circuits, improving a NAND gates using circuit implementation technique is correspondingly quite easy, forming it suitable to form changes to the design as required. It is instructed that readers go through all other realizations to understand the basic functioning behind other important gates. FAQ's have been responded that enfold some fundamental opinions. Readers can also refer to these questions as well.
Implementation of Full Adder using NAND Gates - FAQs
Why is NAND Gate known as Universal Gate?
NAND Gate is known as Universal Gate because it produces basic logic gates like AND gate, OR gate, and NOT gate in the absence of any other gates.
What is the Expression for Sum in Full Adder?
The expression for Sum in Full Adder is:
S = A â B â Cin
What is the Expression for Cout in Full Adder?
The expression for Carry, Cout in Full Adder is:
Cout = AB + (A â B).Cin
How many NAND gates are required to achieve Full Adder?
To implement full adder using NAND gates we require nine NAND gates.
How is a NAND gate unlike from an AND gate?
The inverse output of an AND gate is the NAND gate which means that the output of an AND gate will just be opposite in case of NAND gate. It is short form of NOT-AND gate.
Similar Reads
How to implement inheritance in ES6 ?
In this article, we will know how inheritance is implemented in es6. The ES6 JavaScript supports Object-Oriented programming components such as Object, Class and Methods. Further in Classes we can implement inheritance to make child inherits all methods of Parent Class. This can be done using the ex
2 min read
How to implement inheritance in Node.js bindings?
Node.js serves as a robust runtime environment, empowering developers to construct server-side applications that are both scalable and efficient. One of its key features is the ability to bind to C or C++ libraries, providing a bridge between JavaScript and lower-level languages. In this article, we
3 min read
How to conditionally add a member to an object using JavaScript?
Objects are the most important data types and are building blocks for modern JavaScript. They are different from primitive data-types such as String, Number, Boolean, null, etc. But we can make these datatypes as objects by using the new keyword. Below are the approaches to conditionally adding a me
3 min read
How do we Create a Deep Clone of a Value using Lodash?
Lodash provides the _.cloneDeep() method to create a deep copy of a value, recursively cloning nested objects and arrays. This method ensures that the newly created object has the same value as the original but they are distinct objects in memory. Syntax_.cloneDeep(originalObj)Return Value:This meth
3 min read
How to create clone of any object using jQuery ?
In this article, we will learn to create a clone of an object using jQuery. This can be achieved using the extend() method of jQuery. The extend() method is used to merge the contents of multiple objects into the object passed as the first parameter. This can be used to clone an array as we can pass
3 min read
How to Create a Shallow Clone of a Value using Lodash ?
Shallow copy is the process of duplicating an object or array at the top level without copying nested objects or arrays. Below are the possible approaches to creating a shallow clone of a value using Lodash. Table of Content Using clone() functionUsing assign() functionUsing merge() functionUsing _.
2 min read
JavaScript Program to Implement Own Object Assign Method
Let's create a custom function called assign that does exactly what Object.assign() does. It will take one or more objects as sources and a target object. Then, it will copy all the properties we can loop over (called enumerable properties) from the source objects to the target object. If a property
2 min read
How to create a variable using a user-defined name in JavaScript ?
In this article, we will learn to create a variable using the user-defined name in JavaScript. Variables in JavaScript: Basically, it is a container that holds reusable data in JavaScript. The variable's value can be changed during program execution and should be declared before using it. Before ES6
2 min read
How to clone a block using jQuery ?
In this article, we will learn how to clone a block using jQuery. The clone method in jQuery performs a deep copy of a set of matching elements. You can create a copy of the data as well as a copy of the event handlers. Whenever we are building a dynamic website then this method is very efficient an
2 min read
How to Move a Key in an Array of Objects using JavaScript?
The JavaScript array of objects is a type of array that contains JavaScript objects as its elements. You can move or add a key to these types of arrays using the below methods in JavaScript: Table of Content Using Object Destructuring and Map()Using forEach() methodUsing for...of LoopUsing reduce()
5 min read
How to Create an Array of Object Literals in a Loop using JavaScript?
Creating arrays of object literals is a very frequent activity in JavaScript, as often when working with data structures, several objects are needed. This article will allow your hand through different ways of coming up with an array of object literals in a loop in JavaScript. Here are different app
5 min read
How to create an object from the given key-value pairs using JavaScript ?
In this article, we will learn to create an object from the given key-value pairs using JavaScript.Key-value pair: Unique identifier (key) associated with its corresponding value; fundamental for data organization and retrieval in programming. here we have some common approaches. We will explore the
5 min read
Motivation to bring symbols in ES6
Javascript comprised six datatypes undefined, null, boolean, String, Number and Object (includes array datatype). The Symbol is newly introduced datatype in ES6 also known as JavaScript 6, which makes the total number of data types in JavaScript is 7. It is a primitive datatype which means Symbol ca
3 min read
Different Ways to Crate an Array of Objects in JavaScript ?
Objects in JavaScript are key-value pairs, making them suitable for representing structured data. Also, an array in JavaScript is a versatile data structure that can hold a collection of values. When dealing with objects, an array can be used to store multiple objects. An array of objects allows you
3 min read
How to Remove Duplicates from an Array of Objects using TypeScript ?
We are given an array of objects and we have to check if there are duplicate objects present in the array and remove the duplicate occurrences from it. Otherwise, return the array as it is. Examples of Removing Duplicates from an Array of Objects using TypeScript Table of Content Using filter() and
4 min read
Create an array filled with given values Using JavaScript
In JavaScript, an array is a collection of values that can be stored and accessed in a single variable. Each value in an array is called an element, and elements can be of any data type, such as numbers, strings, or other objects. Arrays are indexed, meaning that each element has a numerical positio
5 min read
What is the difference between createElement and cloneElement ?
This article will help us to gain knowledge of createElement and cloneElement and we will also learn them with code examples and their difference. We will learn the following methods: Table of Content React.createElement() React.cloneElement()Difference between createElement and cloneElementReact.cr
3 min read
ArrayList clone() method in Java with Examples
The Java.util.ArrayList.clone() method is used to create a shallow copy of the mentioned array list. It just creates a copy of the list. Syntax: ArrayList.clone() Parameters: This method does not take any parameters. Return Value: This function returns a copy of the instance of Linked list. Below pr
2 min read
What are factory functions in JavaScript ?
In JavaScript, a factory function is a function that returns an object. It is a way of creating and returning objects in a more controlled and customizable manner. Factory functions are a form of design pattern that enables the creation of objects with specific properties and behaviors. Why it is us
2 min read