SlideShare a Scribd company logo
1 of 44
Decoders, Multiplexers and Programmable Logic
Decoders ,[object Object],[object Object],[object Object],[object Object],[object Object]
What is a decoder ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
What a decoder does ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
How can you build a 2-to-4 decoder? ,[object Object],[object Object],Q0 = S1’ S0’ Q1 = S1’ S0 Q2 = S1 S0’ Q3 = S1 S0
A picture of a 2-to-4 decoder
Enable inputs ,[object Object],[object Object],[object Object],[object Object],[object Object]
An aside: abbreviated truth tables ,[object Object],[object Object]
[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],Blocks and abstraction Q0 = S1’ S0’ Q1 = S1’ S0 Q2 = S1 S0’ Q3 = S1 S0
A 3-to-8 decoder ,[object Object],[object Object],[object Object],[object Object],[object Object],Q0 = S2’ S1’ S0’ Q1 = S2’ S1’ S0 Q2 = S2’ S1 S0’ Q3 = S2’ S1 S0 Q4 = S2 S1’ S0’ Q5 = S2 S1’ S0 Q6 = S2 S1 S0’ Q7 = S2 S1 S0
So what good is a decoder? ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],Q0 = S1’ S0’ Q1 = S1’ S0 Q2 = S1 S0’ Q3 = S1 S0
Design example: addition ,[object Object],[object Object],[object Object],1 + 1 + 1 = 11 0 + 1 + 1 = 10 C(X,Y,Z) =   m(3,5,6,7)‏ S(X,Y,Z) =   m(1,2,4,7)‏
[object Object],Decoder-based adder C(X,Y,Z) =   m(3,5,6,7)‏ S(X,Y,Z) =   m(1,2,4,7)‏
Using just one decoder ,[object Object],C(X,Y,Z) =   m(3,5,6,7)‏ S(X,Y,Z) =   m(1,2,4,7)‏
Building a 3-to-8 decoder ,[object Object],[object Object],[object Object],[object Object],[object Object],Q0 = S2’ S1’ S0’ = m 0 Q1 = S2’ S1’ S0 = m 1 Q2 = S2’ S1 S0’ = m 2 Q3 = S2’ S1 S0 = m 3 Q4 = S2 S1’ S0’ = m 4 Q5 = S2 S1’ S0 = m 5 Q6 = S2 S1 S0’ = m 6 Q7 = S2 S1 S0 = m 7
Decoder expansion ,[object Object]
Modularity ,[object Object],[object Object],[object Object]
A variation of the standard decoder ,[object Object],[object Object]
Separated at birth? ,[object Object],[object Object],[object Object],Q3 = S1 S0 Q2 = S1 S0’ Q1 = S1’ S0 Q0 = S1’ S0’ Q3’ = (S1 S0)’ = S1’ + S0’ Q2’ = (S1 S0’)’ = S1’ + S0 Q1’ = (S1’ S0)’ = S1 + S0’ Q0’ = (S1’ S0’)’ = S1 + S0
Product of maxterms form ,[object Object],[object Object],[object Object],[object Object],f = M 4  M 5  M 7 =   M(4,5,7)‏ = (x’ + y + z)(x’ + y + z’)(x’ + y’ + z’)‏ f’ = M 0  M 1  M 2  M 3  M 6 =   M(0,1,2,3,6)‏ = (x + y + z)(x + y + z’)(x + y’ + z)‏ (x + y’ + z’)(x’ + y’ + z)‏ f’ contains all the maxterms  not  in f.
Active-low decoder example ,[object Object],[object Object],[object Object],[object Object]
Converting between standard forms ,[object Object],[object Object],[object Object],f =   m(0,1,2,3,6)‏ f’ =   m(4,5,7) -- f’ contains all the minterms not in f = m 4  + m 5  + m 7 (f’)’ = (m 4  + m 5  + m 7 )’ -- complementing both sides f  = m 4 ’ m 5 ’ m 7 ’ -- DeMorgan’s law = M 4  M 5  M 7 -- from the previous page =    M(4,5,7)‏ f =   m(0,1,2,3,6)‏ =   M(4,5,7)‏
Summary ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Multiplexers/demultiplexers PLD components Acknowledgment: Most of the following slides are adapted from Prof. Kale's slides at UIUC, USA.
In the good old times ,[object Object],[object Object]
Multiplexers ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],Q = S’ D0 + S D1
More truth table abbreviations ,[object Object],[object Object],[object Object],[object Object],[object Object],Q = S’ D0 + S D1
A 4-to-1 multiplexer ,[object Object],Q = S1’ S0’ D0 + S1’ S0 D1 + S1 S0’ D2 + S1 S0 D3
Implementing functions with multiplexers ,[object Object],[object Object],[object Object],[object Object],[object Object]
A more efficient way ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Example: multiplexer-based adder ,[object Object],[object Object],[object Object],With S1=X and S0=Y, then Q=X’Y’D0 + X’YD1 + XY’D2 + XYD3 Equation for the multiplexer
Multiplexer-based carry ,[object Object],C = X’ Y’ D0 + X’ Y D1 + X Y’ D2 + X Y D3 = X’ Y’ 0 + X’ Y Z + X Y’ Z + X Y 1 = X’ Y Z + X Y’ Z + XY =   m(3,5,6,7)‏ When XY=00, C=0 When XY=01, C=Z When XY=10, C=Z When XY=11, C=1
Multiplexer-based sum ,[object Object],S = X’ Y’ D0 + X’ Y D1 + X Y’ D2 + X Y D3 = X’ Y’ Z + X’ Y Z’ + X Y’ Z’ + X Y Z =   m(1,2,4,7)‏ When XY=00, S=Z When XY=01, S=Z’ When XY=10, S=Z’ When XY=11, S=Z
Summary ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
The following slides are adapted from David Culler’s slides used at  Electrical Engineering and Computer Sciences, University of California, Berkeley
Binary Addition: Half Adder Ai  0  0  1  1 Bi  0  1  0  1 Sum  0  1  1  0 Carry  0  0  0  1 Ai Bi 0 1 0 1 0 1 1 0 Sum = Ai Bi + Ai Bi = Ai + Bi Ai Bi 0 1 0 1 0 0 1 0 Carry = Ai Bi Half-adder Schematic
Full-Adder S = CI xor A xor B CO = B CI  +  A CI  +  A B = CI (A + B) + A B 0 0 1 1 +  0 0 1 0 0 1 0 1 1 A B S Cin Co
Ripple Carry
Full Adder from Half Adders A B + CI (A xor B) = A B + B CI + A CI Half  Adder A B Half  Adder A + B CI A + B + CI S S CO CO CI (A + B)‏ A B S CO
Delay in the Ripple Carry Adder Critical delay: the propagation of carry from low to high order stages late arriving signal two gate delays to compute CO 4 stage adder final sum and carry
Ripple Carry Timing Critical delay: the propagation of carry from low to high order stages 1111 + 0001 worst case addition T0: Inputs to the adder are valid T2: Stage 0 carry out (C1)‏ T4: Stage 1 carry out (C2)‏ T6: Stage 2 carry out (C3)‏ T8: Stage 3 carry out (C4)‏ 2 delays to compute sum but last carry not ready until 6 delays later
What really happens with the carries ,[object Object],[object Object],[object Object],[object Object],[object Object],Carry action kill Propagate propagate generate Carry Generate  Gi = Ai Bi   must generate carry when A = B = 1 Carry Propagate  Pi = Ai xor Bi   carry in will equal carry out here All generates and propagates in parallel at first stage.  No ripple . Ai Bi Gi Ai Bi Pi
Carry Look Ahead Logic Carry Generate Gi = Ai Bi  must generate carry when A = B = 1 Carry Propagate Pi = Ai xor Bi  carry in will equal carry out here Si  = Ai xor Bi xor Ci =  Pi xor Ci Ci+1  = Ai Bi + Ai Ci + Bi Ci = Ai Bi + Ci (Ai + Bi)‏ = Ai Bi + Ci (Ai xor Bi)‏ =  Gi + Ci Pi Sum and Carry can be reexpressed in terms of generate/propagate: Gi Ci Pi Ci Pi Si Ci+1
All Carries in Parallel Reexpress the carry logic for each of the bits: C1 = G0 + P0 C0 C2 = G1 + P1 C1 = G1 + P1 G0 + P1 P0 C0 C3 = G2 + P2 C2 = G2 + P2 G1 + P2 P1 G0 + P2 P1 P0 C0 C4 = G3 + P3 C3 = G3 + P3 G2 + P3 P2 G1 + P3 P2 P1 G0 + P3 P2 P1 P0 C0 Each of the carry equations can be implemented in a two-level logic network Variables are the adder inputs and carry in to stage 0!

More Related Content

What's hot

What's hot (20)

Half subtracter
Half subtracterHalf subtracter
Half subtracter
 
Multiplexers and Demultiplexers
Multiplexers and DemultiplexersMultiplexers and Demultiplexers
Multiplexers and Demultiplexers
 
Presentation bcd adder
Presentation bcd adderPresentation bcd adder
Presentation bcd adder
 
BCD ADDER
BCD ADDER BCD ADDER
BCD ADDER
 
Combinational circuit
Combinational circuitCombinational circuit
Combinational circuit
 
Digital principles basic
Digital principles basicDigital principles basic
Digital principles basic
 
BCD Counter
BCD CounterBCD Counter
BCD Counter
 
Kmap..(karnaugh map)
Kmap..(karnaugh map)Kmap..(karnaugh map)
Kmap..(karnaugh map)
 
Sequential circuits in Digital Electronics
Sequential circuits in Digital ElectronicsSequential circuits in Digital Electronics
Sequential circuits in Digital Electronics
 
Multiplexers
MultiplexersMultiplexers
Multiplexers
 
simplification of boolean algebra
simplification of boolean algebrasimplification of boolean algebra
simplification of boolean algebra
 
Combinational circuits
Combinational circuitsCombinational circuits
Combinational circuits
 
Fulll Adder
Fulll AdderFulll Adder
Fulll Adder
 
Karnaugh map
Karnaugh mapKarnaugh map
Karnaugh map
 
Combinational circuit
Combinational circuitCombinational circuit
Combinational circuit
 
PAL
PALPAL
PAL
 
Combinational circuits
Combinational circuits Combinational circuits
Combinational circuits
 
3.codes( binary code ,excess 3, gray code )
3.codes( binary code ,excess 3, gray code )3.codes( binary code ,excess 3, gray code )
3.codes( binary code ,excess 3, gray code )
 
Don't care conditions
Don't care conditionsDon't care conditions
Don't care conditions
 
13 Boolean Algebra
13 Boolean Algebra13 Boolean Algebra
13 Boolean Algebra
 

Viewers also liked

Decoder for digital electronics
Decoder for digital electronicsDecoder for digital electronics
Decoder for digital electronics
Kamil Hussain
 
Encoders and Decoders
Encoders and DecodersEncoders and Decoders
Encoders and Decoders
Nic JM
 

Viewers also liked (18)

Encoder and decoder
Encoder and decoderEncoder and decoder
Encoder and decoder
 
08 decoder
08 decoder08 decoder
08 decoder
 
Decoder for digital electronics
Decoder for digital electronicsDecoder for digital electronics
Decoder for digital electronics
 
B sc cs i bo-de u-iii counters & registers
B sc cs i bo-de u-iii counters & registersB sc cs i bo-de u-iii counters & registers
B sc cs i bo-de u-iii counters & registers
 
Decoder
DecoderDecoder
Decoder
 
RVC: A Multi-Decoder CAL Composer Tool
RVC: A Multi-Decoder CAL Composer ToolRVC: A Multi-Decoder CAL Composer Tool
RVC: A Multi-Decoder CAL Composer Tool
 
The decoder
The decoderThe decoder
The decoder
 
Real-time Implementation of Sphere Decoder-based MIMO Wireless System (EUSIPC...
Real-time Implementation of Sphere Decoder-based MIMO Wireless System (EUSIPC...Real-time Implementation of Sphere Decoder-based MIMO Wireless System (EUSIPC...
Real-time Implementation of Sphere Decoder-based MIMO Wireless System (EUSIPC...
 
Telecom lect 4
Telecom lect 4Telecom lect 4
Telecom lect 4
 
RSA NetWitness Log Decoder
RSA NetWitness Log DecoderRSA NetWitness Log Decoder
RSA NetWitness Log Decoder
 
Encoder decoder
Encoder decoderEncoder decoder
Encoder decoder
 
What is a decoder and 2 to 4 DECODER
What is a decoder and 2 to 4 DECODERWhat is a decoder and 2 to 4 DECODER
What is a decoder and 2 to 4 DECODER
 
encoder and decoder in digital electronics
encoder and decoder in digital electronicsencoder and decoder in digital electronics
encoder and decoder in digital electronics
 
Encoders and Decoders
Encoders and DecodersEncoders and Decoders
Encoders and Decoders
 
Encoders and decoders
Encoders and decodersEncoders and decoders
Encoders and decoders
 
STLD-Combinational logic design
STLD-Combinational  logic design STLD-Combinational  logic design
STLD-Combinational logic design
 
Encoder-decoder 翻訳 (TISハンズオン資料)
Encoder-decoder 翻訳 (TISハンズオン資料)Encoder-decoder 翻訳 (TISハンズオン資料)
Encoder-decoder 翻訳 (TISハンズオン資料)
 
Multiplexers & Demultiplexers
Multiplexers & DemultiplexersMultiplexers & Demultiplexers
Multiplexers & Demultiplexers
 

Similar to Ceng232 Decoder Multiplexer Adder

Decoders
DecodersDecoders
Decoders
Re Man
 
Logic Design - Chapter 5: Part1 Combinattional Logic
Logic Design - Chapter 5: Part1 Combinattional LogicLogic Design - Chapter 5: Part1 Combinattional Logic
Logic Design - Chapter 5: Part1 Combinattional Logic
Gouda Mando
 
Problem 2.19. How much time is required to add or subtract two large.pdf
Problem 2.19. How much time is required to add or subtract two large.pdfProblem 2.19. How much time is required to add or subtract two large.pdf
Problem 2.19. How much time is required to add or subtract two large.pdf
JUSTSTYLISH3B2MOHALI
 

Similar to Ceng232 Decoder Multiplexer Adder (20)

07Decoders121
07Decoders12107Decoders121
07Decoders121
 
Decoders
DecodersDecoders
Decoders
 
Chapter-04.pdf
Chapter-04.pdfChapter-04.pdf
Chapter-04.pdf
 
Computer Organization And Architecture lab manual
Computer Organization And Architecture lab manualComputer Organization And Architecture lab manual
Computer Organization And Architecture lab manual
 
Amit vish
Amit vishAmit vish
Amit vish
 
10 multiplexers-de mux
10 multiplexers-de mux10 multiplexers-de mux
10 multiplexers-de mux
 
Logic Design - Chapter 5: Part1 Combinattional Logic
Logic Design - Chapter 5: Part1 Combinattional LogicLogic Design - Chapter 5: Part1 Combinattional Logic
Logic Design - Chapter 5: Part1 Combinattional Logic
 
Proyecto final curso – Electrónica Digital I
Proyecto final curso – Electrónica Digital IProyecto final curso – Electrónica Digital I
Proyecto final curso – Electrónica Digital I
 
Bt0064 logic design1
Bt0064 logic design1Bt0064 logic design1
Bt0064 logic design1
 
Bt0064 logic design-de
Bt0064 logic design-deBt0064 logic design-de
Bt0064 logic design-de
 
Chapter 5: Cominational Logic with MSI and LSI
Chapter 5: Cominational Logic with MSI and LSIChapter 5: Cominational Logic with MSI and LSI
Chapter 5: Cominational Logic with MSI and LSI
 
DCT
DCTDCT
DCT
 
DCT
DCTDCT
DCT
 
DCT
DCTDCT
DCT
 
minimization technique.ppt
minimization technique.pptminimization technique.ppt
minimization technique.ppt
 
Problem 2.19. How much time is required to add or subtract two large.pdf
Problem 2.19. How much time is required to add or subtract two large.pdfProblem 2.19. How much time is required to add or subtract two large.pdf
Problem 2.19. How much time is required to add or subtract two large.pdf
 
4,encoder & decoder MUX and DEMUX EEng - Copy.pdf
4,encoder & decoder MUX and DEMUX EEng - Copy.pdf4,encoder & decoder MUX and DEMUX EEng - Copy.pdf
4,encoder & decoder MUX and DEMUX EEng - Copy.pdf
 
Lecture-10.pptx
Lecture-10.pptxLecture-10.pptx
Lecture-10.pptx
 
unit-6_combinational_jbiunkjnjbkjbjjcircuit-2.ppt
unit-6_combinational_jbiunkjnjbkjbjjcircuit-2.pptunit-6_combinational_jbiunkjnjbkjbjjcircuit-2.ppt
unit-6_combinational_jbiunkjnjbkjbjjcircuit-2.ppt
 
cs 3351 dpco
cs 3351 dpcocs 3351 dpco
cs 3351 dpco
 

Recently uploaded

Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
Joaquim Jorge
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 

Recently uploaded (20)

Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
HTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation StrategiesHTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation Strategies
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsTop 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 

Ceng232 Decoder Multiplexer Adder

  • 1. Decoders, Multiplexers and Programmable Logic
  • 2.
  • 3.
  • 4.
  • 5.
  • 6. A picture of a 2-to-4 decoder
  • 7.
  • 8.
  • 9.
  • 10.
  • 11.
  • 12.
  • 13.
  • 14.
  • 15.
  • 16.
  • 17.
  • 18.
  • 19.
  • 20.
  • 21.
  • 22.
  • 23.
  • 24. Multiplexers/demultiplexers PLD components Acknowledgment: Most of the following slides are adapted from Prof. Kale's slides at UIUC, USA.
  • 25.
  • 26.
  • 27.
  • 28.
  • 29.
  • 30.
  • 31.
  • 32.
  • 33.
  • 34.
  • 35. The following slides are adapted from David Culler’s slides used at Electrical Engineering and Computer Sciences, University of California, Berkeley
  • 36. Binary Addition: Half Adder Ai 0 0 1 1 Bi 0 1 0 1 Sum 0 1 1 0 Carry 0 0 0 1 Ai Bi 0 1 0 1 0 1 1 0 Sum = Ai Bi + Ai Bi = Ai + Bi Ai Bi 0 1 0 1 0 0 1 0 Carry = Ai Bi Half-adder Schematic
  • 37. Full-Adder S = CI xor A xor B CO = B CI + A CI + A B = CI (A + B) + A B 0 0 1 1 + 0 0 1 0 0 1 0 1 1 A B S Cin Co
  • 39. Full Adder from Half Adders A B + CI (A xor B) = A B + B CI + A CI Half Adder A B Half Adder A + B CI A + B + CI S S CO CO CI (A + B)‏ A B S CO
  • 40. Delay in the Ripple Carry Adder Critical delay: the propagation of carry from low to high order stages late arriving signal two gate delays to compute CO 4 stage adder final sum and carry
  • 41. Ripple Carry Timing Critical delay: the propagation of carry from low to high order stages 1111 + 0001 worst case addition T0: Inputs to the adder are valid T2: Stage 0 carry out (C1)‏ T4: Stage 1 carry out (C2)‏ T6: Stage 2 carry out (C3)‏ T8: Stage 3 carry out (C4)‏ 2 delays to compute sum but last carry not ready until 6 delays later
  • 42.
  • 43. Carry Look Ahead Logic Carry Generate Gi = Ai Bi must generate carry when A = B = 1 Carry Propagate Pi = Ai xor Bi carry in will equal carry out here Si = Ai xor Bi xor Ci = Pi xor Ci Ci+1 = Ai Bi + Ai Ci + Bi Ci = Ai Bi + Ci (Ai + Bi)‏ = Ai Bi + Ci (Ai xor Bi)‏ = Gi + Ci Pi Sum and Carry can be reexpressed in terms of generate/propagate: Gi Ci Pi Ci Pi Si Ci+1
  • 44. All Carries in Parallel Reexpress the carry logic for each of the bits: C1 = G0 + P0 C0 C2 = G1 + P1 C1 = G1 + P1 G0 + P1 P0 C0 C3 = G2 + P2 C2 = G2 + P2 G1 + P2 P1 G0 + P2 P1 P0 C0 C4 = G3 + P3 C3 = G3 + P3 G2 + P3 P2 G1 + P3 P2 P1 G0 + P3 P2 P1 P0 C0 Each of the carry equations can be implemented in a two-level logic network Variables are the adder inputs and carry in to stage 0!