Lecture4_Logic gates.ppt for semester one year ones

mukiibirhines2001 4 views 31 slides Jul 08, 2024
Slide 1
Slide 1 of 31
Slide 1
1
Slide 2
2
Slide 3
3
Slide 4
4
Slide 5
5
Slide 6
6
Slide 7
7
Slide 8
8
Slide 9
9
Slide 10
10
Slide 11
11
Slide 12
12
Slide 13
13
Slide 14
14
Slide 15
15
Slide 16
16
Slide 17
17
Slide 18
18
Slide 19
19
Slide 20
20
Slide 21
21
Slide 22
22
Slide 23
23
Slide 24
24
Slide 25
25
Slide 26
26
Slide 27
27
Slide 28
28
Slide 29
29
Slide 30
30
Slide 31
31

About This Presentation

good for everyone


Slide Content

LOGIC GATES AND BOOLEAN
ALGEBRA
1

Logic Gates
•The building blocks used to create digital circuits are logic
gates
•There are three elementary logic gates and a range of
other simple gates
•Each gate has its own logic symbolwhich allows complex
functions to be represented by a logic diagram
•The function of each gate can be represented by a truth
tableor using Boolean notation
2

•The AND gate
3

•The OR gate
4

•The NOT gate (or inverter)
5

•A logic buffer gate
6

•The NAND gate
7

•The NOR gate
8

•The Exclusive OR gate
9

•The Exclusive NOR gate
10

•Implementing a function from a Boolean expression
Example 1 –Implement the function using a logic gate CBAX
11

•Implementing a function from a Boolean expression
Example 2 –
Implement the function DCBAY 
12

•Generating a Boolean expression from a logic diagram
Example –
13

Example (continued)
–work progressively from the inputs to the output adding logic
expressions to the output of each gate in turn
14

•Implementing a logic function from a description
Example –
The operation of the Exclusive OR gate can be stated as:
“The output should be true if either of its inputs are true,
but not if both inputs are true.”
This can be rephrased as:
“The output is true if AOR Bis true,
AND if AAND BareNOT true.”
We can write this in Boolean notation as)()( ABBAX 
15

Example (continued)
The logic function
can then be implemented as before)()( ABBAX 
16

•Implementing a logic function from a truth table
Example –
Implement the function of the following truth table
ABCX
0000
0011
0100
0110
1000
1011
1101
1110
–first write down a Boolean
expression for the output
–then implement as before
–in this caseCBACBACBAX 
17

Example (continued)
The logic function
can then be implemented as beforeCBACBACBAX 
18

•In some cases it is possible to simplifylogic expressions
using the rules of Boolean algebra
Example –
can be simplified to
hence the following circuits are equivalent CAACBCAABCX  ABCX 
19

Boolean Algebra
•Boolean Constants
•these are ‘0’ (false) and ‘1’ (true)
•Boolean Variables
•variables that can only take the vales ‘0’ or ‘1’
•Boolean Functions
•each of the logic functions (such as AND, OR and NOT) are
represented by symbols as described above
•Boolean Theorems
•a set of identitiesand laws–see text for details
20

•Boolean identities
AND Function OR Function NOT function
00=0 0+0=0
01=0 0+1=1
10=0 1+0=1
11=1 1+1=1
A0=0 A+0=A
0A=0 0+A=A
A1=A A+1=1
1A=A 1+A=1
AA=A A+A=A0AA 1AA 10 0 1 AA
21

Commutative law Absorption law
Distributive law De Morgan’s law
Associative law Note also
•Boolean lawsABBA
BAAB

 ))((
)(
CABABCA
BCABCBA

 CBACBA
CABBCA


)()(
)()( ABAA
AABA


)( BABA
BABA

 ABBAA
BABAA


)(
22

DeMorgan’s Theorems
•Theorem 1
•Theorem 2YXXY  YXYX 
Remember:
“Break the bar,
change the sign”

3.2 Boolean Algebra
•Most Boolean identities have an AND (product) form as
well as an OR (sum) form. We give our identities using
both forms. Our first group is rather intuitive:
24

3.2 Boolean Algebra
•Our second group of Boolean identities should be
familiar to you from your study of algebra:
25

3.2 Boolean Algebra
•Our last group of Boolean identities are perhaps the most
useful.
•If you have studied set theory or formal logic, these laws
are also familiar to you.
26

3.2 Boolean Algebra
•We can use Boolean identities to simplify the function:
as follows:
27

3.2 Boolean Algebra
•Sometimes it is more economical to build a circuit
using the complement of a function (and
complementing its result) than it is to implement the
function directly.
•DeMorgan’s law provides an easy way of finding the
complement of a Boolean function.
•Recall DeMorgan’s law states:
28

3.2 Boolean Algebra
•DeMorgan’s law can be extended to any number of
variables.
•Replace each variable by its complement and
change all ANDs to ORs and all ORs to ANDs.
•Thus, we find the the complement of:
is:
29

Revision Questions
•What are the applications of logic gates and boolean
algebra?
30

Question?
31