Lecture4_Logic gates.ppt for semester one year ones
mukiibirhines2001
4 views
31 slides
Jul 08, 2024
Slide 1 of 31
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
About This Presentation
good for everyone
Size: 661.72 KB
Language: en
Added: Jul 08, 2024
Slides: 31 pages
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
00=0 0+0=0
01=0 0+1=1
10=0 1+0=1
11=1 1+1=1
A0=0 A+0=A
0A=0 0+A=A
A1=A A+1=1
1A=A 1+A=1
AA=A A+A=A0AA 1AA 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