1 / 18

Binary Addition

Binary Addition. CSC 103 September 17, 2007. Recap: Binary Numbers. Physical representation Transistor Concept of “on” and “off” for physical manufacturing of computers  T/F… Abstract representation Logic: NOT, AND, OR Truth tables

mirra
Télécharger la présentation

Binary Addition

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Binary Addition CSC 103 September 17, 2007

  2. Recap: Binary Numbers • Physical representation • Transistor • Concept of “on” and “off” for physical manufacturing of computers  T/F… • Abstract representation • Logic: NOT, AND, OR • Truth tables • ANY Boolean expression can be built with transistors – wired as AND, OR or NOT

  3. Recap: Transistors = 0 = 1 = 0 or = 1 = 1 or = 0 = 1

  4. Logic Functions: NOT • The ‘NOT’ function • A A’ • 0 1 • 1 0

  5. Recap Logic Gate: AND Function (=1) 1 (=1) 0 0 0 1 0 0

  6. Logic Gate: OR Function 1 0 1 1 0 1 0

  7. Onto Addition and the Adder Circuit...

  8. Binary Addition • Add • 0 + 0 = • 0 + 1 = • 1 + 0 = • 1 + 1 = • Add these numbers c: 1000111 1011010 01001100111001 s:

  9. Binary Addition: Half Adder • We need a circuit to add two bits • Either bit can be ‘0’ or ‘1’ • The function in the truth table is • Sum = A’B + AB’  Exclusive-OR function • Carry = AB

  10. The Half-Adder and Exclusive OR Gate • A’B + AB’ = Exclusive OR • Typically abbreviated to XOR • Simulator uses EOR A B’ A’ B A B A B A B | S C 0 0 | 0 0 0 1 | 1 0 1 0 | 1 0 1 1 | 0 1

  11. Recap Logic Gates: Symbols AB, AB A+B A, A’ XOR

  12. Summary: The Half-Adder and Exclusive OR Gate • Exclusive OR • Typically abbreviated to XOR • Simulator uses EOR A B

  13. Binary Addition: Half Adder

  14. Half-Adder  Full-Adder

  15. The Full Adder • A full adder is a circuit with three inputs (including a ‘carry-in’) and two outputs (the sum and carry-out) • What is the third input? • Exercise: Add 111+ 101 (carry) 1 1 1 ( ‘A’ ) 1 0 1 ( ‘B’ ) (sum) • For adding two numbers, we need three inputs

  16. The Full Adder • Cascade two half-adders to get a full adder A B Cin

  17. HW: Cascade 2 Full Adders for a 2-Bit Adder A2A1 1 1 + B2B1+1 0 B2 A2 B1 A1 Full Adder Full Adder Cout2 Cin2 = Cout1 Cin1 S2 S1

  18. Summary • Binary addition • Concept of ‘sum’ and ‘carry’ • Half adder and full adder circuits • Cascading circuits to make larger ones

More Related