The Wayback Machine - https://web.archive.org/web/20240927000444/https://www.geeksforgeeks.org/carry-look-ahead-adder/
Open In App

Carry Look-Ahead Adder

Last Updated : 23 Feb, 2023
Summarize
Comments
Improve
Suggest changes
Like Article
Like
Save
Share
Report
News Follow

The adder produce carry propagation delay while performing other arithmetic operations like multiplication and divisions as it uses several additions or subtraction steps. This is a major problem for the adder and hence improving the speed of addition will improve the speed of all other arithmetic operations. Hence reducing the carry propagation delay of adders is of great importance. There are different logic design approaches that have been employed to overcome the carry propagation problem. One widely used approach is to employ a carry look-ahead which solves this problem by calculating the carry signals in advance, based on the input signals. This type of adder circuit is called a carry look-ahead adder.

Here a carry signal will be generated in two cases:

  1. Input bits A and B are 1
  2. When one of the two bits is 1 and the carry-in is 1.

In ripple carry adders, for each adder block, the two bits that are to be added are available instantly. However, each adder block waits for the carry to arrive from its previous block. So, it is not possible to generate the sum and carry of any block until the input carry is known. The i^{th}     block waits for the i-1^{th}     block to produce its carry. So there will be a considerable time delay which is carry propagation delay. 


 

Consider the above 4-bit ripple carry adder. The sum S_{3}     is produced by the corresponding full adder as soon as the input signals are applied to it. But the carry input C_{4}     is not available on its final steady-state value until carry C_{3}     is available at its steady-state value. Similarly C_{3}     depends on C_{2}     and C_{2}     on C_{1}     . Therefore, though the carry must propagate to all the stages in order that output S_{3}     and carry C_{4}     settle their final steady-state value. 

The propagation time is equal to the propagation delay of each adder block, multiplied by the number of adder blocks in the circuit. For example, if each full adder stage has a propagation delay of 20 nanoseconds, then S_{3}     will reach its final correct value after 60 (20 × 3) nanoseconds. The situation gets worse, if we extend the number of stages for adding more number of bits. 

Carry Look-ahead Adder : 
A carry look-ahead adder reduces the propagation delay by introducing more complex hardware. In this design, the ripple carry design is suitably transformed such that the carry logic over fixed groups of bits of the adder is reduced to two-level logic. Let us discuss the design in detail. 


 




 




Consider the full adder circuit shown above with corresponding truth table. We define two variables as ‘carry generate’ G_{i}     and ‘carry propagate’ P_{i}     then, 
P_{i} = A_{i} \oplus B_{i} \newline G_{i} = A_{i} B_{i}
 

The sum output and carry output can be expressed in terms of carry generate G_{i}     and carry propagate P_{i}     as


S_{i} = P_{i} \oplus C_{i} \newline C_{i+1} = G_{i} + P_{i} C_{i}
where G_{i}     produces the carry when both A_{i}     , B_{i}     are 1 regardless of the input carry. P_{i}     is associated with the propagation of carry from C_{i}     to C_{i + 1}     . 
 

The carry output Boolean function of each stage in a 4 stage carry look-ahead adder can be expressed as


C_{1} = G_{0} + P_{0} C_{in} \newline C_{2} = G_{1} + P_{1} C_{1} = G_{1} + P_{1} G_{0} + P_{1} P_{0} C_{in} \newline C_{3} = G_{2} + P_{2} C_{2} = G_{2} + P_{2} G_{1} + P_{2} P_{1} G_{0} + P_{2} P_{1} P_{0} C_{in} \newline C_{4} = G_{3} + P_{3} C_{3} = G_{3} + P_{3} G_{2} + P_{3} P_{2} G_{1} + P_{3} P_{2} P_{1} G_{0} + P_{3} P_{2} P_{1} P_{0} C_{in} \newline
 

From the above Boolean equations we can observe that C_{4}     does not have to wait for C_{3}     and C_{2}     to propagate but actually C_{4}     is propagated at the same time as C_{3}     and C_{2}     . Since the Boolean expression for each carry output is the sum of products so these can be implemented with one level of AND gates followed by an OR gate.


The implementation of three Boolean functions for each carry output (C_{2}     , C_{3}     and C_{4}     ) for a carry look-ahead carry generator shown in below figure. 

 




Time Complexity Analysis : 
We could think of a carry look-ahead adder as made up of two “parts” 
 

  1. The part that computes the carry for each bit.
  2. The part that adds the input bits and the carry for each bit position.



The log(n)     complexity arises from the part that generates the carry, not the circuit that adds the bits. 
Now, for the generation of the n^{th}     carry bit, we need to perform a AND between (n+1) inputs. The complexity of the adder comes down to how we perform this AND operation. If we have AND gates, each with a fan-in (number of inputs accepted) of k, then we can find the AND of all the bits in log_{k}(n+1)     time. This is represented in asymptotic notation as \Theta(log n)     . 

Advantages and Disadvantages of Carry Look-Ahead Adder : 
Advantages – 
 

  • The propagation delay is reduced.
  • It provides the fastest addition logic.


Disadvantages – 
 

  • The Carry Look-ahead adder circuit gets complicated as the number of variables increase.
  • The circuit is costlier as it involves more number of hardware.

NOTE : 

For n-bit carry lookahead adder to evaluate all the carry bits it requires [n(n + 1)]/2 AND gates and n OR gates.




GATE CS Corner Questions 

Practicing the following questions will help you test your knowledge. All questions have been asked in GATE in previous years or in GATE Mock Tests. It is highly recommended that you practice them. 
 

  1. GATE CS 2016 (Set-1), Question 43
  2. GATE CS 2004, Question 90
  3. GATE CS 2007, Question 85
  4. GATE CS 2006, Question 85
  5. GATE CS 1997, Question 15



References – 
iitkgp.virtual-labs 
Carry-lookahead adder – Wikipedia 



 



Previous Article
Next Article

Similar Reads

Difference between Serial Adder and Parallel Adder
Addition is a fundamental operation in digital electronics, and is used in a wide range of applications such as arithmetic, data processing, and control systems. There are two main types of adders used in digital circuits: Serial Adder and Parallel Adder. Understanding the differences between these two types of adders is essential to designing and
3 min read
Difference between Half Adder and Full Adder
In this article, we will go through the Difference between the Half adder and Full adder, First, we will briefly describe what is half and full adders with their logical expressions and truth table, and then we will go through their differences between them, At last we will conclude our article with some FAQs. Table of Content What is Half Adder?Wh
6 min read
Difference between LOOK and C-LOOK Disk scheduling algorithms
1. LOOK disk scheduling algorithm : Look Algorithm is actually an improves version of SCAN Algorithm. In this algorithm, the head starts from first request at one side of disk and moves towards the other end by serving all requests in between. After reaching the last request of one end, the head reverse its direction and returns to first request, s
3 min read
Journaling or write-ahead logging
Journaling, or write-ahead logging is a sophisticated solution to the problem of file system inconsistency in operating systems. Inspired by database management systems, this method first writes down a summary of the actions to be performed into a "log" before actually writing them to the disk. Hence the name, "write-ahead logging". In the case of
4 min read
Synchronous Series Carry Counter
Synchronous Series Carry Counter is such a synchronous counter where inputs of flip-flops are connected in such a manner that only those flip-flops that are toggle on a given clock will have input value as the logic 1. The advantage of this counter is that it reduces the decoding error. Block Diagram of Synchronous Series Carry Counter: Here is the
2 min read
Synchronous Parallel-Carry Binary Counter
Synchronous Counter: It is a digital circuit that performs counting in binary numbers with the help of flip-flops and all flip-flops triggered simultaneously. Synchronous Counter design procedure for a given counting sequence: Identify the numbers of flip-flops(FFs), inputs, and outputs required for the count sequence.Select the type of FF going to
5 min read
4-bit Ripple Carry Counter in Verilog HDL
To proceed with Verilog Code, we shall first understand the structure of the 4-bit Ripple Counter. The top design block consists of four T-Flip Flop. For time being ignore the input and output of T-Flip Flop. Let us consider the overall outside structure of Ripple Counter. We have two inputs i.e., clock and reset and q is output. The output q is in
3 min read
C++ program to implement Half Adder
Prerequisite : Half Adder in Digital Logic We are given with two inputs A and B. Our task is to implement Half Adder circuit and print the outputs sum and carry of two inputs. Introduction : The Half adder is a combinational circuit which add two1-bit binary numbers which are augend and addend to give the output value along with the carry. The half
2 min read
4-bit binary Adder-Subtractor
In Digital Circuits, A Binary Adder-Subtractor is capable of both the addition and subtraction of binary numbers in one circuit itself. The operation is performed depending on the binary value the control signal holds. It is one of the components of the ALU (Arithmetic Logic Unit). This Circuit Requires prerequisite knowledge of Exor Gate, Binary A
3 min read
Serial Binary Adder in Digital Logic
Serial binary adder is a combinational logic circuit that performs the addition of two binary numbers in serial form. Serial binary adder performs bit by bit addition. Two shift registers are used to store the binary numbers that are to be added. A single full adder is used to add one pair of bits at a time along with the carry. The carry output fr
2 min read
Size of ROM for n-bit Adder/Subtractor
ROM is a read-only memory which is used to store the data. The memory in the ROM is organized as a two-dimensional array of memory cells. The memory will read or write the contents of one of the rows of the array. This row is specified by an Address which are bits. The value read or written is called Data. Figure a) shows a memory array with two ad
3 min read
1 Bit Full Adder using Multiplexer
Prerequisite : Multiplexer, Full adder Introduction : Multiplexer and Full adder are two different Digital Logic circuits. The Multiplexer is a digital switch. It allows digital information from several sources to be routed onto a single output line. On the other hand, the Full adder circuit performs the addition of three bits and produces the Sum
3 min read
Full Adder Using Demultiplexer
Full Adder is a combinatorial circuit that computes the sum and carries out two input bits and an input carry. So it has three inputs - the two bits A and B, and the input carry Cin, and two outputs - sum S and output carry Cout. Demultiplexer is a combinational circuit which has 1 input, n selection lines and generates 2n outputs. It is the revers
2 min read
Half Adder Using Verilog
A half adder is a digital logic circuit that performs binary addition of two single-bit binary numbers. It has two inputs, A and B, and two outputs, SUM and CARRY. In this article we will discuss how to implement a Half adder Using Verilog HDL. Aim: Develop a Half Adder using Verilog module. Theory: Half adder is also called as simple Binary Adder.
3 min read
Implementation of Full Adder using NOR Gates
In Digital Logic Circuit, Full Adder is a Digital Logic Circuit that can add three inputs and give two outputs. The three inputs A, B, and input carry as Cin. Cout is represented as output carry and Sum is represented as output. We can say Cout is called the majority 1’s detector, when more than one input is high (logic 1) then its output will be h
8 min read
Implementation of Full Adder using NAND Gates
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
9 min read
Implementation of Full Adder Using Half Adders
Implementation of full adder from half adders is possible because the half adders add two 1-bit inputs in full adder we add three 1-bit inputs. To obtain a full adder from a half adder we take the first two inputs and add them and use the sum and carry outputs and the third input to get the final sum and carry output of the full adder. In this arti
5 min read
Binary Adder with Logic Gates
Binary Adder and logic gates are important elements in digital logic. Binary adders are circuit which adds two binary numbers and results in the sum of the two binary numbers. Logic gates are the circuit in which a signal can pass through if a logic is applied through it. In this article we will discuss about the binary adder with logic gates, bina
8 min read
Python program to implement Full Adder
Prerequisite : Full Adder in Digital LogicGiven three inputs of Full Adder A, B,C-IN. The task is to implement the Full Adder circuit and Print output i.e sum and C-Out of three inputs. Full Adder : A Full Adder is a logical circuit that performs an addition operation on three one-bit binary numbers. The full adder produces a sum of the three input
2 min read
BCD Adder in Digital Logic
BCD stands for binary coded decimal. It is used to perform the addition of BCD numbers. A BCD digit can have any of ten possible four-bit representations. Suppose, we have two 4-bit numbers A and B. The value of A and B can vary from 0(0000 in binary) to 9(1001 in binary) because we are considering decimal numbers.  The output will vary from 0 to 1
8 min read
Half Adder and Half Subtractor using NAND NOR gates
Introduction : A Half Adder is a digital circuit that adds two single-bit binary numbers and outputs the sum and carry. It can be implemented using either NAND gates or with NOR gates. When using NAND gates : The sum output is given by A AND B. The carry output is given by the complement of A AND B. ​ ​W​hen NOR gate is used : The sum output is NOR
5 min read
Full Adder in Digital Logic
Full Adder is the adder that adds three inputs and produces two outputs. The first two inputs are A and B and the third input is an input carry as C-IN. The output carry is designated as C-OUT and the normal output is designated as S which is SUM. The C-OUT is also known as the majority 1's detector, whose output goes high when more than one input
5 min read
Parallel Adder and Parallel Subtractor
Adding and Subtracting numbers is very simple in digital electronics. To do this for quickly and efficiently, Most of the for binary numbers (numbers made of 1 and 0), we use circuits like the Parallel Adder and Parallel Subtractor. These types of circuits can handle more than one bit at a time, making the process faster. Binary AdditionBinary addi
6 min read
Full Adder using Verilog HDL
A full adder is a digital circuit in Verilog HDL that adds three binary numbers. It has two inputs for the numbers to be added, A and B, and one Carry-In input, Cin. The outputs are Sum, S, and Carry-Out, Cout. A full adder has been implemented using Verilog as shown in the previously shared code snippet. Problem StatementWrite a Verilog HDL to des
5 min read
Python program to implement Half Adder
Prerequisite: Half Adder in Digital Logic Given two inputs of Half Adder A, B. The task is to implement the Half Adder circuit and Print output i.e sum and carry of two inputs. Half Adder: A half adder is a type of adder, an electronic circuit that performs the addition of numbers. The half adder is able to add two single binary digits and provide
5 min read
Half Adder in Digital Logic
A half adder is a digital logic circuit that performs binary addition of two single-bit binary numbers. It has two inputs, A and B, and two outputs, SUM and CARRY. The SUM output is the least significant bit (LSB) of the result, while the CARRY output is the most significant bit (MSB) of the result, indicating whether there was a carry-over from th
4 min read
LOOK Disk Scheduling Algorithm
The LOOK Disk Scheduling Algorithm is the advanced version of the SCAN (elevator) disk scheduling algorithm which gives slightly better seek time than any other algorithm in the hierarchy (FCFS->SRTF->SCAN->C-SCAN->LOOK). It is used to reduce the amount of time it takes to access data on a hard disk drive by minimizing the seek time bet
13 min read
Difference between SCAN and LOOK Disk scheduling algorithms
SCAN disk scheduling algorithm: In SCAN disk scheduling algorithm, head starts from one end of the disk and moves towards the other end, servicing requests in between one by one and reach the other end. Then the direction of the head is reversed and the process continues as head continuously scan back and forth to access the disk. So, this algorith
4 min read
Difference between SSTF and LOOK disk scheduling algorithm
1. SSTF disk scheduling algorithm : SSTF stands for Shortest Seek Time First. As the name specify, this algorithm serves the task request which is closest to current position of head or pointer. Here, the direction of head plays an vital role in determining total head movement. If there occurs a tie between requests then the head will serve the req
3 min read
Difference Between SSTF and C-LOOK Disk Scheduling Algorithm
The secondary storage scheduling algorithm known as SSTF decides how the disk's head and arm will move in response to read and write requests while in C-SCAN the head services request only in one direction(either left or right) until all the requests in this direction are not serviced and then jumps back to the farthest request in the other directi
7 min read
Article Tags :
Practice Tags :