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

Verilog operators.pptx
Verilog  operators.pptxVerilog  operators.pptx
Verilog operators.pptxVandanaPagar1
 
adder and subtractor
 adder and subtractor adder and subtractor
adder and subtractorUnsa Shakir
 
VLSI Testing Techniques
VLSI Testing TechniquesVLSI Testing Techniques
VLSI Testing TechniquesA B Shinde
 
Level sensitive scan design(LSSD) and Boundry scan(BS)
Level sensitive scan design(LSSD) and Boundry scan(BS)Level sensitive scan design(LSSD) and Boundry scan(BS)
Level sensitive scan design(LSSD) and Boundry scan(BS)Praveen Kumar
 
verilog code for logic gates
verilog code for logic gatesverilog code for logic gates
verilog code for logic gatesRakesh kumar jha
 
System on Chip (SoC) for mobile phones
System on Chip (SoC) for mobile phonesSystem on Chip (SoC) for mobile phones
System on Chip (SoC) for mobile phonesJeffrey Funk
 
Ece 523 project – fully differential two stage telescopic op amp
Ece 523 project – fully differential two stage telescopic op ampEce 523 project – fully differential two stage telescopic op amp
Ece 523 project – fully differential two stage telescopic op ampKarthik Rathinavel
 
Fpga architectures and applications
Fpga architectures and applicationsFpga architectures and applications
Fpga architectures and applicationsSudhanshu Janwadkar
 
Overview of digital design with Verilog HDL
Overview of digital design with Verilog HDLOverview of digital design with Verilog HDL
Overview of digital design with Verilog HDLanand hd
 
8086 module 1 & 2 work
8086 module 1 & 2   work8086 module 1 & 2   work
8086 module 1 & 2 workSuhail Km
 
Verilog Tutorial - Verilog HDL Tutorial with Examples
Verilog Tutorial - Verilog HDL Tutorial with ExamplesVerilog Tutorial - Verilog HDL Tutorial with Examples
Verilog Tutorial - Verilog HDL Tutorial with ExamplesE2MATRIX
 
Data flow model -Lecture-4
Data flow model -Lecture-4Data flow model -Lecture-4
Data flow model -Lecture-4Dr.YNM
 
faults in digital systems
faults in digital systemsfaults in digital systems
faults in digital systemsdennis gookyi
 

What's hot (20)

Vlsi stick daigram (JCE)
Vlsi stick daigram (JCE)Vlsi stick daigram (JCE)
Vlsi stick daigram (JCE)
 
Verilog operators.pptx
Verilog  operators.pptxVerilog  operators.pptx
Verilog operators.pptx
 
adder and subtractor
 adder and subtractor adder and subtractor
adder and subtractor
 
Hybrid Adder
Hybrid AdderHybrid Adder
Hybrid Adder
 
VLSI Testing Techniques
VLSI Testing TechniquesVLSI Testing Techniques
VLSI Testing Techniques
 
Array multiplier
Array multiplierArray multiplier
Array multiplier
 
Level sensitive scan design(LSSD) and Boundry scan(BS)
Level sensitive scan design(LSSD) and Boundry scan(BS)Level sensitive scan design(LSSD) and Boundry scan(BS)
Level sensitive scan design(LSSD) and Boundry scan(BS)
 
Half adder layout design
Half adder layout designHalf adder layout design
Half adder layout design
 
8 Bit ALU
8 Bit ALU8 Bit ALU
8 Bit ALU
 
verilog code for logic gates
verilog code for logic gatesverilog code for logic gates
verilog code for logic gates
 
System on Chip (SoC) for mobile phones
System on Chip (SoC) for mobile phonesSystem on Chip (SoC) for mobile phones
System on Chip (SoC) for mobile phones
 
Ece 523 project – fully differential two stage telescopic op amp
Ece 523 project – fully differential two stage telescopic op ampEce 523 project – fully differential two stage telescopic op amp
Ece 523 project – fully differential two stage telescopic op amp
 
ASIC design verification
ASIC design verificationASIC design verification
ASIC design verification
 
Fpga architectures and applications
Fpga architectures and applicationsFpga architectures and applications
Fpga architectures and applications
 
Overview of digital design with Verilog HDL
Overview of digital design with Verilog HDLOverview of digital design with Verilog HDL
Overview of digital design with Verilog HDL
 
8086 module 1 & 2 work
8086 module 1 & 2   work8086 module 1 & 2   work
8086 module 1 & 2 work
 
Verilog Tutorial - Verilog HDL Tutorial with Examples
Verilog Tutorial - Verilog HDL Tutorial with ExamplesVerilog Tutorial - Verilog HDL Tutorial with Examples
Verilog Tutorial - Verilog HDL Tutorial with Examples
 
Shifters
ShiftersShifters
Shifters
 
Data flow model -Lecture-4
Data flow model -Lecture-4Data flow model -Lecture-4
Data flow model -Lecture-4
 
faults in digital systems
faults in digital systemsfaults in digital systems
faults in digital systems
 

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
 
Help to implement delete_node get_succ get_pred walk and.pdf
Help to implement delete_node get_succ get_pred walk and.pdfHelp to implement delete_node get_succ get_pred walk and.pdf
Help to implement delete_node get_succ get_pred walk and.pdfcontact32
 
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
 
"О некоторых особенностях Objective-C++" Влад Михайленко (Maps.Me)
"О некоторых особенностях Objective-C++" Влад Михайленко (Maps.Me)"О некоторых особенностях Objective-C++" Влад Михайленко (Maps.Me)
"О некоторых особенностях Objective-C++" Влад Михайленко (Maps.Me)AvitoTech
 
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
 

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
 
Help to implement delete_node get_succ get_pred walk and.pdf
Help to implement delete_node get_succ get_pred walk and.pdfHelp to implement delete_node get_succ get_pred walk and.pdf
Help to implement delete_node get_succ get_pred walk and.pdf
 
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
 
"О некоторых особенностях Objective-C++" Влад Михайленко (Maps.Me)
"О некоторых особенностях Objective-C++" Влад Михайленко (Maps.Me)"О некоторых особенностях Objective-C++" Влад Михайленко (Maps.Me)
"О некоторых особенностях Objective-C++" Влад Михайленко (Maps.Me)
 
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
 

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.