SlideShare une entreprise Scribd logo
1  sur  26
Logic GatesLogic Gates
 Made by- sarthak yadavMade by- sarthak yadav
 Roll no-39Roll no-39
 Class 12 A2Class 12 A2
11
Review of BooleanReview of Boolean
algebraalgebra
 Just like Boolean logicJust like Boolean logic
 Variables can only be 1 or 0Variables can only be 1 or 0
 Instead of true / falseInstead of true / false
22
Review of BooleanReview of Boolean
algebraalgebra
 Not is a horizontal bar above the numberNot is a horizontal bar above the number
 0 = 10 = 1
 1 = 01 = 0
 Or is a plusOr is a plus
 0+0 = 00+0 = 0
 0+1 = 10+1 = 1
 1+0 = 11+0 = 1
 1+1 = 11+1 = 1
 And is multiplicationAnd is multiplication
 0*0 = 00*0 = 0
 0*1 = 00*1 = 0
 1*0 = 01*0 = 0
 1*1 = 11*1 = 1
33
__
__
Review of BooleanReview of Boolean
algebraalgebra
 Example: translate (Example: translate (xx++yy++zz)()(xyzxyz) to a Boolean) to a Boolean
logic expressionlogic expression
 ((xx∨∨yy∨∨zz))∧∧((¬¬xx∧¬∧¬yy∧¬∧¬zz))
 We can define a Boolean function:We can define a Boolean function:
 F(x,y) = (F(x,y) = (xx∨∨yy))∧∧((¬¬xx∧¬∧¬yy))
 And then write a “truth table” for it:And then write a “truth table” for it:
44
__ __ __
x y F(x,y)
1 1 0
1 0 0
0 1 0
0 0 0
Basic logic gatesBasic logic gates
 NotNot
 AndAnd
 OrOr
 NandNand
 NorNor
 XorXor 55
Converting betweenConverting between
circuits and equationscircuits and equations
 Find the output of the following circuitFind the output of the following circuit
 Answer: (Answer: (x+yx+y)y)y
 Or (Or (xx∨∨yy))∧¬∧¬yy 66
x+y
y
(x+y)y
____
Converting betweenConverting between
circuits and equationscircuits and equations
 Find the output of the following circuitFind the output of the following circuit
 Answer: xyAnswer: xy
 OrOr ¬¬((¬¬xx∧¬∧¬yy) ≡) ≡ xx∨∨yy 77
x
y
x y x y
_ __ _______
Converting betweenConverting between
circuits and equationscircuits and equations
 Write the circuits for the followingWrite the circuits for the following
Boolean algebraic expressionsBoolean algebraic expressions
a)a) xx++yy
88
____
x x+y
Converting betweenConverting between
circuits and equationscircuits and equations
 Write the circuits for the followingWrite the circuits for the following
Boolean algebraic expressionsBoolean algebraic expressions
b)b) ((xx++yy))xx
99
______________
x+y
x+y (x+y)x
Writing xor usingWriting xor using
and/or/notand/or/not
 pp ⊕⊕ qq ≡≡ ((pp ∨∨ qq)) ∧∧ ¬(¬(pp ∧∧ qq))
 xx ⊕⊕ yy ≡≡ (x + y)((x + y)(xyxy))
1010
x y x⊕y
1 1 0
1 0 1
0 1 1
0 0 0
x+y
xy xy
(x+y)(xy)
________
Converting decimalConverting decimal
numbers to binarynumbers to binary
 5353 = 32 + 16 + 4 + 1= 32 + 16 + 4 + 1
= 2= 255
+ 2+ 244
+ 2+ 222
+ 2+ 200
= 1*2= 1*255
+ 1*2+ 1*244
+ 0*2+ 0*233
+ 1*2+ 1*222
+ 0*2+ 0*211
+ 1*2+ 1*200
= 110101 in binary= 110101 in binary
= 00110101 as a full byte in binary= 00110101 as a full byte in binary
 211= 128 + 64 + 16 + 2 + 1211= 128 + 64 + 16 + 2 + 1
= 2= 277
+ 2+ 266
+ 2+ 244
+ 2+ 211
+ 2+ 200
= 1*2= 1*277
+ 1*2+ 1*266
+ 0*2+ 0*255
+ 1*2+ 1*244
+ 0*2+ 0*233
+ 0*2+ 0*222
++
1*21*211
+ 1*2+ 1*200
= 11010011 in binary= 11010011 in binary 1111
Converting binaryConverting binary
numbers to decimalnumbers to decimal
 What is 10011010 in decimal?What is 10011010 in decimal?
1001101010011010 = 1*2= 1*277
+ 0*2+ 0*266
+ 0*2+ 0*255
+ 1*2+ 1*244
+ 1*2+ 1*233
++
0*20*222
+ 1*2+ 1*211
+ 0*2+ 0*200
= 2= 277
+ 2+ 244
+ 2+ 233
+ 2+ 211
= 128 + 16 + 8 + 2= 128 + 16 + 8 + 2
= 154= 154
 What is 00101001 in decimal?What is 00101001 in decimal?
00101001 = 0*200101001 = 0*277
+ 0*2+ 0*266
+ 1*2+ 1*255
+ 0*2+ 0*244
+ 1*2+ 1*233
++
0*20*222
+ 0*2+ 0*211
+ 1*2+ 1*200
= 2= 255
+ 2+ 233
+ 2+ 200
= 32 + 8 + 1= 32 + 8 + 1
= 41= 41
1212
A note on binaryA note on binary
numbersnumbers
 In this slide set we are only dealing withIn this slide set we are only dealing with
non-negative numbersnon-negative numbers
 The book (section 1.5) talks about two’s-The book (section 1.5) talks about two’s-
complement binary numberscomplement binary numbers
 Positive (and zero) two’s-complement binaryPositive (and zero) two’s-complement binary
numbers is what was presented herenumbers is what was presented here
 We won’t be getting into negative two’s-We won’t be getting into negative two’s-
complmeent numberscomplmeent numbers
1313
How to add binaryHow to add binary
numbersnumbers
 Consider adding two 1-bit binary numbersConsider adding two 1-bit binary numbers xx andand yy
 0+0 = 00+0 = 0
 0+1 = 10+1 = 1
 1+0 = 11+0 = 1
 1+1 = 101+1 = 10
 Carry isCarry is xx ANDAND yy
 Sum isSum is xx XORXOR yy
 The circuit to compute this is called a half-adderThe circuit to compute this is called a half-adder 1414
x y Carry Sum
0 0 0 0
0 1 0 1
1 0 0 1
1 1 1 0
The half-adderThe half-adder
 Sum =Sum = xx XORXOR yy
 Carry =Carry = xx ANDAND yy
1515
x y Carry Sum
0 0 0 0
0 1 0 1
1 0 0 1
1 1 1 0
Using half addersUsing half adders
 We can then use a half-adder to computeWe can then use a half-adder to compute
the sum of two Boolean numbersthe sum of two Boolean numbers
1616
1 1 0 0
+ 1 1 1 0
010?
001
How to fix thisHow to fix this
 We need to create an adder that can take aWe need to create an adder that can take a
carry bit as an additional inputcarry bit as an additional input
 Inputs:Inputs: xx,, yy, carry in, carry in
 Outputs: sum, carry outOutputs: sum, carry out
 This is called a full adderThis is called a full adder
 Will addWill add xx andand yy with a half-adderwith a half-adder
 Will add the sum of that to theWill add the sum of that to the
carry incarry in
 What about the carry out?What about the carry out?
 It’s 1 if either (or both):It’s 1 if either (or both):
 xx++yy = 10= 10
 xx++yy = 01 and carry in = 1= 01 and carry in = 1
1717
x y c carry sum
1 1 1 1 1
1 1 0 1 0
1 0 1 1 0
1 0 0 0 1
0 1 1 1 0
0 1 0 0 1
0 0 1 0 1
0 0 0 0 0
The full adderThe full adder
 The “HA” boxes areThe “HA” boxes are
half-addershalf-adders
1818
x y c s1 c1 carry sum
1 1 1 0 1 1 1
1 1 0 0 1 1 0
1 0 1 1 0 1 0
1 0 0 1 0 0 1
0 1 1 1 0 1 0
0 1 0 1 0 0 1
0 0 1 0 0 0 1
0 0 0 0 0 0 0
s1
c1
The full adderThe full adder
 The full circuitry of the full adderThe full circuitry of the full adder
1919
Adding bigger binaryAdding bigger binary
numbersnumbers
 Just chain full adders togetherJust chain full adders together
2020
...
Adding bigger binaryAdding bigger binary
numbersnumbers
 A half adder has 4 logic gatesA half adder has 4 logic gates
 A full adder has two half adders plus a OR gateA full adder has two half adders plus a OR gate
 Total of 9 logic gatesTotal of 9 logic gates
 To addTo add nn bit binary numbers, you need 1 HAbit binary numbers, you need 1 HA
andand nn-1 FAs-1 FAs
 To add 32 bit binary numbers, you need 1 HATo add 32 bit binary numbers, you need 1 HA
and 31 FAsand 31 FAs
 Total of 4+9*31 = 283 logic gatesTotal of 4+9*31 = 283 logic gates
 To add 64 bit binary numbers, you need 1 HATo add 64 bit binary numbers, you need 1 HA
and 63 FAsand 63 FAs
 Total of 4+9*63 = 571 logic gatesTotal of 4+9*63 = 571 logic gates 2121
More about logic gatesMore about logic gates
 To implement a logic gate in hardware,To implement a logic gate in hardware,
you use a transistoryou use a transistor
 Transistors are all enclosed in an “IC”, orTransistors are all enclosed in an “IC”, or
integrated circuitintegrated circuit
 The current Intel Pentium IV processorsThe current Intel Pentium IV processors
have 55 million transistors!have 55 million transistors!
2222
Flip-flopsFlip-flops
 Consider the following circuit:Consider the following circuit:
 What does it do?What does it do? 2323
MemoryMemory
 A flip-flop holds a single bit of memoryA flip-flop holds a single bit of memory
 The bit “flip-flops” between the two NANDThe bit “flip-flops” between the two NAND
gatesgates
 In reality, flip-flops are a bit moreIn reality, flip-flops are a bit more
complicatedcomplicated
 Have 5 (or so) logic gates (transistors) per flip-Have 5 (or so) logic gates (transistors) per flip-
flopflop
 Consider a 1 Gb memory chipConsider a 1 Gb memory chip
 1 Gb = 8,589,934,592 bits of memory1 Gb = 8,589,934,592 bits of memory
 That’s about 43 million transistors!That’s about 43 million transistors!
 In reality, those transistors are split into 9In reality, those transistors are split into 9
ICs of about 5 million transistors eachICs of about 5 million transistors each
2424
HexadecimalHexadecimal
 A numerical rangeA numerical range
from 0-15from 0-15
 Where A is 10, B is 11,Where A is 10, B is 11,
… and F is 15… and F is 15
 Often written with aOften written with a
‘0x’ prefix‘0x’ prefix
 So 0x10 is 10 hex, orSo 0x10 is 10 hex, or
1616
 0x100 is 100 hex, or0x100 is 100 hex, or
256256
 Binary numbers easilyBinary numbers easily
translate:translate: 2525
DEADBEEFDEADBEEF
 Many IBM machines would fill allocatedMany IBM machines would fill allocated
(but uninitialized) memory with the hexa-(but uninitialized) memory with the hexa-
decimal pattern 0xDEADBEEFdecimal pattern 0xDEADBEEF
 Decimal -21524111Decimal -21524111
 Makes it easier to spot in a debuggerMakes it easier to spot in a debugger
2626

Contenu connexe

Tendances

7 realization of logic function using logic gates (1)
7 realization of logic function using logic gates (1)7 realization of logic function using logic gates (1)
7 realization of logic function using logic gates (1)Hemant Suthar
 
Digital electronics
Digital electronicsDigital electronics
Digital electronicsnanishajieha
 
PDT DC015 Chapter 2 Computer System 2017/2018 (f)
PDT DC015 Chapter 2 Computer System 2017/2018 (f)PDT DC015 Chapter 2 Computer System 2017/2018 (f)
PDT DC015 Chapter 2 Computer System 2017/2018 (f)Fizaril Amzari Omar
 
Digital logic gates
Digital logic gatesDigital logic gates
Digital logic gatesjsearle11
 
PST SC015 Chapter 2 Computer System (III) 2017/2018
PST SC015 Chapter 2 Computer System (III) 2017/2018PST SC015 Chapter 2 Computer System (III) 2017/2018
PST SC015 Chapter 2 Computer System (III) 2017/2018Fizaril Amzari Omar
 
Digital Logic Gates and RAID Explained v1.3
Digital Logic Gates and RAID Explained v1.3Digital Logic Gates and RAID Explained v1.3
Digital Logic Gates and RAID Explained v1.3Howard Wong
 
Lecture 2.4 logic_gate_&_simple_logic_circuit
Lecture 2.4 logic_gate_&_simple_logic_circuitLecture 2.4 logic_gate_&_simple_logic_circuit
Lecture 2.4 logic_gate_&_simple_logic_circuitKMJ Science Computer
 
Logic gates - AND, OR, NOT, NOR, NAND, XOR, XNOR Gates.
Logic gates - AND, OR, NOT, NOR, NAND, XOR, XNOR Gates.Logic gates - AND, OR, NOT, NOR, NAND, XOR, XNOR Gates.
Logic gates - AND, OR, NOT, NOR, NAND, XOR, XNOR Gates.Satya P. Joshi
 
CSEC Physics Review - Introduction To Logic Gates
CSEC Physics Review - Introduction To Logic GatesCSEC Physics Review - Introduction To Logic Gates
CSEC Physics Review - Introduction To Logic GatesKevin Small
 
Presentation of universal logic gate
Presentation of universal logic gatePresentation of universal logic gate
Presentation of universal logic gateNur Mohammad Rayhan
 
Logic gates And Boolen algebra
Logic gates And  Boolen algebraLogic gates And  Boolen algebra
Logic gates And Boolen algebraVeera Venky
 

Tendances (20)

Logic gates
Logic gatesLogic gates
Logic gates
 
Digital electronics - Basics
Digital electronics - BasicsDigital electronics - Basics
Digital electronics - Basics
 
7 realization of logic function using logic gates (1)
7 realization of logic function using logic gates (1)7 realization of logic function using logic gates (1)
7 realization of logic function using logic gates (1)
 
Digital electronics
Digital electronicsDigital electronics
Digital electronics
 
PDT DC015 Chapter 2 Computer System 2017/2018 (f)
PDT DC015 Chapter 2 Computer System 2017/2018 (f)PDT DC015 Chapter 2 Computer System 2017/2018 (f)
PDT DC015 Chapter 2 Computer System 2017/2018 (f)
 
Digital logic gates
Digital logic gatesDigital logic gates
Digital logic gates
 
PST SC015 Chapter 2 Computer System (III) 2017/2018
PST SC015 Chapter 2 Computer System (III) 2017/2018PST SC015 Chapter 2 Computer System (III) 2017/2018
PST SC015 Chapter 2 Computer System (III) 2017/2018
 
Digital Logic Gates and RAID Explained v1.3
Digital Logic Gates and RAID Explained v1.3Digital Logic Gates and RAID Explained v1.3
Digital Logic Gates and RAID Explained v1.3
 
Logic not gate tutorial with logic gate truth table
Logic not gate tutorial with logic gate truth tableLogic not gate tutorial with logic gate truth table
Logic not gate tutorial with logic gate truth table
 
Lecture 2.4 logic_gate_&_simple_logic_circuit
Lecture 2.4 logic_gate_&_simple_logic_circuitLecture 2.4 logic_gate_&_simple_logic_circuit
Lecture 2.4 logic_gate_&_simple_logic_circuit
 
Logic gates - AND, OR, NOT, NOR, NAND, XOR, XNOR Gates.
Logic gates - AND, OR, NOT, NOR, NAND, XOR, XNOR Gates.Logic gates - AND, OR, NOT, NOR, NAND, XOR, XNOR Gates.
Logic gates - AND, OR, NOT, NOR, NAND, XOR, XNOR Gates.
 
Boolean Logic
Boolean LogicBoolean Logic
Boolean Logic
 
CSEC Physics Review - Introduction To Logic Gates
CSEC Physics Review - Introduction To Logic GatesCSEC Physics Review - Introduction To Logic Gates
CSEC Physics Review - Introduction To Logic Gates
 
Logic gates i & ii
Logic gates i & iiLogic gates i & ii
Logic gates i & ii
 
Presentation of universal logic gate
Presentation of universal logic gatePresentation of universal logic gate
Presentation of universal logic gate
 
Logic gates And Boolen algebra
Logic gates And  Boolen algebraLogic gates And  Boolen algebra
Logic gates And Boolen algebra
 
Logic gates
Logic gatesLogic gates
Logic gates
 
Digital Logic Design
Digital Logic Design Digital Logic Design
Digital Logic Design
 
Logical Gates
Logical GatesLogical Gates
Logical Gates
 
Logic gates
Logic gatesLogic gates
Logic gates
 

Similaire à LOGIC GATES - SARTHAK YADAV

04-logic-gates (1).ppt
04-logic-gates (1).ppt04-logic-gates (1).ppt
04-logic-gates (1).pptBikashPaul14
 
Lecture 18 M - Copy.pptx
Lecture 18 M - Copy.pptxLecture 18 M - Copy.pptx
Lecture 18 M - Copy.pptxAzeenShahid
 
Arithmetic by aniket bhute
Arithmetic by aniket bhuteArithmetic by aniket bhute
Arithmetic by aniket bhuteAniket Bhute
 
B sc cs i bo-de u-ii logic gates
B sc cs i bo-de u-ii logic gatesB sc cs i bo-de u-ii logic gates
B sc cs i bo-de u-ii logic gatesRai University
 
Unit_2_Boolean_algebra_and_Karnaugh_maps.pptx
Unit_2_Boolean_algebra_and_Karnaugh_maps.pptxUnit_2_Boolean_algebra_and_Karnaugh_maps.pptx
Unit_2_Boolean_algebra_and_Karnaugh_maps.pptxKartikkalaspurkar1
 
21EC201– Digital Principles and system design.pptx
21EC201– Digital Principles and system design.pptx21EC201– Digital Principles and system design.pptx
21EC201– Digital Principles and system design.pptxGobinathAECEJRF1101
 
Digital Logic Circuits
Digital Logic CircuitsDigital Logic Circuits
Digital Logic Circuitssathish sak
 
boolean algebra and logic simplification
boolean algebra and logic simplificationboolean algebra and logic simplification
boolean algebra and logic simplificationUnsa Shakir
 
Binary Mathematics Classwork and Hw
Binary Mathematics Classwork and HwBinary Mathematics Classwork and Hw
Binary Mathematics Classwork and HwJoji Thompson
 
logic gates ppt.pptx
logic gates ppt.pptxlogic gates ppt.pptx
logic gates ppt.pptxvijayapraba1
 

Similaire à LOGIC GATES - SARTHAK YADAV (20)

basic_gates.ppt
basic_gates.pptbasic_gates.ppt
basic_gates.ppt
 
04-logic-gates.ppt
04-logic-gates.ppt04-logic-gates.ppt
04-logic-gates.ppt
 
04-logic-gates (1).ppt
04-logic-gates (1).ppt04-logic-gates (1).ppt
04-logic-gates (1).ppt
 
Bitwise
BitwiseBitwise
Bitwise
 
04-logic-gates (1).ppt
04-logic-gates (1).ppt04-logic-gates (1).ppt
04-logic-gates (1).ppt
 
Lecture 18 M - Copy.pptx
Lecture 18 M - Copy.pptxLecture 18 M - Copy.pptx
Lecture 18 M - Copy.pptx
 
Introduction to Computing
Introduction to ComputingIntroduction to Computing
Introduction to Computing
 
Arithmetic by aniket bhute
Arithmetic by aniket bhuteArithmetic by aniket bhute
Arithmetic by aniket bhute
 
B sc cs i bo-de u-ii logic gates
B sc cs i bo-de u-ii logic gatesB sc cs i bo-de u-ii logic gates
B sc cs i bo-de u-ii logic gates
 
Unit_2_Boolean_algebra_and_Karnaugh_maps.pptx
Unit_2_Boolean_algebra_and_Karnaugh_maps.pptxUnit_2_Boolean_algebra_and_Karnaugh_maps.pptx
Unit_2_Boolean_algebra_and_Karnaugh_maps.pptx
 
21EC201– Digital Principles and system design.pptx
21EC201– Digital Principles and system design.pptx21EC201– Digital Principles and system design.pptx
21EC201– Digital Principles and system design.pptx
 
Lecture.1
Lecture.1Lecture.1
Lecture.1
 
Boolean Algebra DLD
Boolean Algebra DLDBoolean Algebra DLD
Boolean Algebra DLD
 
Digital Logic Circuits
Digital Logic CircuitsDigital Logic Circuits
Digital Logic Circuits
 
2dig circ
2dig circ2dig circ
2dig circ
 
boolean algebra and logic simplification
boolean algebra and logic simplificationboolean algebra and logic simplification
boolean algebra and logic simplification
 
Binary Mathematics Classwork and Hw
Binary Mathematics Classwork and HwBinary Mathematics Classwork and Hw
Binary Mathematics Classwork and Hw
 
logic gates ppt.pptx
logic gates ppt.pptxlogic gates ppt.pptx
logic gates ppt.pptx
 
Boolean algebra
Boolean algebraBoolean algebra
Boolean algebra
 
class xi pptx-1.pptx
class xi pptx-1.pptxclass xi pptx-1.pptx
class xi pptx-1.pptx
 

Plus de Deepak Yadav

Lac Operon for class 12th
Lac Operon for class 12thLac Operon for class 12th
Lac Operon for class 12thDeepak Yadav
 
Patanjali Bio Research Institute
Patanjali Bio Research InstitutePatanjali Bio Research Institute
Patanjali Bio Research InstituteDeepak Yadav
 
Organic Agriculture
Organic Agriculture Organic Agriculture
Organic Agriculture Deepak Yadav
 
Mycorrhizae-biocontrol agent
Mycorrhizae-biocontrol agentMycorrhizae-biocontrol agent
Mycorrhizae-biocontrol agentDeepak Yadav
 
Quorum sensing in bacteria
Quorum sensing in bacteriaQuorum sensing in bacteria
Quorum sensing in bacteriaDeepak Yadav
 
deepak yadav staining
deepak yadav stainingdeepak yadav staining
deepak yadav stainingDeepak Yadav
 
Nucleus of eukaryote
Nucleus of eukaryoteNucleus of eukaryote
Nucleus of eukaryoteDeepak Yadav
 
gybbrellin and its role in plant
gybbrellin and its role in plantgybbrellin and its role in plant
gybbrellin and its role in plantDeepak Yadav
 
biopesticide-deepak yadav university of allahabad
biopesticide-deepak yadav university of allahabadbiopesticide-deepak yadav university of allahabad
biopesticide-deepak yadav university of allahabadDeepak Yadav
 
herbarium and its use--DEEPAKYADAV ALLD. UNIVERSITY
herbarium and its use--DEEPAKYADAV ALLD. UNIVERSITYherbarium and its use--DEEPAKYADAV ALLD. UNIVERSITY
herbarium and its use--DEEPAKYADAV ALLD. UNIVERSITYDeepak Yadav
 
SEED SCALE COMPLEX GYMNOSPERMS
SEED SCALE COMPLEX GYMNOSPERMSSEED SCALE COMPLEX GYMNOSPERMS
SEED SCALE COMPLEX GYMNOSPERMSDeepak Yadav
 
SEED SCALE COMPLEX GYMNOSPERMS
SEED SCALE COMPLEX GYMNOSPERMSSEED SCALE COMPLEX GYMNOSPERMS
SEED SCALE COMPLEX GYMNOSPERMSDeepak Yadav
 
HERBARIUM AND ITS USE-DEEPAK YADAV alld. university.UP
HERBARIUM AND ITS USE-DEEPAK YADAV alld. university.UPHERBARIUM AND ITS USE-DEEPAK YADAV alld. university.UP
HERBARIUM AND ITS USE-DEEPAK YADAV alld. university.UPDeepak Yadav
 
ecological sucession
ecological sucessionecological sucession
ecological sucessionDeepak Yadav
 

Plus de Deepak Yadav (19)

Lac Operon for class 12th
Lac Operon for class 12thLac Operon for class 12th
Lac Operon for class 12th
 
Patanjali Bio Research Institute
Patanjali Bio Research InstitutePatanjali Bio Research Institute
Patanjali Bio Research Institute
 
Organic Agriculture
Organic Agriculture Organic Agriculture
Organic Agriculture
 
Rna editing1
Rna editing1Rna editing1
Rna editing1
 
Mycorrhizae-biocontrol agent
Mycorrhizae-biocontrol agentMycorrhizae-biocontrol agent
Mycorrhizae-biocontrol agent
 
Quorum sensing in bacteria
Quorum sensing in bacteriaQuorum sensing in bacteria
Quorum sensing in bacteria
 
deepak yadav staining
deepak yadav stainingdeepak yadav staining
deepak yadav staining
 
Oil splis 2
Oil splis 2Oil splis 2
Oil splis 2
 
Nucleus of eukaryote
Nucleus of eukaryoteNucleus of eukaryote
Nucleus of eukaryote
 
gybbrellin and its role in plant
gybbrellin and its role in plantgybbrellin and its role in plant
gybbrellin and its role in plant
 
Hplc c
Hplc cHplc c
Hplc c
 
Gyb
GybGyb
Gyb
 
Gibb history
Gibb historyGibb history
Gibb history
 
biopesticide-deepak yadav university of allahabad
biopesticide-deepak yadav university of allahabadbiopesticide-deepak yadav university of allahabad
biopesticide-deepak yadav university of allahabad
 
herbarium and its use--DEEPAKYADAV ALLD. UNIVERSITY
herbarium and its use--DEEPAKYADAV ALLD. UNIVERSITYherbarium and its use--DEEPAKYADAV ALLD. UNIVERSITY
herbarium and its use--DEEPAKYADAV ALLD. UNIVERSITY
 
SEED SCALE COMPLEX GYMNOSPERMS
SEED SCALE COMPLEX GYMNOSPERMSSEED SCALE COMPLEX GYMNOSPERMS
SEED SCALE COMPLEX GYMNOSPERMS
 
SEED SCALE COMPLEX GYMNOSPERMS
SEED SCALE COMPLEX GYMNOSPERMSSEED SCALE COMPLEX GYMNOSPERMS
SEED SCALE COMPLEX GYMNOSPERMS
 
HERBARIUM AND ITS USE-DEEPAK YADAV alld. university.UP
HERBARIUM AND ITS USE-DEEPAK YADAV alld. university.UPHERBARIUM AND ITS USE-DEEPAK YADAV alld. university.UP
HERBARIUM AND ITS USE-DEEPAK YADAV alld. university.UP
 
ecological sucession
ecological sucessionecological sucession
ecological sucession
 

Dernier

CARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxCARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxGaneshChakor2
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfciinovamais
 
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...Sapna Thakur
 
Interactive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationInteractive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationnomboosow
 
Russian Call Girls in Andheri Airport Mumbai WhatsApp 9167673311 💞 Full Nigh...
Russian Call Girls in Andheri Airport Mumbai WhatsApp  9167673311 💞 Full Nigh...Russian Call Girls in Andheri Airport Mumbai WhatsApp  9167673311 💞 Full Nigh...
Russian Call Girls in Andheri Airport Mumbai WhatsApp 9167673311 💞 Full Nigh...Pooja Nehwal
 
Web & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfWeb & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfJayanti Pande
 
Arihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdfArihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdfchloefrazer622
 
Z Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphZ Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphThiyagu K
 
Measures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SDMeasures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SDThiyagu K
 
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdfBASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdfSoniaTolstoy
 
Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17Celine George
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdfQucHHunhnh
 
Beyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactBeyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactPECB
 
Measures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeMeasures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeThiyagu K
 
9548086042 for call girls in Indira Nagar with room service
9548086042  for call girls in Indira Nagar  with room service9548086042  for call girls in Indira Nagar  with room service
9548086042 for call girls in Indira Nagar with room servicediscovermytutordmt
 
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxPOINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxSayali Powar
 
APM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across SectorsAPM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across SectorsAssociation for Project Management
 
A Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformA Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformChameera Dedduwage
 
Separation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and ActinidesSeparation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and ActinidesFatimaKhan178732
 

Dernier (20)

CARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxCARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptx
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdf
 
Mattingly "AI & Prompt Design: The Basics of Prompt Design"
Mattingly "AI & Prompt Design: The Basics of Prompt Design"Mattingly "AI & Prompt Design: The Basics of Prompt Design"
Mattingly "AI & Prompt Design: The Basics of Prompt Design"
 
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...
 
Interactive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationInteractive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communication
 
Russian Call Girls in Andheri Airport Mumbai WhatsApp 9167673311 💞 Full Nigh...
Russian Call Girls in Andheri Airport Mumbai WhatsApp  9167673311 💞 Full Nigh...Russian Call Girls in Andheri Airport Mumbai WhatsApp  9167673311 💞 Full Nigh...
Russian Call Girls in Andheri Airport Mumbai WhatsApp 9167673311 💞 Full Nigh...
 
Web & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfWeb & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdf
 
Arihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdfArihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdf
 
Z Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphZ Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot Graph
 
Measures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SDMeasures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SD
 
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdfBASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
 
Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdf
 
Beyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactBeyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global Impact
 
Measures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeMeasures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and Mode
 
9548086042 for call girls in Indira Nagar with room service
9548086042  for call girls in Indira Nagar  with room service9548086042  for call girls in Indira Nagar  with room service
9548086042 for call girls in Indira Nagar with room service
 
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxPOINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
 
APM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across SectorsAPM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across Sectors
 
A Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformA Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy Reform
 
Separation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and ActinidesSeparation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and Actinides
 

LOGIC GATES - SARTHAK YADAV

  • 1. Logic GatesLogic Gates  Made by- sarthak yadavMade by- sarthak yadav  Roll no-39Roll no-39  Class 12 A2Class 12 A2 11
  • 2. Review of BooleanReview of Boolean algebraalgebra  Just like Boolean logicJust like Boolean logic  Variables can only be 1 or 0Variables can only be 1 or 0  Instead of true / falseInstead of true / false 22
  • 3. Review of BooleanReview of Boolean algebraalgebra  Not is a horizontal bar above the numberNot is a horizontal bar above the number  0 = 10 = 1  1 = 01 = 0  Or is a plusOr is a plus  0+0 = 00+0 = 0  0+1 = 10+1 = 1  1+0 = 11+0 = 1  1+1 = 11+1 = 1  And is multiplicationAnd is multiplication  0*0 = 00*0 = 0  0*1 = 00*1 = 0  1*0 = 01*0 = 0  1*1 = 11*1 = 1 33 __ __
  • 4. Review of BooleanReview of Boolean algebraalgebra  Example: translate (Example: translate (xx++yy++zz)()(xyzxyz) to a Boolean) to a Boolean logic expressionlogic expression  ((xx∨∨yy∨∨zz))∧∧((¬¬xx∧¬∧¬yy∧¬∧¬zz))  We can define a Boolean function:We can define a Boolean function:  F(x,y) = (F(x,y) = (xx∨∨yy))∧∧((¬¬xx∧¬∧¬yy))  And then write a “truth table” for it:And then write a “truth table” for it: 44 __ __ __ x y F(x,y) 1 1 0 1 0 0 0 1 0 0 0 0
  • 5. Basic logic gatesBasic logic gates  NotNot  AndAnd  OrOr  NandNand  NorNor  XorXor 55
  • 6. Converting betweenConverting between circuits and equationscircuits and equations  Find the output of the following circuitFind the output of the following circuit  Answer: (Answer: (x+yx+y)y)y  Or (Or (xx∨∨yy))∧¬∧¬yy 66 x+y y (x+y)y ____
  • 7. Converting betweenConverting between circuits and equationscircuits and equations  Find the output of the following circuitFind the output of the following circuit  Answer: xyAnswer: xy  OrOr ¬¬((¬¬xx∧¬∧¬yy) ≡) ≡ xx∨∨yy 77 x y x y x y _ __ _______
  • 8. Converting betweenConverting between circuits and equationscircuits and equations  Write the circuits for the followingWrite the circuits for the following Boolean algebraic expressionsBoolean algebraic expressions a)a) xx++yy 88 ____ x x+y
  • 9. Converting betweenConverting between circuits and equationscircuits and equations  Write the circuits for the followingWrite the circuits for the following Boolean algebraic expressionsBoolean algebraic expressions b)b) ((xx++yy))xx 99 ______________ x+y x+y (x+y)x
  • 10. Writing xor usingWriting xor using and/or/notand/or/not  pp ⊕⊕ qq ≡≡ ((pp ∨∨ qq)) ∧∧ ¬(¬(pp ∧∧ qq))  xx ⊕⊕ yy ≡≡ (x + y)((x + y)(xyxy)) 1010 x y x⊕y 1 1 0 1 0 1 0 1 1 0 0 0 x+y xy xy (x+y)(xy) ________
  • 11. Converting decimalConverting decimal numbers to binarynumbers to binary  5353 = 32 + 16 + 4 + 1= 32 + 16 + 4 + 1 = 2= 255 + 2+ 244 + 2+ 222 + 2+ 200 = 1*2= 1*255 + 1*2+ 1*244 + 0*2+ 0*233 + 1*2+ 1*222 + 0*2+ 0*211 + 1*2+ 1*200 = 110101 in binary= 110101 in binary = 00110101 as a full byte in binary= 00110101 as a full byte in binary  211= 128 + 64 + 16 + 2 + 1211= 128 + 64 + 16 + 2 + 1 = 2= 277 + 2+ 266 + 2+ 244 + 2+ 211 + 2+ 200 = 1*2= 1*277 + 1*2+ 1*266 + 0*2+ 0*255 + 1*2+ 1*244 + 0*2+ 0*233 + 0*2+ 0*222 ++ 1*21*211 + 1*2+ 1*200 = 11010011 in binary= 11010011 in binary 1111
  • 12. Converting binaryConverting binary numbers to decimalnumbers to decimal  What is 10011010 in decimal?What is 10011010 in decimal? 1001101010011010 = 1*2= 1*277 + 0*2+ 0*266 + 0*2+ 0*255 + 1*2+ 1*244 + 1*2+ 1*233 ++ 0*20*222 + 1*2+ 1*211 + 0*2+ 0*200 = 2= 277 + 2+ 244 + 2+ 233 + 2+ 211 = 128 + 16 + 8 + 2= 128 + 16 + 8 + 2 = 154= 154  What is 00101001 in decimal?What is 00101001 in decimal? 00101001 = 0*200101001 = 0*277 + 0*2+ 0*266 + 1*2+ 1*255 + 0*2+ 0*244 + 1*2+ 1*233 ++ 0*20*222 + 0*2+ 0*211 + 1*2+ 1*200 = 2= 255 + 2+ 233 + 2+ 200 = 32 + 8 + 1= 32 + 8 + 1 = 41= 41 1212
  • 13. A note on binaryA note on binary numbersnumbers  In this slide set we are only dealing withIn this slide set we are only dealing with non-negative numbersnon-negative numbers  The book (section 1.5) talks about two’s-The book (section 1.5) talks about two’s- complement binary numberscomplement binary numbers  Positive (and zero) two’s-complement binaryPositive (and zero) two’s-complement binary numbers is what was presented herenumbers is what was presented here  We won’t be getting into negative two’s-We won’t be getting into negative two’s- complmeent numberscomplmeent numbers 1313
  • 14. How to add binaryHow to add binary numbersnumbers  Consider adding two 1-bit binary numbersConsider adding two 1-bit binary numbers xx andand yy  0+0 = 00+0 = 0  0+1 = 10+1 = 1  1+0 = 11+0 = 1  1+1 = 101+1 = 10  Carry isCarry is xx ANDAND yy  Sum isSum is xx XORXOR yy  The circuit to compute this is called a half-adderThe circuit to compute this is called a half-adder 1414 x y Carry Sum 0 0 0 0 0 1 0 1 1 0 0 1 1 1 1 0
  • 15. The half-adderThe half-adder  Sum =Sum = xx XORXOR yy  Carry =Carry = xx ANDAND yy 1515 x y Carry Sum 0 0 0 0 0 1 0 1 1 0 0 1 1 1 1 0
  • 16. Using half addersUsing half adders  We can then use a half-adder to computeWe can then use a half-adder to compute the sum of two Boolean numbersthe sum of two Boolean numbers 1616 1 1 0 0 + 1 1 1 0 010? 001
  • 17. How to fix thisHow to fix this  We need to create an adder that can take aWe need to create an adder that can take a carry bit as an additional inputcarry bit as an additional input  Inputs:Inputs: xx,, yy, carry in, carry in  Outputs: sum, carry outOutputs: sum, carry out  This is called a full adderThis is called a full adder  Will addWill add xx andand yy with a half-adderwith a half-adder  Will add the sum of that to theWill add the sum of that to the carry incarry in  What about the carry out?What about the carry out?  It’s 1 if either (or both):It’s 1 if either (or both):  xx++yy = 10= 10  xx++yy = 01 and carry in = 1= 01 and carry in = 1 1717 x y c carry sum 1 1 1 1 1 1 1 0 1 0 1 0 1 1 0 1 0 0 0 1 0 1 1 1 0 0 1 0 0 1 0 0 1 0 1 0 0 0 0 0
  • 18. The full adderThe full adder  The “HA” boxes areThe “HA” boxes are half-addershalf-adders 1818 x y c s1 c1 carry sum 1 1 1 0 1 1 1 1 1 0 0 1 1 0 1 0 1 1 0 1 0 1 0 0 1 0 0 1 0 1 1 1 0 1 0 0 1 0 1 0 0 1 0 0 1 0 0 0 1 0 0 0 0 0 0 0 s1 c1
  • 19. The full adderThe full adder  The full circuitry of the full adderThe full circuitry of the full adder 1919
  • 20. Adding bigger binaryAdding bigger binary numbersnumbers  Just chain full adders togetherJust chain full adders together 2020 ...
  • 21. Adding bigger binaryAdding bigger binary numbersnumbers  A half adder has 4 logic gatesA half adder has 4 logic gates  A full adder has two half adders plus a OR gateA full adder has two half adders plus a OR gate  Total of 9 logic gatesTotal of 9 logic gates  To addTo add nn bit binary numbers, you need 1 HAbit binary numbers, you need 1 HA andand nn-1 FAs-1 FAs  To add 32 bit binary numbers, you need 1 HATo add 32 bit binary numbers, you need 1 HA and 31 FAsand 31 FAs  Total of 4+9*31 = 283 logic gatesTotal of 4+9*31 = 283 logic gates  To add 64 bit binary numbers, you need 1 HATo add 64 bit binary numbers, you need 1 HA and 63 FAsand 63 FAs  Total of 4+9*63 = 571 logic gatesTotal of 4+9*63 = 571 logic gates 2121
  • 22. More about logic gatesMore about logic gates  To implement a logic gate in hardware,To implement a logic gate in hardware, you use a transistoryou use a transistor  Transistors are all enclosed in an “IC”, orTransistors are all enclosed in an “IC”, or integrated circuitintegrated circuit  The current Intel Pentium IV processorsThe current Intel Pentium IV processors have 55 million transistors!have 55 million transistors! 2222
  • 23. Flip-flopsFlip-flops  Consider the following circuit:Consider the following circuit:  What does it do?What does it do? 2323
  • 24. MemoryMemory  A flip-flop holds a single bit of memoryA flip-flop holds a single bit of memory  The bit “flip-flops” between the two NANDThe bit “flip-flops” between the two NAND gatesgates  In reality, flip-flops are a bit moreIn reality, flip-flops are a bit more complicatedcomplicated  Have 5 (or so) logic gates (transistors) per flip-Have 5 (or so) logic gates (transistors) per flip- flopflop  Consider a 1 Gb memory chipConsider a 1 Gb memory chip  1 Gb = 8,589,934,592 bits of memory1 Gb = 8,589,934,592 bits of memory  That’s about 43 million transistors!That’s about 43 million transistors!  In reality, those transistors are split into 9In reality, those transistors are split into 9 ICs of about 5 million transistors eachICs of about 5 million transistors each 2424
  • 25. HexadecimalHexadecimal  A numerical rangeA numerical range from 0-15from 0-15  Where A is 10, B is 11,Where A is 10, B is 11, … and F is 15… and F is 15  Often written with aOften written with a ‘0x’ prefix‘0x’ prefix  So 0x10 is 10 hex, orSo 0x10 is 10 hex, or 1616  0x100 is 100 hex, or0x100 is 100 hex, or 256256  Binary numbers easilyBinary numbers easily translate:translate: 2525
  • 26. DEADBEEFDEADBEEF  Many IBM machines would fill allocatedMany IBM machines would fill allocated (but uninitialized) memory with the hexa-(but uninitialized) memory with the hexa- decimal pattern 0xDEADBEEFdecimal pattern 0xDEADBEEF  Decimal -21524111Decimal -21524111  Makes it easier to spot in a debuggerMakes it easier to spot in a debugger 2626