SlideShare a Scribd company logo
24CSE101: DIGITAL
DESIGN
Most of electronic devices consist of two integrated
systems
Softwar
e
Hardwar
e
Programs that control
hardware
to execute user wishes
To learn how to design this
you need to study
Computer Science
Circuits that execute
the program
commands
To learn more about how to
design this you need to
study Digital Logic Design
THE IMPORTANCE OF DIGITAL
LOGIC
2
COURSE OBJECTIVES
Why Digital Logic Design?
●Understand the theory of operation for most of
digital electronic
devices,
●Analyze how a digital computer performs complex
operations,
based on simply manipulating bits (zeros and ones),
●Design digital logic systems!
3
TEXT BOOK
4
TEXT BOOKS:
T1 Morris mano, Michael D Ciletti ,”Digital Design” , 4/e,, PEA
COURSE OUTLINE
5
1. Introduction
2. Gate-Level Minimization
3. Combinational Logic
4. Synchronous Sequential Logic
5. Registers and Counters
6. Memories and Programmable
Logic
FLASHBACK ON DIGITAL
LOGIC DESIGN
HISTORY
6
HOW DID IT
ALL START?
1850: George Boole invents Boolean
algebra 11
HOW DID IT ALL START?
12
1946: ENIAC, the first electronic computer is
developed
●18,000 vacuum tubes
●5,000 operations per second
●1,000 square feet
●It really cost a lot of power to turn on the
switch!
Dr. Haitham Omran, Dr. Wassim Alexan 13
AND IT WENT ON…
1947: Shockley, Brattain,
and
Bardeen invent the
transistor
●Replaces vacuum tubes
●Enables integration of
multiple devices into one
package
1956: They received the
Nobel Prize in Physics
10
AND IT WENT ON…
1955: TRADIC: AT&T Bell Labs
announced the first fully
transistorized computer
1958: The1st
(2D) Integrated
Circuit (Kilby received the Nobel
prize in 2000)
•Transistor, resistors and
capacitors on the same piece of
semiconductor
•Interconnects between
components is
not integrated
•Low connectivity between
11
AND IT WENT ON…
1971: Intel’s 4004 1st
microprocessor
•Maximum clock rate is 740 kHz
•46300 to 92600 instructions per
second
12
Now: Intel® Core™ i7-6700K Processor
(8M Cache, up to 4.20 GHz)
APPLICATIONS OF DIGITAL
LOGIC DESIGN
Conventional computer design
●CPUs, busses, peripherals
Networking and communications
●Phones, modems, routers
Embedded products
●Cars
●Toys
●Appliances
●Entertainment devices: MP3 players, gaming consoles
(PlayStation,
Xbox, etc…) 13
BUT WHAT IS THE MEANING
OF DIGITAL LOGIC DESIGN?
14
WHAT IS DIGITAL?
Digital describes any system based on discontinuous data or
events. Computers are digital machines because at their most
basic level they can distinguish between just two values, 0 and 1,
or off and on. There is no simple way to represent all the values in
between, such as 0.25. All data that a computer processes must be
encoded digitally, as a series of zeroes and ones.
15
ANALOG VS. DIGITAL
An analog signal is any variable signal continuous in
both time and
amplitude. e.g. Sound
Example:
A typical analog device is a clock in which the hands move continuously
around the face. Such a clock is capable of indicating every possible time of
day. In contrast, a digital clock is capable of representing only a finite
number of times (every tenth of a second, for example).
16
WHY DIGITAL?
Digital systems are easier to design and
implement than
analog systems.
17
WHAT IS LOGIC DESIGN?
18
Given a specification of a problem, come up
with a way of solving it, choosing appropriately
from a collection of available components,
while meeting some criteria for size, cost,
power, etc…
23
■Digital Logic Gates!
■Digital Logic Gates are the basic units
to
build any digital circuit
WHAT ARE THE BASIC UNITS
USED TO BUILD
THESE DIGITAL CIRCUITS?
DIGITAL
LOGIC GATES
•Digital logic circuits are hardware components that
manipulate
binary information (we call them gates)
•A digital system is basically a black box with a
minimum of one input and one output
•Inside this box, are millions of switches called
transistors
•Transistors perform different functions according to
inputs
Digital System
A
B
20
Digital Logic levels
What is the physical meaning of logic 0
and
logic 1? How can we recognize them?
21
DIGITAL LOGIC LEVELS
(CONT.)
Electrical Signals (voltages or currents)
that exist throughout a digital system
are in either of two recognizable values
(logic 1 or logic 0)
Voltage
5
0
Time
Logic – 1 range
Transition (occurs
between the two limits)
Intermediate
region,
crossed only
during state
transition
22
Logic – 0 range
0.8
2
The first obvious difference is that in Boolean
algebra we have only (+) and (∙) operators,
but we do not have subtraction (-) or division
(/) like in mathematics
27
Boolean Algebra
What is the difference between the
Boolean algebra and arithmetic algebra?
BINARY LOGIC
You should distinguish between binary logic
and binary
arithmetic.
●Arithmetic variables are numbers that consist of
many digits.
Arithmetic 1 + 1 = 10
●A binary logic variable is always either
1 or 0.
Binary 1 + 1 = 1
Two digits
Carry
24
DIGITAL LOGIC GATES
There are three fundamental logical
operations, from which all other functions,
no matter how complex, can be derived.
These Basic functions are named:
●AND,
●OR,
●NOT (INVERTER).
Each of these has a specific symbol
and a clearly-defined behavior
25
BASIC DIGITAL LOGIC
GATES (CONT.)
AND Gate
●Represented by any of the
following
notations:
●X AND Y
●X . Y
●X Y
●Function definition:
Z=1 only if X=Y=1
0 otherwise
X
Y
Z
Symbol
diagram
AN
D
AND
X
26
Y
Switch
representation
BASIC DIGITAL LOGIC
GATES (CONT.)
OR Gate
●Represented by any of the following
notations:
●X OR Y
●X + Y
●X v Y
●Function
definition:
1 if X=1 or Y =1 or both
X=Y=1
0 if X=Y=0
X
Y
Z
Symbol
diagram
O
R
OR
X
27
Y
Switch
representation
Z=
BASIC DIGITAL LOGIC
GATES (CONT.)
NOT (Inverter) Gate
●Represented by a bar over the
variable
Function
definition:
Z is what X is not
It is also called the
complement operation, as
it changes 1s into 0s and
0s into 1s.
X Z
X
Symbol
diagram
NO
T
NOT
X
z
Switch
representation
28
LOGIC GATES TIMING
DIAGRAM
•Timing diagrams illustrate the response of any gate to all possible
input signal combinations.
•The horizontal axis of the timing diagram represents time and the
vertical axis represents the signal as it changes between the two
possible voltage levels 1 or 0
29
DIGITAL LOGIC GATES (CONT.)
Gates can have more than 2
inputs
Other Types of logic
gates
30
HOW TO DESCRIBE A LOGIC
SYSTEM?
By using one of the following two
methods:
•A Truth Table
•A Boolean Expression
31
TRUTH TABLES
X
Y
Z
A Truth Table is a table of combinations of the binary variables
showing the relationship between the different values that the input
variables take and the result of the operation (output).
The number of rows in the Truth Table is
2n, where n = number of input
variables in the function.
The binary combinations are obtained from the binary number by
counting from 0 to
2n
−1
Truth table of an AND
gate
Example: AND gate with 2
inputs
n=2
The truth table has 22
rows = 4
The binary combinations are
from 0 to (22
-1=(3))
{00,01,10,11}
All input
combinations
output
32
X Y Z
0 0 0
0 1 0
1 0 0
1 1 1
BOOLEAN EXPRESSIONS
33
We can use these basic operations to form more complex
expressions:
f(x,y,z) = (x + y’)z + x’
Some terminology and notation:
●f is the name of the function.
●(x,y,z) are the input variables, each representing 1 or 0.
Listing the inputs is optional, but sometimes helpful.
●A literal is any occurrence of an input variable or its
complement.
The function above has four literals: x, y’, z, and x’.
Precedencies are important, but not too difficult
●NOT has the highest precedence, followed by AND, and
then OR
HOW TO GET THE
BOOLEAN EXPRESSION
FROM THE TRUTH TABLE?
34
BOOLEAN EXPRESSIONS FROM
TRUTH TABLES
Each 1 in the output of a truth table specifies one term in the
corresponding Boolean expression
The expression can be read off by inspection…
F is true when:
A is false AND B is true AND C is false OR
A is true AND B is true AND C is true
F = A’BC’ + ABC
Sum-of-Products-Algorithm
35
A B C F
0 0 0 0
0 0 1 0
0 1 0 1
0 1 1 0
1 0 0 0
1 0 1 0
1 1 0 0
1 1 1 1
ANOTHER EXAMPLE
F = A’B’C +
A’BC’ +
AB’C’ +
ABC
F = ?
A
B
C
F
0
0
0
0
0
1
0
1
0
0
1
1
0
1
0
0
1
36
BASIC LOGIC GATES
• We have defined three basic logic gates and
operators
37
•Also, we could build any digital circuit from those
basic
logic gates
•In digital Logic, we are not using normal
mathematics we are using Boolean algebra
So, we need to know the laws & rules of Boolean
Algebra
LAWS & RULES OF BOOLEAN
ALGEBRA
The basic laws of Boolean algebra
•The commutative law
•The associative law
•The distributive law
38
COMMUTATIVE LAW
The commutative law of addition for two
variables is
A+B = B+A
The commutative law of multiplication for two
variables is
AB = BA
≡
A
B
A+B B
A
B+A
A
B
AB B
A
BA
≡
39
ASSOCIATIVE LAW
A
B
C
A+(B+C) A
B
C
(A+B)+C
A
B
C
A(BC)
≡
40
A
B
C
(AB)C
≡
B+C
A+B
BC
The associative law of multiplication for 3
variables is
A(BC) = (AB)C
AB
The associative law of addition for 3
variables is
A+(B+C) = (A+B)+C
DISTRIBUTI
VE LAW
A+C
X=(A+B)
B
C
A
B+C A
B
A
C
X
AB
AC
X=AB+AC
X=A+(B.C)
B
C
A
X
X=A(B+C)
The distributive law for
addition is A+(B.C) =
(A+B)(A+C)
A
B
A
C
X
≡
BC A+B
The distributive law for
multiplication is
A(B+C) = AB + AC
BASIC THEOREMS OF
BOOLEAN ALGEBRA
9.A = A
10.A + AB = A
11.A + AB = A + B
12.( A + B)( A + C) = A +
BC
A.+ 0 = A
2.A +1 = 1
3.A ∙ 0 = 0
4.A ∙1 = A
A.A + A =
A
B.A + A = 1
7.A ∙ A =
A
8.A ∙ A =
0
A, B, and C can represent a single variable or a combination of
variables.
42
DUALITY PRINCIPLE
Duality Duality
X + 0 = XX⋅1 =
X
X
+ X⋅Y = X X
X
⋅ (X
+
+ Y)
X
=
⋅ Y
X
= X X⋅ (X + Y) = X
Duality
X + X = X Duality
X⋅X = X
A Boolean equation remains valid if we take the
dual of the
expressions on both sides of the equals sign
The dual of an expression is reached as follows:
●Interchange any 1 with a 0 (and vice-versa)
●Interchange any AND (∙) with an OR (+) (and vice-versa)
43
DEMORGAN’S LAW
48
A⋅ B = A + B
≡
A + B = A⋅B
≡
EXAM
PLE
Get the logic function from the following truth table and
implement it using basic logic gates (AND, OR, NOT)
A B P
0 0 1
0 1 1
1 0 1
1 1 0
P = A’ B’ + A’B + A B’
• It needs two inverters +
three AND + two OR gates
= 7 gates to implement the
function
outputs
49
Can we make this circuit better?
•Cheaper: fewer gates
•Faster: fewer delays from inputs to
The answer in the simplification of
the logic function
SIMPLIFICATION OF THE
LOGIC FUNCTION
50
A’B’ + A’B + AB’
= A’ * (B’ + B) + A * B’
= A’ * (B + B’) + A * B’
(Distributivity)
(Commutativit
y)
= A’ * 1 + A * B’
= A’ + (A * B’)
(x + x’ = 1)
(x +x’y)=(x+x’)(x+y)(Distributivity)
= (A’ + B’) (De
Morgan’s)
= (A B)’ 1 GATE (NAND) ONLY
Simplification rules allow us here to optimize the design and use a single
gate!
51
DERIVED GATES
NAND
AND-Invert
NOR
OR-Invert
XOR
Odd
XNOR
Even
X Y Z
0 0 1
0 1 0
1 0 0
1 1 1
X Y Z
0 0 0
0 1 1
1 0 1
1 1 0
X Y Z
0 0 1
0 1 1
1 0 1
1 1 0
X Y Z
0 0 1
0 1 0
1 0 0
1 1 0

More Related Content

PPTX
digital systems introduction logic systems
PPTX
chapter 3 Boolean algebra (2).pptx
PPT
computer system architecture for control system.ppt
PPTX
Lecture of information technology 1-COA-2015[1].pptx
PPTX
[01] Exit Exam Preparation 2023 DLD.pptx
DOC
Dpsd lecture-notes
PDF
Introduction_to_Mechatronics_Chapter5.pdf
PPTX
class xi pptx-1.pptx
digital systems introduction logic systems
chapter 3 Boolean algebra (2).pptx
computer system architecture for control system.ppt
Lecture of information technology 1-COA-2015[1].pptx
[01] Exit Exam Preparation 2023 DLD.pptx
Dpsd lecture-notes
Introduction_to_Mechatronics_Chapter5.pdf
class xi pptx-1.pptx

Similar to Introduction to Digital System eLECTRONICS (20)

PPT
PPTX
Boolean Algebra and logic gates by Shahzaib Khalil
PPTX
Chapter one embedded system corse ppt AASTU.pptx
PDF
Analog and Digital Electronics engin.pdf
PPT
IS 139 Lecture 3 - 2015
PPT
IS 139 Lecture 3
PDF
Digital Principles and computer Organisation important 2 mark Questions
PDF
_Digital_Electronics_II.pdf circuits and circuit diagrams
PPT
digital fundMathinaDigitalAgePowerPo.ppt
PDF
CP4151 Advanced data structures and algorithms
PDF
Digital Electronics Most Essential and Frequently Asked Interview Questions
PPTX
ICT FIRST LECTURE.pptx
PPTX
B sc3 unit 4 combi..lckt
PPT
Binary parallel adder, decimal adder
PPTX
3130704_DF_GTU_Study_Material_Presentations_Unit-1.pptx
PPTX
Combinational logic circuits by Tahir Yasin
PPT
Digital 1 8
PDF
Number System, nubmers and binary addition
PPTX
Introduction to computer Architecture. this will be helpful for Information T...
Boolean Algebra and logic gates by Shahzaib Khalil
Chapter one embedded system corse ppt AASTU.pptx
Analog and Digital Electronics engin.pdf
IS 139 Lecture 3 - 2015
IS 139 Lecture 3
Digital Principles and computer Organisation important 2 mark Questions
_Digital_Electronics_II.pdf circuits and circuit diagrams
digital fundMathinaDigitalAgePowerPo.ppt
CP4151 Advanced data structures and algorithms
Digital Electronics Most Essential and Frequently Asked Interview Questions
ICT FIRST LECTURE.pptx
B sc3 unit 4 combi..lckt
Binary parallel adder, decimal adder
3130704_DF_GTU_Study_Material_Presentations_Unit-1.pptx
Combinational logic circuits by Tahir Yasin
Digital 1 8
Number System, nubmers and binary addition
Introduction to computer Architecture. this will be helpful for Information T...
Ad

Recently uploaded (20)

PDF
grade 11-chemistry_fetena_net_5883.pdf teacher guide for all student
PDF
TR - Agricultural Crops Production NC III.pdf
PDF
O5-L3 Freight Transport Ops (International) V1.pdf
PDF
Computing-Curriculum for Schools in Ghana
PDF
Black Hat USA 2025 - Micro ICS Summit - ICS/OT Threat Landscape
PPTX
Introduction_to_Human_Anatomy_and_Physiology_for_B.Pharm.pptx
PDF
Complications of Minimal Access Surgery at WLH
PDF
Basic Mud Logging Guide for educational purpose
PPTX
Pharma ospi slides which help in ospi learning
PDF
RMMM.pdf make it easy to upload and study
PDF
Supply Chain Operations Speaking Notes -ICLT Program
PPTX
Final Presentation General Medicine 03-08-2024.pptx
PDF
BÀI TẬP BỔ TRỢ 4 KỸ NĂNG TIẾNG ANH 9 GLOBAL SUCCESS - CẢ NĂM - BÁM SÁT FORM Đ...
PDF
O7-L3 Supply Chain Operations - ICLT Program
PPTX
Microbial diseases, their pathogenesis and prophylaxis
PPTX
BOWEL ELIMINATION FACTORS AFFECTING AND TYPES
PPTX
Pharmacology of Heart Failure /Pharmacotherapy of CHF
PDF
Classroom Observation Tools for Teachers
PPTX
Cell Structure & Organelles in detailed.
PPTX
1st Inaugural Professorial Lecture held on 19th February 2020 (Governance and...
grade 11-chemistry_fetena_net_5883.pdf teacher guide for all student
TR - Agricultural Crops Production NC III.pdf
O5-L3 Freight Transport Ops (International) V1.pdf
Computing-Curriculum for Schools in Ghana
Black Hat USA 2025 - Micro ICS Summit - ICS/OT Threat Landscape
Introduction_to_Human_Anatomy_and_Physiology_for_B.Pharm.pptx
Complications of Minimal Access Surgery at WLH
Basic Mud Logging Guide for educational purpose
Pharma ospi slides which help in ospi learning
RMMM.pdf make it easy to upload and study
Supply Chain Operations Speaking Notes -ICLT Program
Final Presentation General Medicine 03-08-2024.pptx
BÀI TẬP BỔ TRỢ 4 KỸ NĂNG TIẾNG ANH 9 GLOBAL SUCCESS - CẢ NĂM - BÁM SÁT FORM Đ...
O7-L3 Supply Chain Operations - ICLT Program
Microbial diseases, their pathogenesis and prophylaxis
BOWEL ELIMINATION FACTORS AFFECTING AND TYPES
Pharmacology of Heart Failure /Pharmacotherapy of CHF
Classroom Observation Tools for Teachers
Cell Structure & Organelles in detailed.
1st Inaugural Professorial Lecture held on 19th February 2020 (Governance and...
Ad

Introduction to Digital System eLECTRONICS

  • 2. Most of electronic devices consist of two integrated systems Softwar e Hardwar e Programs that control hardware to execute user wishes To learn how to design this you need to study Computer Science Circuits that execute the program commands To learn more about how to design this you need to study Digital Logic Design THE IMPORTANCE OF DIGITAL LOGIC 2
  • 3. COURSE OBJECTIVES Why Digital Logic Design? ●Understand the theory of operation for most of digital electronic devices, ●Analyze how a digital computer performs complex operations, based on simply manipulating bits (zeros and ones), ●Design digital logic systems! 3
  • 4. TEXT BOOK 4 TEXT BOOKS: T1 Morris mano, Michael D Ciletti ,”Digital Design” , 4/e,, PEA
  • 5. COURSE OUTLINE 5 1. Introduction 2. Gate-Level Minimization 3. Combinational Logic 4. Synchronous Sequential Logic 5. Registers and Counters 6. Memories and Programmable Logic
  • 6. FLASHBACK ON DIGITAL LOGIC DESIGN HISTORY 6
  • 7. HOW DID IT ALL START? 1850: George Boole invents Boolean algebra 11
  • 8. HOW DID IT ALL START? 12 1946: ENIAC, the first electronic computer is developed ●18,000 vacuum tubes ●5,000 operations per second ●1,000 square feet ●It really cost a lot of power to turn on the switch!
  • 9. Dr. Haitham Omran, Dr. Wassim Alexan 13
  • 10. AND IT WENT ON… 1947: Shockley, Brattain, and Bardeen invent the transistor ●Replaces vacuum tubes ●Enables integration of multiple devices into one package 1956: They received the Nobel Prize in Physics 10
  • 11. AND IT WENT ON… 1955: TRADIC: AT&T Bell Labs announced the first fully transistorized computer 1958: The1st (2D) Integrated Circuit (Kilby received the Nobel prize in 2000) •Transistor, resistors and capacitors on the same piece of semiconductor •Interconnects between components is not integrated •Low connectivity between 11
  • 12. AND IT WENT ON… 1971: Intel’s 4004 1st microprocessor •Maximum clock rate is 740 kHz •46300 to 92600 instructions per second 12 Now: Intel® Core™ i7-6700K Processor (8M Cache, up to 4.20 GHz)
  • 13. APPLICATIONS OF DIGITAL LOGIC DESIGN Conventional computer design ●CPUs, busses, peripherals Networking and communications ●Phones, modems, routers Embedded products ●Cars ●Toys ●Appliances ●Entertainment devices: MP3 players, gaming consoles (PlayStation, Xbox, etc…) 13
  • 14. BUT WHAT IS THE MEANING OF DIGITAL LOGIC DESIGN? 14
  • 15. WHAT IS DIGITAL? Digital describes any system based on discontinuous data or events. Computers are digital machines because at their most basic level they can distinguish between just two values, 0 and 1, or off and on. There is no simple way to represent all the values in between, such as 0.25. All data that a computer processes must be encoded digitally, as a series of zeroes and ones. 15
  • 16. ANALOG VS. DIGITAL An analog signal is any variable signal continuous in both time and amplitude. e.g. Sound Example: A typical analog device is a clock in which the hands move continuously around the face. Such a clock is capable of indicating every possible time of day. In contrast, a digital clock is capable of representing only a finite number of times (every tenth of a second, for example). 16
  • 17. WHY DIGITAL? Digital systems are easier to design and implement than analog systems. 17
  • 18. WHAT IS LOGIC DESIGN? 18 Given a specification of a problem, come up with a way of solving it, choosing appropriately from a collection of available components, while meeting some criteria for size, cost, power, etc…
  • 19. 23 ■Digital Logic Gates! ■Digital Logic Gates are the basic units to build any digital circuit WHAT ARE THE BASIC UNITS USED TO BUILD THESE DIGITAL CIRCUITS?
  • 20. DIGITAL LOGIC GATES •Digital logic circuits are hardware components that manipulate binary information (we call them gates) •A digital system is basically a black box with a minimum of one input and one output •Inside this box, are millions of switches called transistors •Transistors perform different functions according to inputs Digital System A B 20
  • 21. Digital Logic levels What is the physical meaning of logic 0 and logic 1? How can we recognize them? 21
  • 22. DIGITAL LOGIC LEVELS (CONT.) Electrical Signals (voltages or currents) that exist throughout a digital system are in either of two recognizable values (logic 1 or logic 0) Voltage 5 0 Time Logic – 1 range Transition (occurs between the two limits) Intermediate region, crossed only during state transition 22 Logic – 0 range 0.8 2
  • 23. The first obvious difference is that in Boolean algebra we have only (+) and (∙) operators, but we do not have subtraction (-) or division (/) like in mathematics 27 Boolean Algebra What is the difference between the Boolean algebra and arithmetic algebra?
  • 24. BINARY LOGIC You should distinguish between binary logic and binary arithmetic. ●Arithmetic variables are numbers that consist of many digits. Arithmetic 1 + 1 = 10 ●A binary logic variable is always either 1 or 0. Binary 1 + 1 = 1 Two digits Carry 24
  • 25. DIGITAL LOGIC GATES There are three fundamental logical operations, from which all other functions, no matter how complex, can be derived. These Basic functions are named: ●AND, ●OR, ●NOT (INVERTER). Each of these has a specific symbol and a clearly-defined behavior 25
  • 26. BASIC DIGITAL LOGIC GATES (CONT.) AND Gate ●Represented by any of the following notations: ●X AND Y ●X . Y ●X Y ●Function definition: Z=1 only if X=Y=1 0 otherwise X Y Z Symbol diagram AN D AND X 26 Y Switch representation
  • 27. BASIC DIGITAL LOGIC GATES (CONT.) OR Gate ●Represented by any of the following notations: ●X OR Y ●X + Y ●X v Y ●Function definition: 1 if X=1 or Y =1 or both X=Y=1 0 if X=Y=0 X Y Z Symbol diagram O R OR X 27 Y Switch representation Z=
  • 28. BASIC DIGITAL LOGIC GATES (CONT.) NOT (Inverter) Gate ●Represented by a bar over the variable Function definition: Z is what X is not It is also called the complement operation, as it changes 1s into 0s and 0s into 1s. X Z X Symbol diagram NO T NOT X z Switch representation 28
  • 29. LOGIC GATES TIMING DIAGRAM •Timing diagrams illustrate the response of any gate to all possible input signal combinations. •The horizontal axis of the timing diagram represents time and the vertical axis represents the signal as it changes between the two possible voltage levels 1 or 0 29
  • 30. DIGITAL LOGIC GATES (CONT.) Gates can have more than 2 inputs Other Types of logic gates 30
  • 31. HOW TO DESCRIBE A LOGIC SYSTEM? By using one of the following two methods: •A Truth Table •A Boolean Expression 31
  • 32. TRUTH TABLES X Y Z A Truth Table is a table of combinations of the binary variables showing the relationship between the different values that the input variables take and the result of the operation (output). The number of rows in the Truth Table is 2n, where n = number of input variables in the function. The binary combinations are obtained from the binary number by counting from 0 to 2n −1 Truth table of an AND gate Example: AND gate with 2 inputs n=2 The truth table has 22 rows = 4 The binary combinations are from 0 to (22 -1=(3)) {00,01,10,11} All input combinations output 32 X Y Z 0 0 0 0 1 0 1 0 0 1 1 1
  • 33. BOOLEAN EXPRESSIONS 33 We can use these basic operations to form more complex expressions: f(x,y,z) = (x + y’)z + x’ Some terminology and notation: ●f is the name of the function. ●(x,y,z) are the input variables, each representing 1 or 0. Listing the inputs is optional, but sometimes helpful. ●A literal is any occurrence of an input variable or its complement. The function above has four literals: x, y’, z, and x’. Precedencies are important, but not too difficult ●NOT has the highest precedence, followed by AND, and then OR
  • 34. HOW TO GET THE BOOLEAN EXPRESSION FROM THE TRUTH TABLE? 34
  • 35. BOOLEAN EXPRESSIONS FROM TRUTH TABLES Each 1 in the output of a truth table specifies one term in the corresponding Boolean expression The expression can be read off by inspection… F is true when: A is false AND B is true AND C is false OR A is true AND B is true AND C is true F = A’BC’ + ABC Sum-of-Products-Algorithm 35 A B C F 0 0 0 0 0 0 1 0 0 1 0 1 0 1 1 0 1 0 0 0 1 0 1 0 1 1 0 0 1 1 1 1
  • 36. ANOTHER EXAMPLE F = A’B’C + A’BC’ + AB’C’ + ABC F = ? A B C F 0 0 0 0 0 1 0 1 0 0 1 1 0 1 0 0 1 36
  • 37. BASIC LOGIC GATES • We have defined three basic logic gates and operators 37 •Also, we could build any digital circuit from those basic logic gates •In digital Logic, we are not using normal mathematics we are using Boolean algebra So, we need to know the laws & rules of Boolean Algebra
  • 38. LAWS & RULES OF BOOLEAN ALGEBRA The basic laws of Boolean algebra •The commutative law •The associative law •The distributive law 38
  • 39. COMMUTATIVE LAW The commutative law of addition for two variables is A+B = B+A The commutative law of multiplication for two variables is AB = BA ≡ A B A+B B A B+A A B AB B A BA ≡ 39
  • 40. ASSOCIATIVE LAW A B C A+(B+C) A B C (A+B)+C A B C A(BC) ≡ 40 A B C (AB)C ≡ B+C A+B BC The associative law of multiplication for 3 variables is A(BC) = (AB)C AB The associative law of addition for 3 variables is A+(B+C) = (A+B)+C
  • 41. DISTRIBUTI VE LAW A+C X=(A+B) B C A B+C A B A C X AB AC X=AB+AC X=A+(B.C) B C A X X=A(B+C) The distributive law for addition is A+(B.C) = (A+B)(A+C) A B A C X ≡ BC A+B The distributive law for multiplication is A(B+C) = AB + AC
  • 42. BASIC THEOREMS OF BOOLEAN ALGEBRA 9.A = A 10.A + AB = A 11.A + AB = A + B 12.( A + B)( A + C) = A + BC A.+ 0 = A 2.A +1 = 1 3.A ∙ 0 = 0 4.A ∙1 = A A.A + A = A B.A + A = 1 7.A ∙ A = A 8.A ∙ A = 0 A, B, and C can represent a single variable or a combination of variables. 42
  • 43. DUALITY PRINCIPLE Duality Duality X + 0 = XX⋅1 = X X + X⋅Y = X X X ⋅ (X + + Y) X = ⋅ Y X = X X⋅ (X + Y) = X Duality X + X = X Duality X⋅X = X A Boolean equation remains valid if we take the dual of the expressions on both sides of the equals sign The dual of an expression is reached as follows: ●Interchange any 1 with a 0 (and vice-versa) ●Interchange any AND (∙) with an OR (+) (and vice-versa) 43
  • 44. DEMORGAN’S LAW 48 A⋅ B = A + B ≡ A + B = A⋅B ≡
  • 45. EXAM PLE Get the logic function from the following truth table and implement it using basic logic gates (AND, OR, NOT) A B P 0 0 1 0 1 1 1 0 1 1 1 0 P = A’ B’ + A’B + A B’ • It needs two inverters + three AND + two OR gates = 7 gates to implement the function outputs 49 Can we make this circuit better? •Cheaper: fewer gates •Faster: fewer delays from inputs to The answer in the simplification of the logic function
  • 46. SIMPLIFICATION OF THE LOGIC FUNCTION 50 A’B’ + A’B + AB’ = A’ * (B’ + B) + A * B’ = A’ * (B + B’) + A * B’ (Distributivity) (Commutativit y) = A’ * 1 + A * B’ = A’ + (A * B’) (x + x’ = 1) (x +x’y)=(x+x’)(x+y)(Distributivity) = (A’ + B’) (De Morgan’s) = (A B)’ 1 GATE (NAND) ONLY Simplification rules allow us here to optimize the design and use a single gate!
  • 47. 51 DERIVED GATES NAND AND-Invert NOR OR-Invert XOR Odd XNOR Even X Y Z 0 0 1 0 1 0 1 0 0 1 1 1 X Y Z 0 0 0 0 1 1 1 0 1 1 1 0 X Y Z 0 0 1 0 1 1 1 0 1 1 1 0 X Y Z 0 0 1 0 1 0 1 0 0 1 1 0