SlideShare a Scribd company logo
1 of 42
1
Learning Objectives
Explore the application of Boolean algebra in the
design of electronic circuits. The basic elements
of circuits are gates. Each type of gate
implements a Boolean operation.
We will study combinational circuits - the
circuits whose output depends only on the input
and not on the current state of the circuit (no
memory).
2
Logical Gates and Combinatorial Circuits
3
Logical Gates and Combinatorial Circuits
4
Logical Gates and Combinatorial Circuits
5
Logical Gates and Combinatorial Circuits
In circuitry theory, NOT, AND, and OR gates are the
basic gates. Any circuit can be designed using these
gates. The circuits designed depend only on the
inputs, not on the output. In other words, these
circuits have no memory. Also these circuits are
called combinatorial circuits.
The symbols NOT gate, AND gate, and OR gate are
also considered as basic circuit symbols, which are
used to build general circuits.
6
Logical Gates and Combinatorial Circuits
7
8
9
10
11
12
13
14
15
Draw a circuit diagram for  = (xy' + x'y)z.
16
17
18
19
A circuit for two light switches
EXAMPLE 3, p. 714
F(x,y)=1 when the light is on
F(x,y)=0 when the light is off
When both switches are closed, the light is on:
F(1,1)=1, this implies
When we open one switch, the light is off:
F(1,0)=F(0,1)=0
When the other switch is also open, the light is on:
F(0,0)=1
20
Thus, we get:
x y F(x,y)
1 1 1
1 0 0
0 1 0
0 0 1
Which Boolean expression is given by F?
Draw a circuit for F,
i.e., a circuit to control two light switches.
F(x,y) = xy + x'y'
21
22
23
24
25
26
27
28
29
30
Logical Gates and Combinatorial Circuits
 A NOT gate can be
implemented using a
NAND gate (a).
 An AND gate can be
implemented using
NAND gates (b).
 An OR gate can be
implemented using
NAND gates (c).
31
Logical Gates and Combinatorial Circuits
Any circuit which is designed by using NOT, AND,
and OR gates can also be designed using only
NAND gates.
Any circuit which is designed by using NOT, AND,
and OR gates can also be designed using only NOR
gates.
32
Adders: Logical gates to add two numbers
 We need to use a circuit
with more than one output,
which clearly more powerful
than a Boolean expression.
33
How to add binary numbers
 Consider adding two 1-bit binary numbers x and y
 0+0 = 0
 0+1 = 1
 1+0 = 1
 1+1 = 10
 Carry is x AND y
 Sum is x XOR y
 The circuit to compute this is called a half-adder
x y Carry Sum
0 0 0 0
0 1 0 1
1 0 0 1
1 1 1 0
34
x y s c
1 1 0 1
1 0 1 0
0 1 1 0
0 0 0 0
= s (sum)
c (carry)
35
x 1 1 1 1 0 0 0 0
y 1 1 0 0 1 1 0 0
c 1 0 1 0 1 0 1 0
s (sum) 1 0 0 1 0 1 1 0
c (carry) 1 1 1 0 1 0 0 0
HA
X
Y
S
C
HA
X
Y
S
C
x
y
c
c
s
HA
X
Y
S
C
HA
X
Y
S
C
x
y
c
A full adder is a circuit that accepts as input thee bits x, y, and c, and
produces as output the binary sum cs of a, b, and c.
36
The full adder
The full circuitry of the full adder
x
y
s
c
c
37
We can use a half-adder and full adders to
compute the sum of two Boolean numbers
1 1 0 0
+ 1 1 1 0
0
1
0
?
0
0
1
Adding bigger binary numbers
38
Adding bigger binary numbers
 Just chain one half adder and full adders together,
e.g., to add x=x3x2x1x0 and y=y3y2y1y0 we need:
HA
X
Y
S
C
FA
C
Y
X
S
C
FA
C
Y
X
S
C
FA
C
Y
X
S
C
x1
y1
x2
y2
x3
y3
x0
y0
s0
s1
s2
s3
c
39
Adding bigger binary numbers
 A half adder has 4 logic gates
 A full adder has two half adders plus a OR gate
Total of 9 logic gates
 To add n bit binary numbers, you need 1 HA and n-1 FAs
 To add 32 bit binary numbers, you need 1 HA and 31 FAs
Total of 4+9*31 = 283 logic gates
 To add 64 bit binary numbers, you need 1 HA and 63 FAs
Total of 4+9*63 = 571 logic gates
40
More about logic gates
To implement a logic gate in hardware, you use a
transistor
Transistors are all enclosed in an “IC”, or
integrated circuit
The current Intel Pentium IV processors have 55
million transistors!
41
Flip-flops
 Consider the following
circuit:
 What does it do?
R
S
Q
Q’
R S Function
1 0 Reset
0 1 Set
1 1 Hold
0 0 1/1
It holds a single bit of memory.
42
Memory
 A flip-flop holds a single bit of memory
 The bit “flip-flops” between the two NAND
gates
 In reality, flip-flops are a bit more complicated
 Have 5 (or so) logic gates (transistors) per flip-
flop
 Consider a 1 Gb memory chip
 1 Gb = 8,589,934,592 bits of memory
 That’s about 43 million transistors!
 In reality, those transistors are split into 9 ICs of
about 5 million transistors each

More Related Content

Similar to LOGIC CKT.ppt

Similar to LOGIC CKT.ppt (20)

Digital systems logicgates-booleanalgebra
Digital systems logicgates-booleanalgebraDigital systems logicgates-booleanalgebra
Digital systems logicgates-booleanalgebra
 
Logic gates
Logic gatesLogic gates
Logic gates
 
Lecture 04-Digital logic gates.pptx
Lecture 04-Digital logic gates.pptxLecture 04-Digital logic gates.pptx
Lecture 04-Digital logic gates.pptx
 
Digital Logic circuit
Digital Logic circuitDigital Logic circuit
Digital Logic circuit
 
Logic gatesrevised.ppt
Logic gatesrevised.pptLogic gatesrevised.ppt
Logic gatesrevised.ppt
 
Number System & Logic Gate
Number System & Logic GateNumber System & Logic Gate
Number System & Logic Gate
 
Binary parallel adder, decimal adder
Binary parallel adder, decimal adderBinary parallel adder, decimal adder
Binary parallel adder, decimal adder
 
Computer circuit logic
Computer circuit logicComputer circuit logic
Computer circuit logic
 
Digital Electronics (EC8392) UNIT-II -PPT-S.SESHA VIDHYA/ ASP/ECE
Digital Electronics (EC8392) UNIT-II -PPT-S.SESHA VIDHYA/ ASP/ECEDigital Electronics (EC8392) UNIT-II -PPT-S.SESHA VIDHYA/ ASP/ECE
Digital Electronics (EC8392) UNIT-II -PPT-S.SESHA VIDHYA/ ASP/ECE
 
2 gates
2 gates2 gates
2 gates
 
Bt0064 logic design1
Bt0064 logic design1Bt0064 logic design1
Bt0064 logic design1
 
boolean-logic.pptx
boolean-logic.pptxboolean-logic.pptx
boolean-logic.pptx
 
Lata digital electronics
Lata digital electronicsLata digital electronics
Lata digital electronics
 
logic gates ppt.pptx
logic gates ppt.pptxlogic gates ppt.pptx
logic gates ppt.pptx
 
Lec 2 digital basics
Lec 2 digital basicsLec 2 digital basics
Lec 2 digital basics
 
Chapter 5_combinational logic (EEEg4302).pdf
Chapter 5_combinational logic (EEEg4302).pdfChapter 5_combinational logic (EEEg4302).pdf
Chapter 5_combinational logic (EEEg4302).pdf
 
Logic gate
Logic gateLogic gate
Logic gate
 
combinational-circuit (1).ppt
combinational-circuit (1).pptcombinational-circuit (1).ppt
combinational-circuit (1).ppt
 
Bitwise
BitwiseBitwise
Bitwise
 
Lecturer mid.ppt
Lecturer mid.pptLecturer mid.ppt
Lecturer mid.ppt
 

More from LLOYDARENAS1

continuous probability distributions.ppt
continuous probability distributions.pptcontinuous probability distributions.ppt
continuous probability distributions.pptLLOYDARENAS1
 
Introduction to Waves Notes2.pptx
Introduction to Waves Notes2.pptxIntroduction to Waves Notes2.pptx
Introduction to Waves Notes2.pptxLLOYDARENAS1
 
Intro_ACKT (1).ppt
Intro_ACKT (1).pptIntro_ACKT (1).ppt
Intro_ACKT (1).pptLLOYDARENAS1
 
BISECTION METHOD QUIZ.pptx
BISECTION METHOD QUIZ.pptxBISECTION METHOD QUIZ.pptx
BISECTION METHOD QUIZ.pptxLLOYDARENAS1
 
mws_gen_nle_ppt_falseposition.ppt
mws_gen_nle_ppt_falseposition.pptmws_gen_nle_ppt_falseposition.ppt
mws_gen_nle_ppt_falseposition.pptLLOYDARENAS1
 
series_parallel.pdf
series_parallel.pdfseries_parallel.pdf
series_parallel.pdfLLOYDARENAS1
 

More from LLOYDARENAS1 (8)

continuous probability distributions.ppt
continuous probability distributions.pptcontinuous probability distributions.ppt
continuous probability distributions.ppt
 
30700_rubric.pdf
30700_rubric.pdf30700_rubric.pdf
30700_rubric.pdf
 
process.ppt
process.pptprocess.ppt
process.ppt
 
Introduction to Waves Notes2.pptx
Introduction to Waves Notes2.pptxIntroduction to Waves Notes2.pptx
Introduction to Waves Notes2.pptx
 
Intro_ACKT (1).ppt
Intro_ACKT (1).pptIntro_ACKT (1).ppt
Intro_ACKT (1).ppt
 
BISECTION METHOD QUIZ.pptx
BISECTION METHOD QUIZ.pptxBISECTION METHOD QUIZ.pptx
BISECTION METHOD QUIZ.pptx
 
mws_gen_nle_ppt_falseposition.ppt
mws_gen_nle_ppt_falseposition.pptmws_gen_nle_ppt_falseposition.ppt
mws_gen_nle_ppt_falseposition.ppt
 
series_parallel.pdf
series_parallel.pdfseries_parallel.pdf
series_parallel.pdf
 

Recently uploaded

University management System project report..pdf
University management System project report..pdfUniversity management System project report..pdf
University management System project report..pdfKamal Acharya
 
College Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
College Call Girls Nashik Nehal 7001305949 Independent Escort Service NashikCollege Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
College Call Girls Nashik Nehal 7001305949 Independent Escort Service NashikCall Girls in Nagpur High Profile
 
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete Record
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete RecordCCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete Record
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete RecordAsst.prof M.Gokilavani
 
Introduction to Multiple Access Protocol.pptx
Introduction to Multiple Access Protocol.pptxIntroduction to Multiple Access Protocol.pptx
Introduction to Multiple Access Protocol.pptxupamatechverse
 
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLS
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLSMANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLS
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLSSIVASHANKAR N
 
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINE
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINEMANUFACTURING PROCESS-II UNIT-2 LATHE MACHINE
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINESIVASHANKAR N
 
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...Dr.Costas Sachpazis
 
Introduction and different types of Ethernet.pptx
Introduction and different types of Ethernet.pptxIntroduction and different types of Ethernet.pptx
Introduction and different types of Ethernet.pptxupamatechverse
 
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur Escorts
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur EscortsCall Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur Escorts
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur High Profile
 
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...Dr.Costas Sachpazis
 
Booking open Available Pune Call Girls Koregaon Park 6297143586 Call Hot Ind...
Booking open Available Pune Call Girls Koregaon Park  6297143586 Call Hot Ind...Booking open Available Pune Call Girls Koregaon Park  6297143586 Call Hot Ind...
Booking open Available Pune Call Girls Koregaon Park 6297143586 Call Hot Ind...Call Girls in Nagpur High Profile
 
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur EscortsHigh Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur High Profile
 
ONLINE FOOD ORDER SYSTEM PROJECT REPORT.pdf
ONLINE FOOD ORDER SYSTEM PROJECT REPORT.pdfONLINE FOOD ORDER SYSTEM PROJECT REPORT.pdf
ONLINE FOOD ORDER SYSTEM PROJECT REPORT.pdfKamal Acharya
 
Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...
Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...
Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...roncy bisnoi
 
Extrusion Processes and Their Limitations
Extrusion Processes and Their LimitationsExtrusion Processes and Their Limitations
Extrusion Processes and Their Limitations120cr0395
 
Glass Ceramics: Processing and Properties
Glass Ceramics: Processing and PropertiesGlass Ceramics: Processing and Properties
Glass Ceramics: Processing and PropertiesPrabhanshu Chaturvedi
 
AKTU Computer Networks notes --- Unit 3.pdf
AKTU Computer Networks notes ---  Unit 3.pdfAKTU Computer Networks notes ---  Unit 3.pdf
AKTU Computer Networks notes --- Unit 3.pdfankushspencer015
 
VIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 BookingVIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 Bookingdharasingh5698
 
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur EscortsHigh Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escortsranjana rawat
 

Recently uploaded (20)

University management System project report..pdf
University management System project report..pdfUniversity management System project report..pdf
University management System project report..pdf
 
College Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
College Call Girls Nashik Nehal 7001305949 Independent Escort Service NashikCollege Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
College Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
 
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete Record
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete RecordCCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete Record
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete Record
 
Introduction to Multiple Access Protocol.pptx
Introduction to Multiple Access Protocol.pptxIntroduction to Multiple Access Protocol.pptx
Introduction to Multiple Access Protocol.pptx
 
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLS
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLSMANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLS
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLS
 
Water Industry Process Automation & Control Monthly - April 2024
Water Industry Process Automation & Control Monthly - April 2024Water Industry Process Automation & Control Monthly - April 2024
Water Industry Process Automation & Control Monthly - April 2024
 
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINE
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINEMANUFACTURING PROCESS-II UNIT-2 LATHE MACHINE
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINE
 
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
 
Introduction and different types of Ethernet.pptx
Introduction and different types of Ethernet.pptxIntroduction and different types of Ethernet.pptx
Introduction and different types of Ethernet.pptx
 
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur Escorts
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur EscortsCall Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur Escorts
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur Escorts
 
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
 
Booking open Available Pune Call Girls Koregaon Park 6297143586 Call Hot Ind...
Booking open Available Pune Call Girls Koregaon Park  6297143586 Call Hot Ind...Booking open Available Pune Call Girls Koregaon Park  6297143586 Call Hot Ind...
Booking open Available Pune Call Girls Koregaon Park 6297143586 Call Hot Ind...
 
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur EscortsHigh Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
 
ONLINE FOOD ORDER SYSTEM PROJECT REPORT.pdf
ONLINE FOOD ORDER SYSTEM PROJECT REPORT.pdfONLINE FOOD ORDER SYSTEM PROJECT REPORT.pdf
ONLINE FOOD ORDER SYSTEM PROJECT REPORT.pdf
 
Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...
Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...
Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...
 
Extrusion Processes and Their Limitations
Extrusion Processes and Their LimitationsExtrusion Processes and Their Limitations
Extrusion Processes and Their Limitations
 
Glass Ceramics: Processing and Properties
Glass Ceramics: Processing and PropertiesGlass Ceramics: Processing and Properties
Glass Ceramics: Processing and Properties
 
AKTU Computer Networks notes --- Unit 3.pdf
AKTU Computer Networks notes ---  Unit 3.pdfAKTU Computer Networks notes ---  Unit 3.pdf
AKTU Computer Networks notes --- Unit 3.pdf
 
VIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 BookingVIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 Booking
 
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur EscortsHigh Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
 

LOGIC CKT.ppt

  • 1. 1 Learning Objectives Explore the application of Boolean algebra in the design of electronic circuits. The basic elements of circuits are gates. Each type of gate implements a Boolean operation. We will study combinational circuits - the circuits whose output depends only on the input and not on the current state of the circuit (no memory).
  • 2. 2 Logical Gates and Combinatorial Circuits
  • 3. 3 Logical Gates and Combinatorial Circuits
  • 4. 4 Logical Gates and Combinatorial Circuits
  • 5. 5 Logical Gates and Combinatorial Circuits In circuitry theory, NOT, AND, and OR gates are the basic gates. Any circuit can be designed using these gates. The circuits designed depend only on the inputs, not on the output. In other words, these circuits have no memory. Also these circuits are called combinatorial circuits. The symbols NOT gate, AND gate, and OR gate are also considered as basic circuit symbols, which are used to build general circuits.
  • 6. 6 Logical Gates and Combinatorial Circuits
  • 7. 7
  • 8. 8
  • 9. 9
  • 10. 10
  • 11. 11
  • 12. 12
  • 13. 13
  • 14. 14
  • 15. 15 Draw a circuit diagram for  = (xy' + x'y)z.
  • 16. 16
  • 17. 17
  • 18. 18
  • 19. 19 A circuit for two light switches EXAMPLE 3, p. 714 F(x,y)=1 when the light is on F(x,y)=0 when the light is off When both switches are closed, the light is on: F(1,1)=1, this implies When we open one switch, the light is off: F(1,0)=F(0,1)=0 When the other switch is also open, the light is on: F(0,0)=1
  • 20. 20 Thus, we get: x y F(x,y) 1 1 1 1 0 0 0 1 0 0 0 1 Which Boolean expression is given by F? Draw a circuit for F, i.e., a circuit to control two light switches. F(x,y) = xy + x'y'
  • 21. 21
  • 22. 22
  • 23. 23
  • 24. 24
  • 25. 25
  • 26. 26
  • 27. 27
  • 28. 28
  • 29. 29
  • 30. 30 Logical Gates and Combinatorial Circuits  A NOT gate can be implemented using a NAND gate (a).  An AND gate can be implemented using NAND gates (b).  An OR gate can be implemented using NAND gates (c).
  • 31. 31 Logical Gates and Combinatorial Circuits Any circuit which is designed by using NOT, AND, and OR gates can also be designed using only NAND gates. Any circuit which is designed by using NOT, AND, and OR gates can also be designed using only NOR gates.
  • 32. 32 Adders: Logical gates to add two numbers  We need to use a circuit with more than one output, which clearly more powerful than a Boolean expression.
  • 33. 33 How to add binary numbers  Consider adding two 1-bit binary numbers x and y  0+0 = 0  0+1 = 1  1+0 = 1  1+1 = 10  Carry is x AND y  Sum is x XOR y  The circuit to compute this is called a half-adder x y Carry Sum 0 0 0 0 0 1 0 1 1 0 0 1 1 1 1 0
  • 34. 34 x y s c 1 1 0 1 1 0 1 0 0 1 1 0 0 0 0 0 = s (sum) c (carry)
  • 35. 35 x 1 1 1 1 0 0 0 0 y 1 1 0 0 1 1 0 0 c 1 0 1 0 1 0 1 0 s (sum) 1 0 0 1 0 1 1 0 c (carry) 1 1 1 0 1 0 0 0 HA X Y S C HA X Y S C x y c c s HA X Y S C HA X Y S C x y c A full adder is a circuit that accepts as input thee bits x, y, and c, and produces as output the binary sum cs of a, b, and c.
  • 36. 36 The full adder The full circuitry of the full adder x y s c c
  • 37. 37 We can use a half-adder and full adders to compute the sum of two Boolean numbers 1 1 0 0 + 1 1 1 0 0 1 0 ? 0 0 1 Adding bigger binary numbers
  • 38. 38 Adding bigger binary numbers  Just chain one half adder and full adders together, e.g., to add x=x3x2x1x0 and y=y3y2y1y0 we need: HA X Y S C FA C Y X S C FA C Y X S C FA C Y X S C x1 y1 x2 y2 x3 y3 x0 y0 s0 s1 s2 s3 c
  • 39. 39 Adding bigger binary numbers  A half adder has 4 logic gates  A full adder has two half adders plus a OR gate Total of 9 logic gates  To add n bit binary numbers, you need 1 HA and n-1 FAs  To add 32 bit binary numbers, you need 1 HA and 31 FAs Total of 4+9*31 = 283 logic gates  To add 64 bit binary numbers, you need 1 HA and 63 FAs Total of 4+9*63 = 571 logic gates
  • 40. 40 More about logic gates To implement a logic gate in hardware, you use a transistor Transistors are all enclosed in an “IC”, or integrated circuit The current Intel Pentium IV processors have 55 million transistors!
  • 41. 41 Flip-flops  Consider the following circuit:  What does it do? R S Q Q’ R S Function 1 0 Reset 0 1 Set 1 1 Hold 0 0 1/1 It holds a single bit of memory.
  • 42. 42 Memory  A flip-flop holds a single bit of memory  The bit “flip-flops” between the two NAND gates  In reality, flip-flops are a bit more complicated  Have 5 (or so) logic gates (transistors) per flip- flop  Consider a 1 Gb memory chip  1 Gb = 8,589,934,592 bits of memory  That’s about 43 million transistors!  In reality, those transistors are split into 9 ICs of about 5 million transistors each