SlideShare a Scribd company logo
1 of 23
Peeyush Pashine (2011H140033H)
Single bit adders




     Half Adder     Full Adder
Full Adder
 Computes one-bit sum, carry
     si = ai XOR bi XOR ci
    ci+1 = aibi + aici + bici

 Adder delay is dominated by carry chain
 Ripple-carry adder: n-bit adder built from full adders.
 Delay of ripple-carry adder goes through all carry bits
4-bit Ripple carry adder




       T adder=(N-1)*Tcarry+ Tsum
 module fulladd(a,b,carryin,sum,carryout);
      input a, b, carryin; /* add these bits*/
      output sum, carryout; /* results */

        assign {carryout, sum} = a + b + carryin;
                           /* compute the sum and carry */
        endmodule

 module nbitfulladd(a,b,carryin,sum,carryout);
      input[7:0] a, b; /* add these bits */
      input carryin; /* carry in*/
      output [7:0] sum; /* result */
      output carryout;
      wire [7:1] carry; /* transfers the carry between bits */

      fulladd a0(a[0],b[0],carryin,sum[0],carry[1]);
      fulladd a1(a[1],b[1],carry[1],sum[1],carry[2]);
      fulladd a2(a[2],b[2],carry[2],sum[2],carry[3]);
      fulladd a3(a[3],b[3],carry[3],sum[3],carryout);
 endmodule
Substractor
Subs tractor-adder
Static adder Circuit




  Co= AB+BCi+ACi

  S= ABCi+Co’(A+B+Ci)
Manchester carry chain adder




     (a)Without pass transistors, (b)with pass transistors
Carry Look Ahead Adder
Carry Look Ahead Adder
   module sum(a,b,carryin,result);
            input a, b, carryin; /* add these bits*/
            output result; /* sum */

              assign result = a ^ b ^ carryin;
                                                 /* compute the sum */
   endmodule




   module carry_block(a,b,carryin,carry);
             input [3:0] a, b; /* add these bits*/
             input carryin; /* carry into the block */
             output [3:0] carry; /* carries for each bit in the block */
             wire [3:0] g, p; /* generate and propagate */

              assign g[0] = a[0] & b[0]; /* generate 0 */
              assign p[0] = a[0] ^ b[0]; /* propagate 0 */
              assign g[1] = a[1] & b[1]; /* generate 1 */
              assign p[1] = a[1] ^ b[1]; /* propagate 1 */
    assign g[2] = a[2] & b[2]; /* generate 2 */
              assign p[2] = a[2] ^ b[2]; /* propagate 2 */
              assign g[3] = a[3] & b[3]; /* generate 3 */
              assign p[3] = a[3] ^ b[3]; /* propagate 3 */

              assign carry[0] = g[0] | (p[0] & carryin);
              assign carry[1] = g[1] | p[1] & (g[0] | (p[0] & carryin));
              assign carry[2] = g[2] | p[2] &
                               (g[1] | p[1] & (g[0] | (p[0] & carryin)));
              assign carry[3] = g[3] | p[3] &
                               (g[2] | p[2] & (g[1] | p[1] & (g[0] | (p[0] & carryin))));

   endmodule
 module carry_lookahead_adder(a,b,carryin,sum,carryout);
       input [3:0] a, b; /* add these together */
       input carryin;
       output [3:0] sum; /* result */
       output carryout;
       wire [4:1] carry; /* intermediate carries */

      /* build the carry-lookahead units */
      carry_block b0(a[3:0],b[3:0],carryin,carry[4:1]);
      /* build the sum */
      sum a0(a[0],b[0],carryin,sum[0]);
      sum a1(a[1],b[1],carry[1],sum[1]);
  sum a2(a[2],b[2],carry[2],sum[2]);
      sum a3(a[3],b[3],carry[3],sum[3]);

 endmodule
Carry skip adder




   Tp=Tsetup+(M-1)*tcarry+(N/M-1)*Tbypass+ (M-1)*tcarry+Tsum
Manchester carry chain
implementation of carry skip adder
 module fulladd_p(a,b,carryin,sum,carryout,p);
       input a, b, carryin; /* add these bits*/
       output sum, carryout, p; /* results including propagate */

       assign {carryout, sum} = a + b + carryin;
                          /* compute the sum and carry */
   assign p = a | b;
 endmodule



 module carryskip(a,b,carryin,sum,carryout);
       input [7:0] a, b; /* add these bits */
       input carryin; /* carry in*/
       output [7:0] sum; /* result */
       output carryout;
       wire [8:1] carry; /* transfers the carry between bits */
       wire [7:0] p; /* propagate for each bit */
       wire cs4; /* final carry for first group */


 fulladd_p a0(a[0],b[0],carryin,sum[0],carry[1],p[0]);
       fulladd_p a1(a[1],b[1],carry[1],sum[1],carry[2],p[1]);
       fulladd_p a2(a[2],b[2],carry[2],sum[2],carry[3],p[2]);
       fulladd_p a3(a[3],b[3],carry[3],sum[3],carry[4],p[3]);
       assign cs4 = carry[4] | (p[0] & p[1] & p[2] & p[3] & carryin);
       fulladd_p a4(a[4],b[4],cs4, sum[4],carry[5],p[4]);
       fulladd_p a5(a[5],b[5],cs4, sum[5],carry[6],p[5]);
       fulladd_p a6(a[6],b[6],cs4, sum[6],carry[7],p[6]);
       fulladd_p a7(a[7],b[7],cs4, sum[7],carry[8],p[7]);

               assign carryout = carry[8] | (p[4] & p[5] & p[6] & p[7] &
    cs4);
   endmodule
Carry select adder




   Tadd=Tsetup+M*tcarry+(N/M)*Tmux+Tsum
Carry save adder
Thank You

More Related Content

What's hot

Adder & subtractor (Half adder, Full adder, Half subtractor, Full subtractor)
Adder & subtractor (Half adder, Full adder, Half subtractor, Full subtractor)Adder & subtractor (Half adder, Full adder, Half subtractor, Full subtractor)
Adder & subtractor (Half adder, Full adder, Half subtractor, Full subtractor)ISMT College
 
Floating point arithmetic operations (1)
Floating point arithmetic operations (1)Floating point arithmetic operations (1)
Floating point arithmetic operations (1)cs19club
 
Verilog VHDL code Parallel adder
Verilog VHDL code Parallel adder Verilog VHDL code Parallel adder
Verilog VHDL code Parallel adder Bharti Airtel Ltd.
 
Digital Logic & Design (DLD) presentation
Digital Logic & Design (DLD) presentationDigital Logic & Design (DLD) presentation
Digital Logic & Design (DLD) presentationfoyez ahammad
 
Latches and flip flop
Latches and flip flopLatches and flip flop
Latches and flip flopShuaib Hotak
 
Half adder & full adder
Half adder & full adderHalf adder & full adder
Half adder & full adderGaditek
 
1.ripple carry adder, full adder implementation using half adder.
1.ripple carry adder, full adder implementation using half adder.1.ripple carry adder, full adder implementation using half adder.
1.ripple carry adder, full adder implementation using half adder.MdFazleRabbi18
 
adder and subtractor
 adder and subtractor adder and subtractor
adder and subtractorUnsa Shakir
 
decoder and encoder
 decoder and encoder decoder and encoder
decoder and encoderUnsa Shakir
 
Fast Fourier Transform
Fast Fourier TransformFast Fourier Transform
Fast Fourier Transformop205
 

What's hot (20)

Adder & subtractor (Half adder, Full adder, Half subtractor, Full subtractor)
Adder & subtractor (Half adder, Full adder, Half subtractor, Full subtractor)Adder & subtractor (Half adder, Full adder, Half subtractor, Full subtractor)
Adder & subtractor (Half adder, Full adder, Half subtractor, Full subtractor)
 
Floating point arithmetic operations (1)
Floating point arithmetic operations (1)Floating point arithmetic operations (1)
Floating point arithmetic operations (1)
 
Verilog VHDL code Parallel adder
Verilog VHDL code Parallel adder Verilog VHDL code Parallel adder
Verilog VHDL code Parallel adder
 
Digital Logic & Design (DLD) presentation
Digital Logic & Design (DLD) presentationDigital Logic & Design (DLD) presentation
Digital Logic & Design (DLD) presentation
 
Shift Registers
Shift RegistersShift Registers
Shift Registers
 
4 bit add sub
4 bit add sub4 bit add sub
4 bit add sub
 
MULTIPLEXER
MULTIPLEXERMULTIPLEXER
MULTIPLEXER
 
Latches and flip flop
Latches and flip flopLatches and flip flop
Latches and flip flop
 
Half adder & full adder
Half adder & full adderHalf adder & full adder
Half adder & full adder
 
Multiplexers
MultiplexersMultiplexers
Multiplexers
 
1.ripple carry adder, full adder implementation using half adder.
1.ripple carry adder, full adder implementation using half adder.1.ripple carry adder, full adder implementation using half adder.
1.ripple carry adder, full adder implementation using half adder.
 
Half adder layout design
Half adder layout designHalf adder layout design
Half adder layout design
 
Line coding
Line codingLine coding
Line coding
 
adder and subtractor
 adder and subtractor adder and subtractor
adder and subtractor
 
Ripple Carry Adder
Ripple Carry AdderRipple Carry Adder
Ripple Carry Adder
 
decoder and encoder
 decoder and encoder decoder and encoder
decoder and encoder
 
Basics of digital electronics
Basics of digital electronicsBasics of digital electronics
Basics of digital electronics
 
Subtractor (1)
Subtractor (1)Subtractor (1)
Subtractor (1)
 
Fast Fourier Transform
Fast Fourier TransformFast Fourier Transform
Fast Fourier Transform
 
Adder
Adder Adder
Adder
 

Similar to Adder Presentation

gate level modeling
gate level modelinggate level modeling
gate level modelingVandanaBR2
 
#include stdafx.h using namespace std; #include stdlib.h.docx
#include stdafx.h using namespace std; #include stdlib.h.docx#include stdafx.h using namespace std; #include stdlib.h.docx
#include stdafx.h using namespace std; #include stdlib.h.docxajoy21
 
Ogdc 2013 lets remake the wheel
Ogdc 2013 lets remake the wheelOgdc 2013 lets remake the wheel
Ogdc 2013 lets remake the wheelSon Aris
 
OGDC2013_Lets remake the wheel_ Mr Nguyen Trung Hung
OGDC2013_Lets remake the wheel_ Mr Nguyen Trung HungOGDC2013_Lets remake the wheel_ Mr Nguyen Trung Hung
OGDC2013_Lets remake the wheel_ Mr Nguyen Trung Hungogdc
 
I dont know what is wrong with this roulette program I cant seem.pdf
I dont know what is wrong with this roulette program I cant seem.pdfI dont know what is wrong with this roulette program I cant seem.pdf
I dont know what is wrong with this roulette program I cant seem.pdfarchanaemporium
 
Please fix my errors class Iterator public Construc.pdf
Please fix my errors   class Iterator  public  Construc.pdfPlease fix my errors   class Iterator  public  Construc.pdf
Please fix my errors class Iterator public Construc.pdfkitty811
 
Paradigmas de Linguagens de Programacao - Aula #4
Paradigmas de Linguagens de Programacao - Aula #4Paradigmas de Linguagens de Programacao - Aula #4
Paradigmas de Linguagens de Programacao - Aula #4Ismar Silveira
 
Data Structure - 2nd Study
Data Structure - 2nd StudyData Structure - 2nd Study
Data Structure - 2nd StudyChris Ohk
 
Software Visualization - Promises & Perils
Software Visualization - Promises & PerilsSoftware Visualization - Promises & Perils
Software Visualization - Promises & PerilsMichele Lanza
 
#include -algorithm- #include -cstdlib- #include -iostream- #include -.pdf
#include -algorithm- #include -cstdlib- #include -iostream- #include -.pdf#include -algorithm- #include -cstdlib- #include -iostream- #include -.pdf
#include -algorithm- #include -cstdlib- #include -iostream- #include -.pdfBANSALANKIT1077
 
Radix 2 code
Radix 2 codeRadix 2 code
Radix 2 codepradipakv
 

Similar to Adder Presentation (20)

gate level modeling
gate level modelinggate level modeling
gate level modeling
 
Bubble sort
Bubble sortBubble sort
Bubble sort
 
cosc 281 hw3
cosc 281 hw3cosc 281 hw3
cosc 281 hw3
 
ECMAScript 6
ECMAScript 6ECMAScript 6
ECMAScript 6
 
VerilogHDL_Utkarsh_kulshrestha
VerilogHDL_Utkarsh_kulshresthaVerilogHDL_Utkarsh_kulshrestha
VerilogHDL_Utkarsh_kulshrestha
 
#include stdafx.h using namespace std; #include stdlib.h.docx
#include stdafx.h using namespace std; #include stdlib.h.docx#include stdafx.h using namespace std; #include stdlib.h.docx
#include stdafx.h using namespace std; #include stdlib.h.docx
 
About Go
About GoAbout Go
About Go
 
Circular queues
Circular queuesCircular queues
Circular queues
 
Ogdc 2013 lets remake the wheel
Ogdc 2013 lets remake the wheelOgdc 2013 lets remake the wheel
Ogdc 2013 lets remake the wheel
 
OGDC2013_Lets remake the wheel_ Mr Nguyen Trung Hung
OGDC2013_Lets remake the wheel_ Mr Nguyen Trung HungOGDC2013_Lets remake the wheel_ Mr Nguyen Trung Hung
OGDC2013_Lets remake the wheel_ Mr Nguyen Trung Hung
 
VERILOG CODE
VERILOG CODEVERILOG CODE
VERILOG CODE
 
I dont know what is wrong with this roulette program I cant seem.pdf
I dont know what is wrong with this roulette program I cant seem.pdfI dont know what is wrong with this roulette program I cant seem.pdf
I dont know what is wrong with this roulette program I cant seem.pdf
 
Please fix my errors class Iterator public Construc.pdf
Please fix my errors   class Iterator  public  Construc.pdfPlease fix my errors   class Iterator  public  Construc.pdf
Please fix my errors class Iterator public Construc.pdf
 
Paradigmas de Linguagens de Programacao - Aula #4
Paradigmas de Linguagens de Programacao - Aula #4Paradigmas de Linguagens de Programacao - Aula #4
Paradigmas de Linguagens de Programacao - Aula #4
 
Data Structure - 2nd Study
Data Structure - 2nd StudyData Structure - 2nd Study
Data Structure - 2nd Study
 
Stack prgs
Stack prgsStack prgs
Stack prgs
 
Software Visualization - Promises & Perils
Software Visualization - Promises & PerilsSoftware Visualization - Promises & Perils
Software Visualization - Promises & Perils
 
C++ TUTORIAL 4
C++ TUTORIAL 4C++ TUTORIAL 4
C++ TUTORIAL 4
 
#include -algorithm- #include -cstdlib- #include -iostream- #include -.pdf
#include -algorithm- #include -cstdlib- #include -iostream- #include -.pdf#include -algorithm- #include -cstdlib- #include -iostream- #include -.pdf
#include -algorithm- #include -cstdlib- #include -iostream- #include -.pdf
 
Radix 2 code
Radix 2 codeRadix 2 code
Radix 2 code
 

More from Peeyush Pashine (17)

Temperature Controlled Fan Report
Temperature Controlled Fan ReportTemperature Controlled Fan Report
Temperature Controlled Fan Report
 
Temperature Controlled Fan
Temperature Controlled FanTemperature Controlled Fan
Temperature Controlled Fan
 
Robots
RobotsRobots
Robots
 
Power Ingredients
Power IngredientsPower Ingredients
Power Ingredients
 
Itms
ItmsItms
Itms
 
Ecg
EcgEcg
Ecg
 
Dsp Presentation
Dsp PresentationDsp Presentation
Dsp Presentation
 
My Report on adders
My Report on addersMy Report on adders
My Report on adders
 
Decimal arithmetic in Processors
Decimal arithmetic in ProcessorsDecimal arithmetic in Processors
Decimal arithmetic in Processors
 
Control Unit Working
Control Unit WorkingControl Unit Working
Control Unit Working
 
Parallel Prefix Adders Presentation
Parallel Prefix Adders PresentationParallel Prefix Adders Presentation
Parallel Prefix Adders Presentation
 
Smith Adder
Smith AdderSmith Adder
Smith Adder
 
Smith Adder
Smith AdderSmith Adder
Smith Adder
 
Good report on Adders/Prefix adders
Good report on Adders/Prefix addersGood report on Adders/Prefix adders
Good report on Adders/Prefix adders
 
Kogge Stone Adder
Kogge Stone AdderKogge Stone Adder
Kogge Stone Adder
 
111adder
111adder111adder
111adder
 
Report adders
Report addersReport adders
Report adders
 

Adder Presentation

  • 2. Single bit adders Half Adder Full Adder
  • 3. Full Adder  Computes one-bit sum, carry si = ai XOR bi XOR ci ci+1 = aibi + aici + bici  Adder delay is dominated by carry chain  Ripple-carry adder: n-bit adder built from full adders.  Delay of ripple-carry adder goes through all carry bits
  • 4. 4-bit Ripple carry adder T adder=(N-1)*Tcarry+ Tsum
  • 5.  module fulladd(a,b,carryin,sum,carryout);  input a, b, carryin; /* add these bits*/  output sum, carryout; /* results */  assign {carryout, sum} = a + b + carryin;  /* compute the sum and carry */  endmodule  module nbitfulladd(a,b,carryin,sum,carryout);  input[7:0] a, b; /* add these bits */  input carryin; /* carry in*/  output [7:0] sum; /* result */  output carryout;  wire [7:1] carry; /* transfers the carry between bits */  fulladd a0(a[0],b[0],carryin,sum[0],carry[1]);  fulladd a1(a[1],b[1],carry[1],sum[1],carry[2]);  fulladd a2(a[2],b[2],carry[2],sum[2],carry[3]);  fulladd a3(a[3],b[3],carry[3],sum[3],carryout);  endmodule
  • 6.
  • 9. Static adder Circuit Co= AB+BCi+ACi S= ABCi+Co’(A+B+Ci)
  • 10. Manchester carry chain adder (a)Without pass transistors, (b)with pass transistors
  • 13. module sum(a,b,carryin,result);  input a, b, carryin; /* add these bits*/  output result; /* sum */  assign result = a ^ b ^ carryin;  /* compute the sum */  endmodule  module carry_block(a,b,carryin,carry);  input [3:0] a, b; /* add these bits*/  input carryin; /* carry into the block */  output [3:0] carry; /* carries for each bit in the block */  wire [3:0] g, p; /* generate and propagate */  assign g[0] = a[0] & b[0]; /* generate 0 */  assign p[0] = a[0] ^ b[0]; /* propagate 0 */  assign g[1] = a[1] & b[1]; /* generate 1 */  assign p[1] = a[1] ^ b[1]; /* propagate 1 */  assign g[2] = a[2] & b[2]; /* generate 2 */  assign p[2] = a[2] ^ b[2]; /* propagate 2 */  assign g[3] = a[3] & b[3]; /* generate 3 */  assign p[3] = a[3] ^ b[3]; /* propagate 3 */  assign carry[0] = g[0] | (p[0] & carryin);  assign carry[1] = g[1] | p[1] & (g[0] | (p[0] & carryin));  assign carry[2] = g[2] | p[2] &  (g[1] | p[1] & (g[0] | (p[0] & carryin)));  assign carry[3] = g[3] | p[3] &  (g[2] | p[2] & (g[1] | p[1] & (g[0] | (p[0] & carryin))));  endmodule
  • 14.  module carry_lookahead_adder(a,b,carryin,sum,carryout);  input [3:0] a, b; /* add these together */  input carryin;  output [3:0] sum; /* result */  output carryout;  wire [4:1] carry; /* intermediate carries */  /* build the carry-lookahead units */  carry_block b0(a[3:0],b[3:0],carryin,carry[4:1]);  /* build the sum */  sum a0(a[0],b[0],carryin,sum[0]);  sum a1(a[1],b[1],carry[1],sum[1]);  sum a2(a[2],b[2],carry[2],sum[2]);  sum a3(a[3],b[3],carry[3],sum[3]);   endmodule
  • 15.
  • 16. Carry skip adder Tp=Tsetup+(M-1)*tcarry+(N/M-1)*Tbypass+ (M-1)*tcarry+Tsum
  • 18.  module fulladd_p(a,b,carryin,sum,carryout,p);  input a, b, carryin; /* add these bits*/  output sum, carryout, p; /* results including propagate */  assign {carryout, sum} = a + b + carryin;  /* compute the sum and carry */  assign p = a | b;  endmodule  module carryskip(a,b,carryin,sum,carryout);  input [7:0] a, b; /* add these bits */  input carryin; /* carry in*/  output [7:0] sum; /* result */  output carryout;  wire [8:1] carry; /* transfers the carry between bits */  wire [7:0] p; /* propagate for each bit */  wire cs4; /* final carry for first group */ 
  • 19.  fulladd_p a0(a[0],b[0],carryin,sum[0],carry[1],p[0]);  fulladd_p a1(a[1],b[1],carry[1],sum[1],carry[2],p[1]);  fulladd_p a2(a[2],b[2],carry[2],sum[2],carry[3],p[2]);  fulladd_p a3(a[3],b[3],carry[3],sum[3],carry[4],p[3]);  assign cs4 = carry[4] | (p[0] & p[1] & p[2] & p[3] & carryin);  fulladd_p a4(a[4],b[4],cs4, sum[4],carry[5],p[4]);  fulladd_p a5(a[5],b[5],cs4, sum[5],carry[6],p[5]);  fulladd_p a6(a[6],b[6],cs4, sum[6],carry[7],p[6]);  fulladd_p a7(a[7],b[7],cs4, sum[7],carry[8],p[7]);  assign carryout = carry[8] | (p[4] & p[5] & p[6] & p[7] & cs4);  endmodule
  • 20.
  • 21. Carry select adder Tadd=Tsetup+M*tcarry+(N/M)*Tmux+Tsum

Editor's Notes

  1. Ripple carry adder delay is propotional to no of stages, in worst case it goes to thru all the stages.
  2. A clacan reduce the delay. In principle the delay can be reduced so that it is proportional to logn, but for large numbers this is no longer the case, because even when carry look-ahead is implemented, the distances that signals have to travel on the chip increase in proportion to n, and propagation delays increase at the same rate .
  3. If the adder is required to add two numbers and produce a result, carry-save addition is useless, since the result still has to be converted back into binary and this still means that carries have to propagate from right to left. But in large-integer arithmetic, addition is a very rare operation, and adders are mostly used to accumulate partial sums in a multiplication. 0 or 1, from the number we are adding.0 if the digit in our store is 0 or 2, or 1 if it is 1 or 3.0 if the digit to its right is 0 or 1, or 1 if it is 2 or 3.