SlideShare a Scribd company logo
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
AQ =Logic:
Exclusive OR (XOR)
A B S
0 0 0
1 0 1
0 1 1
1 1 0
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
Getting the XOR
A B S
0 0 0
1 0 1
0 1 1
1 1 0
BAorBA ⋅⋅
Two ways of getting S = 1
Circuit for XOR
BABABA ⋅+⋅=⊕
Accumulating our results: Binary addition is the
result of XOR plus AND
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
BAQ ⊕=
Equality Detector
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

4 b3t wikipedia
4 b3t   wikipedia4 b3t   wikipedia
4 b3t wikipedia
ZerihunDemere
 
Register and counter
Register and counter Register and counter
Register and counter
Mayank Pandey
 
Adding numbers without using the + operator
Adding numbers without using the + operatorAdding numbers without using the + operator
Adding numbers without using the + operatorkiwipom
 
Solids of known cross section WS
Solids of known cross section WSSolids of known cross section WS
Solids of known cross section WSGarth Bowden
 
Mba admission in india
Mba admission in indiaMba admission in india
Mba admission in india
Edhole.com
 
mat lab introduction and basics to learn
mat lab introduction and basics to learnmat lab introduction and basics to learn
mat lab introduction and basics to learn
pavan373
 
Maths micro teaching copy
Maths micro teaching   copyMaths micro teaching   copy
Maths micro teaching copy
ADITYA PROJECT WORK
 
Operations Research Modeling Toolset
Operations Research Modeling ToolsetOperations Research Modeling Toolset
Operations Research Modeling Toolset
FellowBuddy.com
 
Matlab tutorial2
Matlab tutorial2Matlab tutorial2
Matlab tutorial2Washo Ramos
 
Network flows
Network flowsNetwork flows
Network flows
Luckshay Batra
 
Maximum flow
Maximum flowMaximum flow
Maximum flow
Md. Shafiuzzaman Hira
 
Trigonometric graphs
Trigonometric graphsTrigonometric graphs
Trigonometric graphs
Shaun Wilson
 
Combinational logic 1
Combinational logic 1Combinational logic 1
Combinational logic 1
Heman Pathak
 
⭐⭐⭐⭐⭐ SOLUCIÓN EVALUACIÓN SISTEMAS DIGITALES 1, 1er Parcial (2021 PAE)
⭐⭐⭐⭐⭐ SOLUCIÓN EVALUACIÓN SISTEMAS DIGITALES 1, 1er Parcial (2021 PAE)⭐⭐⭐⭐⭐ SOLUCIÓN EVALUACIÓN SISTEMAS DIGITALES 1, 1er Parcial (2021 PAE)
⭐⭐⭐⭐⭐ SOLUCIÓN EVALUACIÓN SISTEMAS DIGITALES 1, 1er Parcial (2021 PAE)
Victor Asanza
 
Checksum & Hamming Code
Checksum & Hamming CodeChecksum & Hamming Code
Checksum & Hamming Code
Sweta Kumari Barnwal
 
Combinational logic 2
Combinational logic 2Combinational logic 2
Combinational logic 2
Heman Pathak
 
Javier dominguez 20800945 actividad 1_estructuras discretas
Javier dominguez 20800945 actividad 1_estructuras discretasJavier dominguez 20800945 actividad 1_estructuras discretas
Javier dominguez 20800945 actividad 1_estructuras discretas
JavierJoseDominguezd
 

What's hot (20)

4 b3t wikipedia
4 b3t   wikipedia4 b3t   wikipedia
4 b3t wikipedia
 
Register and counter
Register and counter Register and counter
Register and counter
 
Adding numbers without using the + operator
Adding numbers without using the + operatorAdding numbers without using the + operator
Adding numbers without using the + operator
 
Solids of known cross section WS
Solids of known cross section WSSolids of known cross section WS
Solids of known cross section WS
 
Output Regulator_LinkedIn
Output Regulator_LinkedInOutput Regulator_LinkedIn
Output Regulator_LinkedIn
 
Network flow problems
Network flow problemsNetwork flow problems
Network flow problems
 
Mba admission in india
Mba admission in indiaMba admission in india
Mba admission in india
 
mat lab introduction and basics to learn
mat lab introduction and basics to learnmat lab introduction and basics to learn
mat lab introduction and basics to learn
 
Maths micro teaching copy
Maths micro teaching   copyMaths micro teaching   copy
Maths micro teaching copy
 
Operations Research Modeling Toolset
Operations Research Modeling ToolsetOperations Research Modeling Toolset
Operations Research Modeling Toolset
 
Matlab tutorial2
Matlab tutorial2Matlab tutorial2
Matlab tutorial2
 
Network flows
Network flowsNetwork flows
Network flows
 
Maximum flow
Maximum flowMaximum flow
Maximum flow
 
Trigonometric graphs
Trigonometric graphsTrigonometric graphs
Trigonometric graphs
 
Combinational logic 1
Combinational logic 1Combinational logic 1
Combinational logic 1
 
presentation
presentationpresentation
presentation
 
⭐⭐⭐⭐⭐ SOLUCIÓN EVALUACIÓN SISTEMAS DIGITALES 1, 1er Parcial (2021 PAE)
⭐⭐⭐⭐⭐ SOLUCIÓN EVALUACIÓN SISTEMAS DIGITALES 1, 1er Parcial (2021 PAE)⭐⭐⭐⭐⭐ SOLUCIÓN EVALUACIÓN SISTEMAS DIGITALES 1, 1er Parcial (2021 PAE)
⭐⭐⭐⭐⭐ SOLUCIÓN EVALUACIÓN SISTEMAS DIGITALES 1, 1er Parcial (2021 PAE)
 
Checksum & Hamming Code
Checksum & Hamming CodeChecksum & Hamming Code
Checksum & Hamming Code
 
Combinational logic 2
Combinational logic 2Combinational logic 2
Combinational logic 2
 
Javier dominguez 20800945 actividad 1_estructuras discretas
Javier dominguez 20800945 actividad 1_estructuras discretasJavier dominguez 20800945 actividad 1_estructuras discretas
Javier dominguez 20800945 actividad 1_estructuras discretas
 

Viewers also liked

Robotics Presentation
Robotics PresentationRobotics Presentation
Robotics Presentation
American International University
 
Robots presentation
Robots presentationRobots presentation
Robots presentationaroobkazim
 

Viewers also liked (6)

Control
ControlControl
Control
 
Actuators
ActuatorsActuators
Actuators
 
Sensing
SensingSensing
Sensing
 
Introduction
IntroductionIntroduction
Introduction
 
Robotics Presentation
Robotics PresentationRobotics Presentation
Robotics Presentation
 
Robots presentation
Robots presentationRobots presentation
Robots presentation
 

Similar to Arithmatic &Logic Unit

Week 5 - Number Systems.pdf
Week 5 - Number Systems.pdfWeek 5 - Number Systems.pdf
Week 5 - Number Systems.pdf
Hama302631
 
Logic Gates (1).ppt
Logic Gates (1).pptLogic Gates (1).ppt
Logic Gates (1).ppt
ShannykumarSingh
 
Modern+digital+electronics rp+jain
Modern+digital+electronics rp+jainModern+digital+electronics rp+jain
Modern+digital+electronics rp+jain
Venugopala Rao P
 
Chapter 3_Boolean Algebra _ Logic Gate (3).pptx
Chapter 3_Boolean Algebra _ Logic Gate (3).pptxChapter 3_Boolean Algebra _ Logic Gate (3).pptx
Chapter 3_Boolean Algebra _ Logic Gate (3).pptx
sujenizswaranrajan
 
Logic gates (2)
Logic gates (2)Logic gates (2)
Logic gates (2)
Tanuj Parikh
 
Digital-Logic40124sequential circuits logic gatepptx
Digital-Logic40124sequential circuits logic gatepptxDigital-Logic40124sequential circuits logic gatepptx
Digital-Logic40124sequential circuits logic gatepptx
ssuser6feece1
 
Logic Gates.pptx
Logic Gates.pptxLogic Gates.pptx
Logic Gates.pptx
DanicaHeusdens
 
9402730.ppt
9402730.ppt9402730.ppt
9402730.ppt
qquwandiq19
 
Digital logic
Digital logicDigital logic
Digital logic
Md Shohel Rana
 
3,EEng k-map.pdf
3,EEng k-map.pdf3,EEng k-map.pdf
3,EEng k-map.pdf
DamotTesfaye
 
Chapter 2
Chapter 2Chapter 2
Chapter 2
EasyStudy3
 
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
allyn joy calcaben
 
Name dld preparation
Name dld preparationName dld preparation
Name dld preparation
Padam Rai
 
Lecture 18 M - Copy.pptx
Lecture 18 M - Copy.pptxLecture 18 M - Copy.pptx
Lecture 18 M - Copy.pptx
AzeenShahid
 
01.number systems
01.number systems01.number systems
01.number systemsrasha3
 
3306565.ppt
3306565.ppt3306565.ppt
3306565.ppt
JP Chicano
 
Number_Systems_and_Boolean_Algebra.ppt
Number_Systems_and_Boolean_Algebra.pptNumber_Systems_and_Boolean_Algebra.ppt
Number_Systems_and_Boolean_Algebra.ppt
VEERA BOOPATHY E
 

Similar to Arithmatic &Logic Unit (20)

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
 
Chapter 3_Boolean Algebra _ Logic Gate (3).pptx
Chapter 3_Boolean Algebra _ Logic Gate (3).pptxChapter 3_Boolean Algebra _ Logic Gate (3).pptx
Chapter 3_Boolean Algebra _ Logic Gate (3).pptx
 
Logic gates (2)
Logic gates (2)Logic gates (2)
Logic gates (2)
 
Digital-Logic40124sequential circuits logic gatepptx
Digital-Logic40124sequential circuits logic gatepptxDigital-Logic40124sequential circuits logic gatepptx
Digital-Logic40124sequential circuits logic gatepptx
 
UNIT-1_CSA.pdf
UNIT-1_CSA.pdfUNIT-1_CSA.pdf
UNIT-1_CSA.pdf
 
Logic Gates.pptx
Logic Gates.pptxLogic Gates.pptx
Logic Gates.pptx
 
9402730.ppt
9402730.ppt9402730.ppt
9402730.ppt
 
Digital logic
Digital logicDigital logic
Digital logic
 
3,EEng k-map.pdf
3,EEng k-map.pdf3,EEng k-map.pdf
3,EEng k-map.pdf
 
Chapter 2
Chapter 2Chapter 2
Chapter 2
 
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
 
Name dld preparation
Name dld preparationName dld preparation
Name dld preparation
 
Lecture 18 M - Copy.pptx
Lecture 18 M - Copy.pptxLecture 18 M - Copy.pptx
Lecture 18 M - Copy.pptx
 
01.number systems
01.number systems01.number systems
01.number systems
 
3306565.ppt
3306565.ppt3306565.ppt
3306565.ppt
 
Number_Systems_and_Boolean_Algebra.ppt
Number_Systems_and_Boolean_Algebra.pptNumber_Systems_and_Boolean_Algebra.ppt
Number_Systems_and_Boolean_Algebra.ppt
 

Recently uploaded

Introduction to Quality Improvement Essentials
Introduction to Quality Improvement EssentialsIntroduction to Quality Improvement Essentials
Introduction to Quality Improvement Essentials
Excellence Foundation for South Sudan
 
The geography of Taylor Swift - some ideas
The geography of Taylor Swift - some ideasThe geography of Taylor Swift - some ideas
The geography of Taylor Swift - some ideas
GeoBlogs
 
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
siemaillard
 
Unit 2- Research Aptitude (UGC NET Paper I).pdf
Unit 2- Research Aptitude (UGC NET Paper I).pdfUnit 2- Research Aptitude (UGC NET Paper I).pdf
Unit 2- Research Aptitude (UGC NET Paper I).pdf
Thiyagu K
 
Operation Blue Star - Saka Neela Tara
Operation Blue Star   -  Saka Neela TaraOperation Blue Star   -  Saka Neela Tara
Operation Blue Star - Saka Neela Tara
Balvir Singh
 
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
siemaillard
 
Overview on Edible Vaccine: Pros & Cons with Mechanism
Overview on Edible Vaccine: Pros & Cons with MechanismOverview on Edible Vaccine: Pros & Cons with Mechanism
Overview on Edible Vaccine: Pros & Cons with Mechanism
DeeptiGupta154
 
Thesis Statement for students diagnonsed withADHD.ppt
Thesis Statement for students diagnonsed withADHD.pptThesis Statement for students diagnonsed withADHD.ppt
Thesis Statement for students diagnonsed withADHD.ppt
EverAndrsGuerraGuerr
 
How to Make a Field invisible in Odoo 17
How to Make a Field invisible in Odoo 17How to Make a Field invisible in Odoo 17
How to Make a Field invisible in Odoo 17
Celine George
 
The approach at University of Liverpool.pptx
The approach at University of Liverpool.pptxThe approach at University of Liverpool.pptx
The approach at University of Liverpool.pptx
Jisc
 
Welcome to TechSoup New Member Orientation and Q&A (May 2024).pdf
Welcome to TechSoup   New Member Orientation and Q&A (May 2024).pdfWelcome to TechSoup   New Member Orientation and Q&A (May 2024).pdf
Welcome to TechSoup New Member Orientation and Q&A (May 2024).pdf
TechSoup
 
CLASS 11 CBSE B.St Project AIDS TO TRADE - INSURANCE
CLASS 11 CBSE B.St Project AIDS TO TRADE - INSURANCECLASS 11 CBSE B.St Project AIDS TO TRADE - INSURANCE
CLASS 11 CBSE B.St Project AIDS TO TRADE - INSURANCE
BhavyaRajput3
 
The Challenger.pdf DNHS Official Publication
The Challenger.pdf DNHS Official PublicationThe Challenger.pdf DNHS Official Publication
The Challenger.pdf DNHS Official Publication
Delapenabediema
 
special B.ed 2nd year old paper_20240531.pdf
special B.ed 2nd year old paper_20240531.pdfspecial B.ed 2nd year old paper_20240531.pdf
special B.ed 2nd year old paper_20240531.pdf
Special education needs
 
Polish students' mobility in the Czech Republic
Polish students' mobility in the Czech RepublicPolish students' mobility in the Czech Republic
Polish students' mobility in the Czech Republic
Anna Sz.
 
Instructions for Submissions thorugh G- Classroom.pptx
Instructions for Submissions thorugh G- Classroom.pptxInstructions for Submissions thorugh G- Classroom.pptx
Instructions for Submissions thorugh G- Classroom.pptx
Jheel Barad
 
How libraries can support authors with open access requirements for UKRI fund...
How libraries can support authors with open access requirements for UKRI fund...How libraries can support authors with open access requirements for UKRI fund...
How libraries can support authors with open access requirements for UKRI fund...
Jisc
 
Basic phrases for greeting and assisting costumers
Basic phrases for greeting and assisting costumersBasic phrases for greeting and assisting costumers
Basic phrases for greeting and assisting costumers
PedroFerreira53928
 
Additional Benefits for Employee Website.pdf
Additional Benefits for Employee Website.pdfAdditional Benefits for Employee Website.pdf
Additional Benefits for Employee Website.pdf
joachimlavalley1
 
GIÁO ÁN DẠY THÊM (KẾ HOẠCH BÀI BUỔI 2) - TIẾNG ANH 8 GLOBAL SUCCESS (2 CỘT) N...
GIÁO ÁN DẠY THÊM (KẾ HOẠCH BÀI BUỔI 2) - TIẾNG ANH 8 GLOBAL SUCCESS (2 CỘT) N...GIÁO ÁN DẠY THÊM (KẾ HOẠCH BÀI BUỔI 2) - TIẾNG ANH 8 GLOBAL SUCCESS (2 CỘT) N...
GIÁO ÁN DẠY THÊM (KẾ HOẠCH BÀI BUỔI 2) - TIẾNG ANH 8 GLOBAL SUCCESS (2 CỘT) N...
Nguyen Thanh Tu Collection
 

Recently uploaded (20)

Introduction to Quality Improvement Essentials
Introduction to Quality Improvement EssentialsIntroduction to Quality Improvement Essentials
Introduction to Quality Improvement Essentials
 
The geography of Taylor Swift - some ideas
The geography of Taylor Swift - some ideasThe geography of Taylor Swift - some ideas
The geography of Taylor Swift - some ideas
 
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
 
Unit 2- Research Aptitude (UGC NET Paper I).pdf
Unit 2- Research Aptitude (UGC NET Paper I).pdfUnit 2- Research Aptitude (UGC NET Paper I).pdf
Unit 2- Research Aptitude (UGC NET Paper I).pdf
 
Operation Blue Star - Saka Neela Tara
Operation Blue Star   -  Saka Neela TaraOperation Blue Star   -  Saka Neela Tara
Operation Blue Star - Saka Neela Tara
 
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
 
Overview on Edible Vaccine: Pros & Cons with Mechanism
Overview on Edible Vaccine: Pros & Cons with MechanismOverview on Edible Vaccine: Pros & Cons with Mechanism
Overview on Edible Vaccine: Pros & Cons with Mechanism
 
Thesis Statement for students diagnonsed withADHD.ppt
Thesis Statement for students diagnonsed withADHD.pptThesis Statement for students diagnonsed withADHD.ppt
Thesis Statement for students diagnonsed withADHD.ppt
 
How to Make a Field invisible in Odoo 17
How to Make a Field invisible in Odoo 17How to Make a Field invisible in Odoo 17
How to Make a Field invisible in Odoo 17
 
The approach at University of Liverpool.pptx
The approach at University of Liverpool.pptxThe approach at University of Liverpool.pptx
The approach at University of Liverpool.pptx
 
Welcome to TechSoup New Member Orientation and Q&A (May 2024).pdf
Welcome to TechSoup   New Member Orientation and Q&A (May 2024).pdfWelcome to TechSoup   New Member Orientation and Q&A (May 2024).pdf
Welcome to TechSoup New Member Orientation and Q&A (May 2024).pdf
 
CLASS 11 CBSE B.St Project AIDS TO TRADE - INSURANCE
CLASS 11 CBSE B.St Project AIDS TO TRADE - INSURANCECLASS 11 CBSE B.St Project AIDS TO TRADE - INSURANCE
CLASS 11 CBSE B.St Project AIDS TO TRADE - INSURANCE
 
The Challenger.pdf DNHS Official Publication
The Challenger.pdf DNHS Official PublicationThe Challenger.pdf DNHS Official Publication
The Challenger.pdf DNHS Official Publication
 
special B.ed 2nd year old paper_20240531.pdf
special B.ed 2nd year old paper_20240531.pdfspecial B.ed 2nd year old paper_20240531.pdf
special B.ed 2nd year old paper_20240531.pdf
 
Polish students' mobility in the Czech Republic
Polish students' mobility in the Czech RepublicPolish students' mobility in the Czech Republic
Polish students' mobility in the Czech Republic
 
Instructions for Submissions thorugh G- Classroom.pptx
Instructions for Submissions thorugh G- Classroom.pptxInstructions for Submissions thorugh G- Classroom.pptx
Instructions for Submissions thorugh G- Classroom.pptx
 
How libraries can support authors with open access requirements for UKRI fund...
How libraries can support authors with open access requirements for UKRI fund...How libraries can support authors with open access requirements for UKRI fund...
How libraries can support authors with open access requirements for UKRI fund...
 
Basic phrases for greeting and assisting costumers
Basic phrases for greeting and assisting costumersBasic phrases for greeting and assisting costumers
Basic phrases for greeting and assisting costumers
 
Additional Benefits for Employee Website.pdf
Additional Benefits for Employee Website.pdfAdditional Benefits for Employee Website.pdf
Additional Benefits for Employee Website.pdf
 
GIÁO ÁN DẠY THÊM (KẾ HOẠCH BÀI BUỔI 2) - TIẾNG ANH 8 GLOBAL SUCCESS (2 CỘT) N...
GIÁO ÁN DẠY THÊM (KẾ HOẠCH BÀI BUỔI 2) - TIẾNG ANH 8 GLOBAL SUCCESS (2 CỘT) N...GIÁO ÁN DẠY THÊM (KẾ HOẠCH BÀI BUỔI 2) - TIẾNG ANH 8 GLOBAL SUCCESS (2 CỘT) N...
GIÁO ÁN DẠY THÊM (KẾ HOẠCH BÀI BUỔI 2) - TIẾNG ANH 8 GLOBAL SUCCESS (2 CỘT) N...
 

Arithmatic &Logic Unit

  • 1.
  • 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 AQ =Logic:
  • 11. Exclusive OR (XOR) A B S 0 0 0 1 0 1 0 1 1 1 1 0 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
  • 12. Getting the XOR A B S 0 0 0 1 0 1 0 1 1 1 1 0 BAorBA ⋅⋅ Two ways of getting S = 1
  • 13. Circuit for XOR BABABA ⋅+⋅=⊕ Accumulating our results: Binary addition is the result of XOR plus AND
  • 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 BAQ ⊕= Equality Detector
  • 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