SlideShare a Scribd company logo
1 of 36
Logic Gates
Transistors as Switches
 VBB voltage controls whether the transistor
conducts in a common base configuration.
 Logic circuits can be built
AND
 In order for current to flow, both switches
must be closed
¤ Logic notation AB = C
(Sometimes AB = C)
A B C
0 0 0
0 1 0
1 0 0
1 1 1
OR
 Current flows if either switch is closed
¤ Logic notation A + B = C
A B C
0 0 0
0 1 1
1 0 1
1 1 1
Properties of AND and OR
 Commutation
¤ A + B = B + A
¤ A  B = B  A
Same as
Same as
Properties of AND and OR
 Associative Property
¤ A + (B + C) = (A + B) + C
¤ A  (B  C) = (A  B)  C
=
Properties of AND and OR
 Distributive Property
¤ A + B  C = (A + B)  (A + C)
¤ A + B  C
A B C Q
0 0 0 0
0 0 1 0
0 1 0 0
1 0 0 1
1 0 1 1
1 1 0 1
1 1 1 1
Distributive Property
 (A + B)  (A + C)
A B C Q
0 0 0 0
0 0 1 0
0 1 0 0
1 0 0 1
1 0 1 1
1 1 0 1
1 1 1 1
Binary Addition
A B S C(arry)
0 0 0 0
1 0 1 0
0 1 1 0
1 1 0 1
Notice that the carry results are the same as AND
C = A  B
Inversion (NOT)
A Q
0 1
1 0
Logic: AQ =
Exclusive OR (XOR)
Either A or B, but not both
This is sometimes called the
inequality detector, because the
result will be 0 when the inputs are the
same and 1 when they are different.
The truth table is the same as for
S on Binary Addition. S = A ⊕ B
A B S
0 0 0
1 0 1
0 1 1
1 1 0
Getting the XOR
A B S
0 0 0
1 0 1
0 1 1
1 1 0
Two ways of getting S = 1
BAorBA ⋅⋅
Circuit for XOR
Accumulating our results: Binary addition is the
result of XOR plus AND
BABABA ⋅+⋅=⊕
Half Adder
Called a half adder because we haven’t allowed for any carry bit
on input. In elementary addition of numbers, we always need to
allow for a carry from one column to the next.
18
25
4
3 (plus a carry)
Full Adder
INPUTS OUTPUTS
A B CIN
COUT S
0 0 0 0 0
0 0 1 0 1
0 1 0 0 1
0 1 1 1 0
1 0 0 0 1
1 0 1 1 0
1 1 0 1 0
1 1 1 1 1
Full Adder Circuit
Chaining the Full Adder
Possible to use the same
scheme for subtraction by
noting that
A – B = A + (-B)
Binary Counting
Use 1 for ON
Use 0 for OFF
= 00101011
Binary Counter
So our example has 25
+ 23
+ 21
+ 20
= 32 + 8 + 2 + 1 = 43
Counting in Binary
1 1 11 1011 21 10101
2 10 12 1100 22 10110
3 11 13 1101 23 10111
4 100 14 1110 24 11000
5 101 15 1111 25 11001
6 110 16 10000 26 11010
7 111 17 10001 27 11011
8 1000 18 10010 28 11100
9 1001 19 10011 29 11101
10 1010 20 10100 30 11110
NAND (NOT AND)
A B Q
0 0 1
0 1 1
1 0 1
1 1 0
BAQ ⋅=
NOR (NOT OR)
A B Q
0 0 1
0 1 0
1 0 0
1 1 0
BAQ +=
Exclusive NOR
A B Q
0 0 1
0 1 0
1 0 0
1 1 1
Equality Detector
BAQ ⊕=
Summary
Summary for all 2-input gates
Inputs Output of each gate
A B AND NAND OR NOR XOR XNOR
0 0 0 1 0 1 0 1
0 1 0 1 1 0 1 0
1 0 0 1 1 0 1 0
1 1 1 0 1 0 0 1
Number Systems
 Decimal (base 10) {0 1 2 3 4 5 6 7 8 9}
¤ Place value gives a logarithmic representation
of the number
¤ Ex. 4378 means
۞ 4 X 103
= 4000
۞ 3 X 102
= 300
۞ 7 X 101
= 70
۞ 8 X 100
= 8
¤ The place also gives the exponent of the base
Example
 432,600
4 3 2 6 0 0
105
104
103
100
101
102
Powers of ten:
100
= 1 102
= 100 104
= 10000
101
= 10 103
= 1000 105
= 100000
Binary (base 2) {0 1}
Binary Decimal
0 0
1 1
10 2
11 3
100 4
101 5
110 6
111 7
1000 8
1001 9
1010 10
Example
1 1 0 1 1 0 0 1
27
26
25
20
21
22
24 23
Decimal Equivalent
 1101 1001
1 X 27
= 128
+ 1 X 26
= 64
+ 0 X 25
= 0
+ 1 X 24
= 16
+ 1 X 23
= 8
+ 0 X 22
= 0
+ 0 X 21
= 0
+ 1 X 20
= 1
217
Notice how powers of two
stand out:
20
= 1
21
= 10
22
= 100
23
= 1000
Decimal to Binary Conversion
 Ex. 575
¤ Find the largest power of two less than the number
۞ 29
= 512
¤ Subtract that power of two from the number
۞ 575 – 512 = 63
¤ Repeat steps 1 and 2 for the new result until you reach zero.
۞ 25
= 32 63 – 32 = 31
۞ 24
= 16 31 – 16 = 15
۞ 23
= 8 15 – 8 = 7
۞ 22
= 4 7 – 4 = 3
۞ 21
= 2 3 – 2 = 1
۞ 20
= 1 1 – 1 = 0
¤ Construct the number
۞ 1000111111
Another Example
 144
¤ 27
= 128 144 – 128 = 16
¤ 24
= 16 16 – 16 = 0
 Result 10010000
Hexadecimal (base 16)
 {0 1 2 3 4 5 6 7 8 9 A B C D E F}
 Assignments Dec Hex Dec Hex
0 0 8 8
1 1 9 9
2 2 10 A
3 3 11 B
4 4 12 C
5 5 13 D
6 6 14 E
7 7 15 F
Example
163
162
160
161
3 B 6 E
3 X 163
= 12288
11 X 162
= 2816
6 X 161
= 96
14 X 160
= 14
⇒ 15214
Hexadecimal is Convenient for
Binary Conversion
Binary Hex Binary Hex
0 0 1001 29
1 1 1010 A
10 2 1011 B
11 3 1100 C
100 4 1101 D
101 5 1110 E
110 6 1111 F
111 7 1 0000 10
1000 8 ⇐ Nibble
Binary to Hex Conversion
 Group binary number by fours (nibbles)
¤ 1101 1001 0110
 Convert each nibble into hex equivalent
¤ 1101 1001 0110
D 9 6
Decimal to Hex Conversion
 Ex. 284
¤ 162
= 256 284 – 256 = 28
¤ 161
= 16 28 - 16 = 12 (Hex C)
¤ Result 1 1 C
Another Example with an Extension
 1054
¤ 162
= 256
۞But we have several multiples of 256 in 1054
– 1054/256 = 4.12 take integer part
– This eliminates 4*256 = 1024
۞ 1054 – 1024 = 30
¤ 161
= 16 30 – 16 = 14 (Hex E)
¤ Result 4 1 E

More Related Content

What's hot

Sequential Logic Circuit
Sequential Logic CircuitSequential Logic Circuit
Sequential Logic CircuitRamasubbu .P
 
Encoders and decoders
Encoders and decodersEncoders and decoders
Encoders and decodersGaditek
 
Digital electronics
Digital electronicsDigital electronics
Digital electronicscallr
 
Combinational circuits
Combinational circuits Combinational circuits
Combinational circuits DrSonali Vyas
 
Boolean Algebra
Boolean AlgebraBoolean Algebra
Boolean Algebragavhays
 
Logic microoperations
Logic microoperationsLogic microoperations
Logic microoperationsNitesh Singh
 
basic logic gates
 basic logic gates basic logic gates
basic logic gatesvishal gupta
 
flip flop circuits and its applications
flip flop circuits and its applicationsflip flop circuits and its applications
flip flop circuits and its applicationsGaditek
 
Decoder Full Presentation
Decoder Full Presentation Decoder Full Presentation
Decoder Full Presentation Adeel Rasheed
 
Encoders and decoders
Encoders and decodersEncoders and decoders
Encoders and decodersDeepikaDG1
 
Arithmetic Logic Unit (ALU)
Arithmetic Logic Unit (ALU)Arithmetic Logic Unit (ALU)
Arithmetic Logic Unit (ALU)Student
 
BOOLEAN ALGEBRA AND LOGIC GATE
BOOLEAN ALGEBRA AND LOGIC GATE BOOLEAN ALGEBRA AND LOGIC GATE
BOOLEAN ALGEBRA AND LOGIC GATE Tamim Tanvir
 
Parity Generator and Parity Checker
Parity Generator and Parity CheckerParity Generator and Parity Checker
Parity Generator and Parity CheckerJignesh Navdiya
 

What's hot (20)

Sequential Logic Circuit
Sequential Logic CircuitSequential Logic Circuit
Sequential Logic Circuit
 
Encoders and decoders
Encoders and decodersEncoders and decoders
Encoders and decoders
 
Digital electronics
Digital electronicsDigital electronics
Digital electronics
 
Logic gates presentation
Logic gates presentationLogic gates presentation
Logic gates presentation
 
Combinational circuits
Combinational circuits Combinational circuits
Combinational circuits
 
Boolean Algebra
Boolean AlgebraBoolean Algebra
Boolean Algebra
 
Logic microoperations
Logic microoperationsLogic microoperations
Logic microoperations
 
basic logic gates
 basic logic gates basic logic gates
basic logic gates
 
flip flop circuits and its applications
flip flop circuits and its applicationsflip flop circuits and its applications
flip flop circuits and its applications
 
Encoder
EncoderEncoder
Encoder
 
Decoder Full Presentation
Decoder Full Presentation Decoder Full Presentation
Decoder Full Presentation
 
Code Converters & Parity Checker
Code Converters & Parity CheckerCode Converters & Parity Checker
Code Converters & Parity Checker
 
Binary codes
Binary codesBinary codes
Binary codes
 
Encoders and decoders
Encoders and decodersEncoders and decoders
Encoders and decoders
 
Arithmetic Logic Unit (ALU)
Arithmetic Logic Unit (ALU)Arithmetic Logic Unit (ALU)
Arithmetic Logic Unit (ALU)
 
BOOLEAN ALGEBRA AND LOGIC GATE
BOOLEAN ALGEBRA AND LOGIC GATE BOOLEAN ALGEBRA AND LOGIC GATE
BOOLEAN ALGEBRA AND LOGIC GATE
 
Encoder and decoder
Encoder and decoderEncoder and decoder
Encoder and decoder
 
Registers
RegistersRegisters
Registers
 
Parity Generator and Parity Checker
Parity Generator and Parity CheckerParity Generator and Parity Checker
Parity Generator and Parity Checker
 
13 Boolean Algebra
13 Boolean Algebra13 Boolean Algebra
13 Boolean Algebra
 

Similar to Logic gates

Week 5 - Number Systems.pdf
Week 5 - Number Systems.pdfWeek 5 - Number Systems.pdf
Week 5 - Number Systems.pdfHama302631
 
Modern+digital+electronics rp+jain
Modern+digital+electronics rp+jainModern+digital+electronics rp+jain
Modern+digital+electronics rp+jainVenugopala Rao P
 
Digital-Logic40124sequential circuits logic gatepptx
Digital-Logic40124sequential circuits logic gatepptxDigital-Logic40124sequential circuits logic gatepptx
Digital-Logic40124sequential circuits logic gatepptxssuser6feece1
 
Lecture 18 M - Copy.pptx
Lecture 18 M - Copy.pptxLecture 18 M - Copy.pptx
Lecture 18 M - Copy.pptxAzeenShahid
 
CMSC 56 | Lecture 10: Integer Representations & Algorithms
CMSC 56 | Lecture 10: Integer Representations & AlgorithmsCMSC 56 | Lecture 10: Integer Representations & Algorithms
CMSC 56 | Lecture 10: Integer Representations & Algorithmsallyn joy calcaben
 
01.number systems
01.number systems01.number systems
01.number systemsrasha3
 
Name dld preparation
Name dld preparationName dld preparation
Name dld preparationPadam Rai
 
Chapter 2 Boolean Algebra (part 2)
Chapter 2 Boolean Algebra (part 2)Chapter 2 Boolean Algebra (part 2)
Chapter 2 Boolean Algebra (part 2)Frankie Jones
 

Similar to Logic gates (20)

Arithmatic &Logic Unit
Arithmatic &Logic UnitArithmatic &Logic Unit
Arithmatic &Logic Unit
 
Week 5 - Number Systems.pdf
Week 5 - Number Systems.pdfWeek 5 - Number Systems.pdf
Week 5 - Number Systems.pdf
 
Logic Gates (1).ppt
Logic Gates (1).pptLogic Gates (1).ppt
Logic Gates (1).ppt
 
Modern+digital+electronics rp+jain
Modern+digital+electronics rp+jainModern+digital+electronics rp+jain
Modern+digital+electronics rp+jain
 
Logic gates (2)
Logic gates (2)Logic gates (2)
Logic gates (2)
 
3,EEng k-map.pdf
3,EEng k-map.pdf3,EEng k-map.pdf
3,EEng k-map.pdf
 
Digital-Logic40124sequential circuits logic gatepptx
Digital-Logic40124sequential circuits logic gatepptxDigital-Logic40124sequential circuits logic gatepptx
Digital-Logic40124sequential circuits logic gatepptx
 
Digital logic
Digital logicDigital logic
Digital logic
 
UNIT-1_CSA.pdf
UNIT-1_CSA.pdfUNIT-1_CSA.pdf
UNIT-1_CSA.pdf
 
9402730.ppt
9402730.ppt9402730.ppt
9402730.ppt
 
Logic Gates.pptx
Logic Gates.pptxLogic Gates.pptx
Logic Gates.pptx
 
Lecture 18 M - Copy.pptx
Lecture 18 M - Copy.pptxLecture 18 M - Copy.pptx
Lecture 18 M - Copy.pptx
 
CMSC 56 | Lecture 10: Integer Representations & Algorithms
CMSC 56 | Lecture 10: Integer Representations & AlgorithmsCMSC 56 | Lecture 10: Integer Representations & Algorithms
CMSC 56 | Lecture 10: Integer Representations & Algorithms
 
Minimizing boolean
Minimizing booleanMinimizing boolean
Minimizing boolean
 
Minimizing boolean
Minimizing booleanMinimizing boolean
Minimizing boolean
 
1سلمي 2
1سلمي 21سلمي 2
1سلمي 2
 
Chapter 2
Chapter 2Chapter 2
Chapter 2
 
01.number systems
01.number systems01.number systems
01.number systems
 
Name dld preparation
Name dld preparationName dld preparation
Name dld preparation
 
Chapter 2 Boolean Algebra (part 2)
Chapter 2 Boolean Algebra (part 2)Chapter 2 Boolean Algebra (part 2)
Chapter 2 Boolean Algebra (part 2)
 

Recently uploaded

The First Date by Daniel Johnson (Inspired By True Events)
The First Date by Daniel Johnson (Inspired By True Events)The First Date by Daniel Johnson (Inspired By True Events)
The First Date by Daniel Johnson (Inspired By True Events)thephillipta
 
FULL ENJOY - 9953040155 Call Girls in Paschim Vihar | Delhi
FULL ENJOY - 9953040155 Call Girls in Paschim Vihar | DelhiFULL ENJOY - 9953040155 Call Girls in Paschim Vihar | Delhi
FULL ENJOY - 9953040155 Call Girls in Paschim Vihar | DelhiMalviyaNagarCallGirl
 
Lucknow 💋 Escorts Service Lucknow Phone No 8923113531 Elite Escort Service Av...
Lucknow 💋 Escorts Service Lucknow Phone No 8923113531 Elite Escort Service Av...Lucknow 💋 Escorts Service Lucknow Phone No 8923113531 Elite Escort Service Av...
Lucknow 💋 Escorts Service Lucknow Phone No 8923113531 Elite Escort Service Av...anilsa9823
 
Alex and Chloe by Daniel Johnson Storyboard
Alex and Chloe by Daniel Johnson StoryboardAlex and Chloe by Daniel Johnson Storyboard
Alex and Chloe by Daniel Johnson Storyboardthephillipta
 
Turn Lock Take Key Storyboard Daniel Johnson
Turn Lock Take Key Storyboard Daniel JohnsonTurn Lock Take Key Storyboard Daniel Johnson
Turn Lock Take Key Storyboard Daniel Johnsonthephillipta
 
Downtown Call Girls O5O91O128O Pakistani Call Girls in Downtown
Downtown Call Girls O5O91O128O Pakistani Call Girls in DowntownDowntown Call Girls O5O91O128O Pakistani Call Girls in Downtown
Downtown Call Girls O5O91O128O Pakistani Call Girls in Downtowndajasot375
 
FULL ENJOY - 9953040155 Call Girls in Burari | Delhi
FULL ENJOY - 9953040155 Call Girls in Burari | DelhiFULL ENJOY - 9953040155 Call Girls in Burari | Delhi
FULL ENJOY - 9953040155 Call Girls in Burari | DelhiMalviyaNagarCallGirl
 
Gomti Nagar & High Profile Call Girls in Lucknow (Adult Only) 8923113531 Esc...
Gomti Nagar & High Profile Call Girls in Lucknow  (Adult Only) 8923113531 Esc...Gomti Nagar & High Profile Call Girls in Lucknow  (Adult Only) 8923113531 Esc...
Gomti Nagar & High Profile Call Girls in Lucknow (Adult Only) 8923113531 Esc...gurkirankumar98700
 
SHIVNA SAHITYIKI APRIL JUNE 2024 Magazine
SHIVNA SAHITYIKI APRIL JUNE 2024 MagazineSHIVNA SAHITYIKI APRIL JUNE 2024 Magazine
SHIVNA SAHITYIKI APRIL JUNE 2024 MagazineShivna Prakashan
 
FULL ENJOY - 9953040155 Call Girls in Moti Nagar | Delhi
FULL ENJOY - 9953040155 Call Girls in Moti Nagar | DelhiFULL ENJOY - 9953040155 Call Girls in Moti Nagar | Delhi
FULL ENJOY - 9953040155 Call Girls in Moti Nagar | DelhiMalviyaNagarCallGirl
 
FULL ENJOY - 9953040155 Call Girls in Old Rajendra Nagar | Delhi
FULL ENJOY - 9953040155 Call Girls in Old Rajendra Nagar | DelhiFULL ENJOY - 9953040155 Call Girls in Old Rajendra Nagar | Delhi
FULL ENJOY - 9953040155 Call Girls in Old Rajendra Nagar | DelhiMalviyaNagarCallGirl
 
Islamabad Call Girls # 03091665556 # Call Girls in Islamabad | Islamabad Escorts
Islamabad Call Girls # 03091665556 # Call Girls in Islamabad | Islamabad EscortsIslamabad Call Girls # 03091665556 # Call Girls in Islamabad | Islamabad Escorts
Islamabad Call Girls # 03091665556 # Call Girls in Islamabad | Islamabad Escortswdefrd
 
(NEHA) Call Girls Ahmedabad Booking Open 8617697112 Ahmedabad Escorts
(NEHA) Call Girls Ahmedabad Booking Open 8617697112 Ahmedabad Escorts(NEHA) Call Girls Ahmedabad Booking Open 8617697112 Ahmedabad Escorts
(NEHA) Call Girls Ahmedabad Booking Open 8617697112 Ahmedabad EscortsCall girls in Ahmedabad High profile
 
FULL ENJOY - 9953040155 Call Girls in Laxmi Nagar | Delhi
FULL ENJOY - 9953040155 Call Girls in Laxmi Nagar | DelhiFULL ENJOY - 9953040155 Call Girls in Laxmi Nagar | Delhi
FULL ENJOY - 9953040155 Call Girls in Laxmi Nagar | DelhiMalviyaNagarCallGirl
 
San Jon Motel, Motel/Residence, San Jon NM
San Jon Motel, Motel/Residence, San Jon NMSan Jon Motel, Motel/Residence, San Jon NM
San Jon Motel, Motel/Residence, San Jon NMroute66connected
 
Call Girl in Bur Dubai O5286O4116 Indian Call Girls in Bur Dubai By VIP Bur D...
Call Girl in Bur Dubai O5286O4116 Indian Call Girls in Bur Dubai By VIP Bur D...Call Girl in Bur Dubai O5286O4116 Indian Call Girls in Bur Dubai By VIP Bur D...
Call Girl in Bur Dubai O5286O4116 Indian Call Girls in Bur Dubai By VIP Bur D...dajasot375
 
RAK Call Girls Service # 971559085003 # Call Girl Service In RAK
RAK Call Girls Service # 971559085003 # Call Girl Service In RAKRAK Call Girls Service # 971559085003 # Call Girl Service In RAK
RAK Call Girls Service # 971559085003 # Call Girl Service In RAKedwardsara83
 
Young⚡Call Girls in Lajpat Nagar Delhi >༒9667401043 Escort Service
Young⚡Call Girls in Lajpat Nagar Delhi >༒9667401043 Escort ServiceYoung⚡Call Girls in Lajpat Nagar Delhi >༒9667401043 Escort Service
Young⚡Call Girls in Lajpat Nagar Delhi >༒9667401043 Escort Servicesonnydelhi1992
 

Recently uploaded (20)

The First Date by Daniel Johnson (Inspired By True Events)
The First Date by Daniel Johnson (Inspired By True Events)The First Date by Daniel Johnson (Inspired By True Events)
The First Date by Daniel Johnson (Inspired By True Events)
 
FULL ENJOY - 9953040155 Call Girls in Paschim Vihar | Delhi
FULL ENJOY - 9953040155 Call Girls in Paschim Vihar | DelhiFULL ENJOY - 9953040155 Call Girls in Paschim Vihar | Delhi
FULL ENJOY - 9953040155 Call Girls in Paschim Vihar | Delhi
 
Lucknow 💋 Escorts Service Lucknow Phone No 8923113531 Elite Escort Service Av...
Lucknow 💋 Escorts Service Lucknow Phone No 8923113531 Elite Escort Service Av...Lucknow 💋 Escorts Service Lucknow Phone No 8923113531 Elite Escort Service Av...
Lucknow 💋 Escorts Service Lucknow Phone No 8923113531 Elite Escort Service Av...
 
Alex and Chloe by Daniel Johnson Storyboard
Alex and Chloe by Daniel Johnson StoryboardAlex and Chloe by Daniel Johnson Storyboard
Alex and Chloe by Daniel Johnson Storyboard
 
Turn Lock Take Key Storyboard Daniel Johnson
Turn Lock Take Key Storyboard Daniel JohnsonTurn Lock Take Key Storyboard Daniel Johnson
Turn Lock Take Key Storyboard Daniel Johnson
 
Downtown Call Girls O5O91O128O Pakistani Call Girls in Downtown
Downtown Call Girls O5O91O128O Pakistani Call Girls in DowntownDowntown Call Girls O5O91O128O Pakistani Call Girls in Downtown
Downtown Call Girls O5O91O128O Pakistani Call Girls in Downtown
 
FULL ENJOY - 9953040155 Call Girls in Burari | Delhi
FULL ENJOY - 9953040155 Call Girls in Burari | DelhiFULL ENJOY - 9953040155 Call Girls in Burari | Delhi
FULL ENJOY - 9953040155 Call Girls in Burari | Delhi
 
Gomti Nagar & High Profile Call Girls in Lucknow (Adult Only) 8923113531 Esc...
Gomti Nagar & High Profile Call Girls in Lucknow  (Adult Only) 8923113531 Esc...Gomti Nagar & High Profile Call Girls in Lucknow  (Adult Only) 8923113531 Esc...
Gomti Nagar & High Profile Call Girls in Lucknow (Adult Only) 8923113531 Esc...
 
Bur Dubai Call Girls # 971504361175 # Call Girls In Bur Dubai || (UAE)
Bur Dubai Call Girls # 971504361175 # Call Girls In Bur Dubai || (UAE)Bur Dubai Call Girls # 971504361175 # Call Girls In Bur Dubai || (UAE)
Bur Dubai Call Girls # 971504361175 # Call Girls In Bur Dubai || (UAE)
 
SHIVNA SAHITYIKI APRIL JUNE 2024 Magazine
SHIVNA SAHITYIKI APRIL JUNE 2024 MagazineSHIVNA SAHITYIKI APRIL JUNE 2024 Magazine
SHIVNA SAHITYIKI APRIL JUNE 2024 Magazine
 
FULL ENJOY - 9953040155 Call Girls in Moti Nagar | Delhi
FULL ENJOY - 9953040155 Call Girls in Moti Nagar | DelhiFULL ENJOY - 9953040155 Call Girls in Moti Nagar | Delhi
FULL ENJOY - 9953040155 Call Girls in Moti Nagar | Delhi
 
FULL ENJOY - 9953040155 Call Girls in Old Rajendra Nagar | Delhi
FULL ENJOY - 9953040155 Call Girls in Old Rajendra Nagar | DelhiFULL ENJOY - 9953040155 Call Girls in Old Rajendra Nagar | Delhi
FULL ENJOY - 9953040155 Call Girls in Old Rajendra Nagar | Delhi
 
Dxb Call Girls # +971529501107 # Call Girls In Dxb Dubai || (UAE)
Dxb Call Girls # +971529501107 # Call Girls In Dxb Dubai || (UAE)Dxb Call Girls # +971529501107 # Call Girls In Dxb Dubai || (UAE)
Dxb Call Girls # +971529501107 # Call Girls In Dxb Dubai || (UAE)
 
Islamabad Call Girls # 03091665556 # Call Girls in Islamabad | Islamabad Escorts
Islamabad Call Girls # 03091665556 # Call Girls in Islamabad | Islamabad EscortsIslamabad Call Girls # 03091665556 # Call Girls in Islamabad | Islamabad Escorts
Islamabad Call Girls # 03091665556 # Call Girls in Islamabad | Islamabad Escorts
 
(NEHA) Call Girls Ahmedabad Booking Open 8617697112 Ahmedabad Escorts
(NEHA) Call Girls Ahmedabad Booking Open 8617697112 Ahmedabad Escorts(NEHA) Call Girls Ahmedabad Booking Open 8617697112 Ahmedabad Escorts
(NEHA) Call Girls Ahmedabad Booking Open 8617697112 Ahmedabad Escorts
 
FULL ENJOY - 9953040155 Call Girls in Laxmi Nagar | Delhi
FULL ENJOY - 9953040155 Call Girls in Laxmi Nagar | DelhiFULL ENJOY - 9953040155 Call Girls in Laxmi Nagar | Delhi
FULL ENJOY - 9953040155 Call Girls in Laxmi Nagar | Delhi
 
San Jon Motel, Motel/Residence, San Jon NM
San Jon Motel, Motel/Residence, San Jon NMSan Jon Motel, Motel/Residence, San Jon NM
San Jon Motel, Motel/Residence, San Jon NM
 
Call Girl in Bur Dubai O5286O4116 Indian Call Girls in Bur Dubai By VIP Bur D...
Call Girl in Bur Dubai O5286O4116 Indian Call Girls in Bur Dubai By VIP Bur D...Call Girl in Bur Dubai O5286O4116 Indian Call Girls in Bur Dubai By VIP Bur D...
Call Girl in Bur Dubai O5286O4116 Indian Call Girls in Bur Dubai By VIP Bur D...
 
RAK Call Girls Service # 971559085003 # Call Girl Service In RAK
RAK Call Girls Service # 971559085003 # Call Girl Service In RAKRAK Call Girls Service # 971559085003 # Call Girl Service In RAK
RAK Call Girls Service # 971559085003 # Call Girl Service In RAK
 
Young⚡Call Girls in Lajpat Nagar Delhi >༒9667401043 Escort Service
Young⚡Call Girls in Lajpat Nagar Delhi >༒9667401043 Escort ServiceYoung⚡Call Girls in Lajpat Nagar Delhi >༒9667401043 Escort Service
Young⚡Call Girls in Lajpat Nagar Delhi >༒9667401043 Escort Service
 

Logic gates

  • 2. Transistors as Switches  VBB voltage controls whether the transistor conducts in a common base configuration.  Logic circuits can be built
  • 3. AND  In order for current to flow, both switches must be closed ¤ Logic notation AB = C (Sometimes AB = C) A B C 0 0 0 0 1 0 1 0 0 1 1 1
  • 4. OR  Current flows if either switch is closed ¤ Logic notation A + B = C A B C 0 0 0 0 1 1 1 0 1 1 1 1
  • 5. Properties of AND and OR  Commutation ¤ A + B = B + A ¤ A  B = B  A Same as Same as
  • 6. Properties of AND and OR  Associative Property ¤ A + (B + C) = (A + B) + C ¤ A  (B  C) = (A  B)  C =
  • 7. Properties of AND and OR  Distributive Property ¤ A + B  C = (A + B)  (A + C) ¤ A + B  C A B C Q 0 0 0 0 0 0 1 0 0 1 0 0 1 0 0 1 1 0 1 1 1 1 0 1 1 1 1 1
  • 8. Distributive Property  (A + B)  (A + C) A B C Q 0 0 0 0 0 0 1 0 0 1 0 0 1 0 0 1 1 0 1 1 1 1 0 1 1 1 1 1
  • 9. Binary Addition A B S C(arry) 0 0 0 0 1 0 1 0 0 1 1 0 1 1 0 1 Notice that the carry results are the same as AND C = A  B
  • 10. Inversion (NOT) A Q 0 1 1 0 Logic: AQ =
  • 11. Exclusive OR (XOR) Either A or B, but not both This is sometimes called the inequality detector, because the result will be 0 when the inputs are the same and 1 when they are different. The truth table is the same as for S on Binary Addition. S = A ⊕ B A B S 0 0 0 1 0 1 0 1 1 1 1 0
  • 12. Getting the XOR A B S 0 0 0 1 0 1 0 1 1 1 1 0 Two ways of getting S = 1 BAorBA ⋅⋅
  • 13. Circuit for XOR Accumulating our results: Binary addition is the result of XOR plus AND BABABA ⋅+⋅=⊕
  • 14. Half Adder Called a half adder because we haven’t allowed for any carry bit on input. In elementary addition of numbers, we always need to allow for a carry from one column to the next. 18 25 4 3 (plus a carry)
  • 15. Full Adder INPUTS OUTPUTS A B CIN COUT S 0 0 0 0 0 0 0 1 0 1 0 1 0 0 1 0 1 1 1 0 1 0 0 0 1 1 0 1 1 0 1 1 0 1 0 1 1 1 1 1
  • 17. Chaining the Full Adder Possible to use the same scheme for subtraction by noting that A – B = A + (-B)
  • 18. Binary Counting Use 1 for ON Use 0 for OFF = 00101011 Binary Counter So our example has 25 + 23 + 21 + 20 = 32 + 8 + 2 + 1 = 43
  • 19. Counting in Binary 1 1 11 1011 21 10101 2 10 12 1100 22 10110 3 11 13 1101 23 10111 4 100 14 1110 24 11000 5 101 15 1111 25 11001 6 110 16 10000 26 11010 7 111 17 10001 27 11011 8 1000 18 10010 28 11100 9 1001 19 10011 29 11101 10 1010 20 10100 30 11110
  • 20. NAND (NOT AND) A B Q 0 0 1 0 1 1 1 0 1 1 1 0 BAQ ⋅=
  • 21. NOR (NOT OR) A B Q 0 0 1 0 1 0 1 0 0 1 1 0 BAQ +=
  • 22. Exclusive NOR A B Q 0 0 1 0 1 0 1 0 0 1 1 1 Equality Detector BAQ ⊕=
  • 23. Summary Summary for all 2-input gates Inputs Output of each gate A B AND NAND OR NOR XOR XNOR 0 0 0 1 0 1 0 1 0 1 0 1 1 0 1 0 1 0 0 1 1 0 1 0 1 1 1 0 1 0 0 1
  • 24. Number Systems  Decimal (base 10) {0 1 2 3 4 5 6 7 8 9} ¤ Place value gives a logarithmic representation of the number ¤ Ex. 4378 means ۞ 4 X 103 = 4000 ۞ 3 X 102 = 300 ۞ 7 X 101 = 70 ۞ 8 X 100 = 8 ¤ The place also gives the exponent of the base
  • 25. Example  432,600 4 3 2 6 0 0 105 104 103 100 101 102 Powers of ten: 100 = 1 102 = 100 104 = 10000 101 = 10 103 = 1000 105 = 100000
  • 26. Binary (base 2) {0 1} Binary Decimal 0 0 1 1 10 2 11 3 100 4 101 5 110 6 111 7 1000 8 1001 9 1010 10
  • 27. Example 1 1 0 1 1 0 0 1 27 26 25 20 21 22 24 23
  • 28. Decimal Equivalent  1101 1001 1 X 27 = 128 + 1 X 26 = 64 + 0 X 25 = 0 + 1 X 24 = 16 + 1 X 23 = 8 + 0 X 22 = 0 + 0 X 21 = 0 + 1 X 20 = 1 217 Notice how powers of two stand out: 20 = 1 21 = 10 22 = 100 23 = 1000
  • 29. Decimal to Binary Conversion  Ex. 575 ¤ Find the largest power of two less than the number ۞ 29 = 512 ¤ Subtract that power of two from the number ۞ 575 – 512 = 63 ¤ Repeat steps 1 and 2 for the new result until you reach zero. ۞ 25 = 32 63 – 32 = 31 ۞ 24 = 16 31 – 16 = 15 ۞ 23 = 8 15 – 8 = 7 ۞ 22 = 4 7 – 4 = 3 ۞ 21 = 2 3 – 2 = 1 ۞ 20 = 1 1 – 1 = 0 ¤ Construct the number ۞ 1000111111
  • 30. Another Example  144 ¤ 27 = 128 144 – 128 = 16 ¤ 24 = 16 16 – 16 = 0  Result 10010000
  • 31. Hexadecimal (base 16)  {0 1 2 3 4 5 6 7 8 9 A B C D E F}  Assignments Dec Hex Dec Hex 0 0 8 8 1 1 9 9 2 2 10 A 3 3 11 B 4 4 12 C 5 5 13 D 6 6 14 E 7 7 15 F
  • 32. Example 163 162 160 161 3 B 6 E 3 X 163 = 12288 11 X 162 = 2816 6 X 161 = 96 14 X 160 = 14 ⇒ 15214
  • 33. Hexadecimal is Convenient for Binary Conversion Binary Hex Binary Hex 0 0 1001 29 1 1 1010 A 10 2 1011 B 11 3 1100 C 100 4 1101 D 101 5 1110 E 110 6 1111 F 111 7 1 0000 10 1000 8 ⇐ Nibble
  • 34. Binary to Hex Conversion  Group binary number by fours (nibbles) ¤ 1101 1001 0110  Convert each nibble into hex equivalent ¤ 1101 1001 0110 D 9 6
  • 35. Decimal to Hex Conversion  Ex. 284 ¤ 162 = 256 284 – 256 = 28 ¤ 161 = 16 28 - 16 = 12 (Hex C) ¤ Result 1 1 C
  • 36. Another Example with an Extension  1054 ¤ 162 = 256 ۞But we have several multiples of 256 in 1054 – 1054/256 = 4.12 take integer part – This eliminates 4*256 = 1024 ۞ 1054 – 1024 = 30 ¤ 161 = 16 30 – 16 = 14 (Hex E) ¤ Result 4 1 E