8/20/2019 Lecture 1 MENG 4779 Mechatronics and Digital Systems -- Spring 2016 (1)
1/62
AUC_MENG 4779 Spring 2016
Prof. Dr. Maki K. Habib
AUC_MENG 4779 Spring 2016 Prof. Dr. Maki K. Habib
Mechatronics
and
Digital Systems
Maki K. Habib
Mechanical Engineering Department
School of Sciences and Engineering
The American University in Cairo
AUC_MENG 4779 Spring 2016 Prof. Dr. Maki K. Habib
The technical term, Mechatronics,
is the concept created in 1969 by
Mr. Tetsuro Mori, CEO / President, SeibuElectric and Machinery Co. Ltd.,
when he worked for Yaskawa Electric
Corporation in Kitakyushu/Japan
He proposed the new technology to produce new
machine tools to unite
• mechanism and electronics supported by• semiconductor power devices and
• CPUs which is necessary to develop ‘intelligent’
products and manufacturing systems.
8/20/2019 Lecture 1 MENG 4779 Mechatronics and Digital Systems -- Spring 2016 (1)
2/62
AUC_MENG 4779 Spring 2016
Prof. Dr. Maki K. Habib
AUC_MENG 4779 Spring 2016 Prof. Dr. Maki K. Habib
The circumstances that lead to the growth
of Mechatronics Products are,
1. Cheap mass produced integrated circuits have enabled the
situation of mechanical functions by electronics,
2. The advent of Microprocessor has made it possible to introduce
“intelligence” in the control functions of mechanical processes,
3. The advent of sensor technology has made it possible to
integrate mechanic and electronic technologies, and
4. The reliability of electronic components and circuits has become high enough to withstand the hostile conditions of
mechanical environment.
AUC_MENG 4779 Spring 2016 Prof. Dr. Maki K. Habib
1969 1980 1990 2000
The birth of
Mechatronics
System Engineering
2010
Mechatronics as
engineering and
quality of technology
Mechatronics as
interdisciplinary
education and
research identity
Mechatronics as
engineering
science discipline
Mechatronics
as technology
and practices
(team based)
T e c h n o
l o g y, p
r a c t i c e
s, i n t e
l l i g e n c
e, i n t e
r d i s c i p
l i n a r y,
e d u c a t
i o n, i n
n o v a t i o
n, l e a r
n i n g , d
i s c i p l i n e
Servo technology,
Microprocessors
Numerically controlled
systems, Semiconductor
technology boom,
Automotive industry,
Consumer electronics
Technology developed
individually and independently.
Interactions between software,
mechanical and electronics
elements.
The increase in variety and
complexity of product design,and the wide range of growing
industries initiated the demand
for engineers with
Mechatronics thinking
knowledge and actions.
Rapid prototyping, Opto-
electronics, Embedded
systems, Micro-technology
and MEMs, Human
computer interaction,
Electronic and Advanced
manufacturing, Knowledge
based systems, Automation,
Informatics and networking
Uniqueness of Mechatronics as a
significant design trend. Interactive
design process with consideration
on: innovation, human factors, lifecycle factors, quality, reliability,
functionality, smartness, portability,
compactness, low cost, etc.
Mechatronics has gained attention
and its importance was widely
recognized
Nanotechnology, Processor
speeds, High memory capacity
biotechnology, Consumer
electronics, Intelligent systems,
Information and communication
technologies, Biomimetic,
HAFM
Durability, multi-functionality,
flexibility,, recycle and
environmental considerations.
Mechatronics education has
gained international recognition
witnessed by the growing number
of universities offering under and
postgraduate Mechatronics
degree courses due to its role as a
unifying interdisciplinary and
intelligent engineering science
paradigm.
Time line
Fig. 1. The evolution of Mechatronics.
8/20/2019 Lecture 1 MENG 4779 Mechatronics and Digital Systems -- Spring 2016 (1)
3/62
AUC_MENG 4779 Spring 2016
Prof. Dr. Maki K. Habib
AUC_MENG 4779 Spring 2016 Prof. Dr. Maki K. Habib
fuses, permeates (to be diffuse/penetrate through), andcomprehends (understand the nature, perceive) modern
engineering science and technologies.
Mechatronics
regarded as a philosophy that supports
new ways of thinking,
innovations,
design methodologies (synthesis and analysis), and
practices
in the design of new intelligent products and engineeringsystems.
Mechatronics
AUC_MENG 4779 Spring 2016 Prof. Dr. Maki K. Habib
Mechatronics
is a concurrent, and interdisciplinary engineering science
discipline that concentrates on achieving optimum
functional synergy from the earliest conceptual stages of
the design process.
8/20/2019 Lecture 1 MENG 4779 Mechatronics and Digital Systems -- Spring 2016 (1)
4/62
AUC_MENG 4779 Spring 2016
Prof. Dr. Maki K. Habib
AUC_MENG 4779 Spring 2016 Prof. Dr. Maki K. Habib
The main goals of Mechatronics are to
• bring out novel possibilities of synergizing and fusing
different disciplines and to
• develop
products,
processes, and
systems
that exhibit quality performance in terms of
Reliability,
Precision,
Smartness (thinking and decision making capabilities),
Flexibility,
Adaptability, Robustness,
Compactness, and
Economical features.
AUC_MENG 4779 Spring 2016 Prof. Dr. Maki K. Habib
New
professional
skills
Continuous
Self learning
Biotechnology
The General Knowledge Space
Medical imaging &
Instrumentation
Precision
Engineering
MEMs, VLSI,
Microsystems
Seeking knowledge
relevant to new
projects and area
of research
Human Adaptive
/Friendly
Mechatronics
New topics
of interest
New topicsIntelligent Control,
Real-time Systems
Mechatronics
Knowledge Space
Team based
experience through
projects
Fig.2. Mechatronics Knowledge Space paradigm.
Automotive
Engineering
Smart
Structures Computational
Intelligence
Mechatronics’Foundational
and Core knowledge, such as
Mathematics, Physics, Electrical, Electronics,
Electrical machines, Mechanics, System dynamics
and modeling, Control, Sensors and Perception,
Algorithms, Mechatronics design-analysis, Machine
design, Fluid power, Smart materials and MEMs,
Computer network,, Programming and IT,
Microcontrollers, Embedded and real-time systems,
Robotics and Automation,AI, Simulation and
interactive virtual modeling, Manufacturing
processes and production systems, Projects,
Engineering management, Professional
practices, and electives.
Biomimetics
Wireless Sensor
Networks and Ambient
Intelligence
New topicsOther topics of
interest
Other new topics
of interestOther new topics
of interest
High Voltage
Power Systems
Note:
The selection/overlapping of specialized topics
(beyond the foundational and core knowledge),
and their details depend on the interest of each
individual and the professional needs of the
relevant carrier.
8/20/2019 Lecture 1 MENG 4779 Mechatronics and Digital Systems -- Spring 2016 (1)
5/62
AUC_MENG 4779 Spring 2016
Prof. Dr. Maki K. Habib
AUC_MENG 4779 Spring 2016 Prof. Dr. Maki K. Habib
AUC_MENG 4779 Spring 2016 Prof. Dr. Maki K. Habib
8/20/2019 Lecture 1 MENG 4779 Mechatronics and Digital Systems -- Spring 2016 (1)
6/62
AUC_MENG 4779 Spring 2016
Prof. Dr. Maki K. Habib
AUC_MENG 4779 Spring 2016 Prof. Dr. Maki K. Habib
Manufacturing
personnel
Finance and
Sales personnel
Design team
Others personnel
as necessary
Technical and
Production personnel
Explore and analyze relevant existing
systems, and patents. Establish technical
feasibility and list functional requirements.
Understand and define the nature of the
problem/target, and identify the needs. Set
goals and constraints.• Define market segments,
• Ident ify lead users ,
• Ident ify competit ive
products,
Synergetic and interactive
development environment
for Mechatronics design
and development process.
Final design for
production with full
documentation
Project coordinator Schedule, milestones,
resources, constrains, work
assignment, documentation
Brainstorming for new ideas and
solutions development. List
potential solutions, scenarios, logic
flow, priorities.
Short list, assess, shapeup
solutions, and select solution. Set
target functional requirements
and details specifications.
Plan, schedule, roles and
responsibilities, design
details, simulate, test, build
prototype, evaluate, optimize.
Design review, evaluation,
enhancement, life cycle
design factors, and human
factors considerations.
Estimate
manufacturing cost, and
assess production
feasibility
Interaction with environment
and other personnel for
information, discussion,
presentation, etc. and as
necessary
Fig. 3. Synergetic and interactive development environment for Mechatronics design and
development process with its interactive stages.
Stage 1
AUC_MENG 4779 Spring 2016 Prof. Dr. Maki K. Habib
In general Smart Mechatronics Products/processes and systems constitute various
technology
that include
• Wide range of sensors,
• Actuators, and intelligent mechanisms,
• Microcontrollers,
• Decision making (Intelligence)
• Control strategies, artificial perception• Smart materials, Micro- and Nano-technology
• Information and communication technologies,
• etc.
8/20/2019 Lecture 1 MENG 4779 Mechatronics and Digital Systems -- Spring 2016 (1)
7/62
AUC_MENG 4779 Spring 2016
Prof. Dr. Maki K. Habib
AUC_MENG 4779 Spring 2016 Prof. Dr. Maki K. Habib
Examples of Mechatronics applications
There are many Mechatronical applications,
some of them listed as follows,
Robots (all its shapes and purposes),
Automation,
Cars,
Automatic guided vehicles,
Computer controlled machine tools,
Planes and space technology,
Medical equipment,
Cash dispenser,
AUC_MENG 4779 Spring 2016 Prof. Dr. Maki K. Habib
Type-writer,
Fax machine, Computer Disk Drives
Video Camera,
Video recorder,
CD Rom Players,
Walk-man,
Auto-camera,
Cell phone,
Watches,
Microwave,Washing machine,
Sewing machines,
Air-condition,
etc.
8/20/2019 Lecture 1 MENG 4779 Mechatronics and Digital Systems -- Spring 2016 (1)
8/62
AUC_MENG 4779 Spring 2016
Prof. Dr. Maki K. Habib
AUC_MENG 4779 Spring 2016Prof. Dr. Maki K. Habib
Digital Logic Design
Number Systems, Logic Gates and
Design
Maki K. Habib
Mechanical Engineering Department
School of Sciences and EngineeringAmerican University in Cairo
AUC_MENG 4779 Spring 2016 Prof. Dr. Maki K. Habib
In DIGITAL electronics, current & voltage can assume only discrete values(usually two).
e.g. V
In ANALOG systems, current & voltage levels are continuous & may
assume any value.
Real
World
8/20/2019 Lecture 1 MENG 4779 Mechatronics and Digital Systems -- Spring 2016 (1)
9/62
AUC_MENG 4779 Spring 2016
Prof. Dr. Maki K. Habib
AUC_MENG 4779 Spring 2016 Prof. Dr. Maki K. Habib
Digital Electronics
The advantage of digital electronics are,
• Greater accuracy & reliability
• Versatile, cheaper and low-power,
• Comprehensive theory and algorithms
• Availability of CAD tools
• Optimized device processes
Digital circuits used in:
• Digital Computers Data Processing
• Electronic Calculators Instrumentation
• Control Devices etc.
• Communication Equipment• Telephone Networks, Cell Phones,
• CD Players, Medical Equipment,
• Modern TV sets, Modern Radios, etc.
AUC_MENG 4779 Spring 2016 Prof. Dr. Maki K. Habib
Disadvantages of digital electronics
1. Signal precision is limited by the number
of bits used to encode each sample,
2. Analogue-to-digital converters and
digital-to-analogue converters are
required to interface a digital,
3. system with real-world analogue signals
8/20/2019 Lecture 1 MENG 4779 Mechatronics and Digital Systems -- Spring 2016 (1)
10/62
AUC_MENG 4779 Spring 2016
Prof. Dr. Maki K. Habib
AUC_MENG 4779 Spring 2016 Prof. Dr. Maki K. Habib
Most physical phenomena of interest are analogue
• Transducers are simple
• Potentially high precision
Analogue Systems
Disadvantages of analogue systems
Behaviour of analogue components is subject to
drift distortion, noise, offsets, etc.,
Errors in analogue signals accumulate during
processing, transmission, and storage,
Only relatively simple signal processing is
practical for most applications.
AUC_MENG 4779 Spring 2016 Prof. Dr. Maki K. Habib
DigitA digit is a symbol or numeral given to an element of a number
system.
Radix
The radix, or base of a counting system is defined as the number ofunique digits (It is the total number of digits allowed) in a given
number system.
Numbers play an important part in our lives.
Example, for the decimal number system:Radix, r = 10, Digits allowed = 0,1, 2, 3, 4, 5, 6, 7, 8, 9
Number Systems
There are many number systems, such as decimal number
system. Each number constitutes at least one digit.
8/20/2019 Lecture 1 MENG 4779 Mechatronics and Digital Systems -- Spring 2016 (1)
11/62
AUC_MENG 4779 Spring 2016
Prof. Dr. Maki K. Habib
AUC_MENG 4779 Spring 2016Prof. Dr. Maki K. Habib
Number systems and codes
Decimal(base 10)
Octal(base 8)
Binary(base 2)
Hexadecimal
(base16)
Conversion from decimal to binary
Conversion from binary to decimal
AUC_MENG 4779 Spring 2016Prof. Dr. Maki K. Habib
Examples
• Decimal numbers(base 10)
36.210 9810
• Hexadecimal number(base 16)
3F216
• Binary number(base 2)
10112
8/20/2019 Lecture 1 MENG 4779 Mechatronics and Digital Systems -- Spring 2016 (1)
12/62
AUC_MENG 4779 Spring 2016
Prof. Dr. Maki K. Habib
AUC_MENG 4779 Spring 2016Prof. Dr. Maki K. Habib
Positional system
Each digit carries a certain weight based on its
position.
346.17463.71 Position matters
Weight vs Position
AUC_MENG 4779 Spring 2016Prof. Dr. Maki K. Habib
Decimal Positional System
(Base 10 or radix 10)
… 104 103 102 101 100 . 10-1 10-2 …
hundreds positiontens positionones position
tenths position
hundredth position
decimal point
8/20/2019 Lecture 1 MENG 4779 Mechatronics and Digital Systems -- Spring 2016 (1)
13/62
AUC_MENG 4779 Spring 2016
Prof. Dr. Maki K. Habib
AUC_MENG 4779 Spring 2016Prof. Dr. Maki K. Habib
Binary Positional System
(Base 2 or radix 2)
… 24 23 22 21 20 . 2-1 2-2 …
fours position
twos positionones position
halves position
quarters position
binary point
AUC_MENG 4779 Spring 2016Prof. Dr. Maki K. Habib
0.07 0.1 6 40 300
)107()101()106()104()103(17.346 2101210
Decimal Example
Binary Example
10
210123
2
13.25 .25 0 1 0 4 8
21202120212101.1101
Examples
8/20/2019 Lecture 1 MENG 4779 Mechatronics and Digital Systems -- Spring 2016 (1)
14/62
AUC_MENG 4779 Spring 2016
Prof. Dr. Maki K. Habib
AUC_MENG 4779 Spring 2016Prof. Dr. Maki K. Habib
Binary to Decimal Conversion
What is 1101012 in decimal?
10
012345
2
53
1 0 4 0 16 32
212021202121110101
AUC_MENG 4779 Spring 2016 Prof. Dr. Maki K. Habib
n 2n
0 20=1
1 21=1
2 22=4
3 23=8
4 24=16
5 25=32
6 26=64
7 27=128
n 2n
8 28=256
9 29=512
10 210=1024
11 211=2048
12 212=4096
20 220=1M
30 230=1G
8/20/2019 Lecture 1 MENG 4779 Mechatronics and Digital Systems -- Spring 2016 (1)
15/62
AUC_MENG 4779 Spring 2016
Prof. Dr. Maki K. Habib
AUC_MENG 4779 Spring 2016Prof. Dr. Maki K. Habib
Decimal-To-Binary Conversions(method 1)
• The decimal number is simply expressed as a sum of
powers of 2, and then 1s and 0s are written in the
appropriate bit positions.
210
145
10
11001050
212121
21632
183250
210
13468
10
101011010346
2121212121
281664256
101664256
2664256
90256346
AUC_MENG 4779 Spring 2016Prof. Dr. Maki K. Habib
(Method 2)Flowchart for Repeated Division
8/20/2019 Lecture 1 MENG 4779 Mechatronics and Digital Systems -- Spring 2016 (1)
16/62
AUC_MENG 4779 Spring 2016
Prof. Dr. Maki K. Habib
AUC_MENG 4779 Spring 2016Prof. Dr. Maki K. Habib
Example for Repeated Division
Quotient Remainder
50/2 = 25 0 LSB
25/2 = 12 1
12/2 = 6 0
6/2 = 3 0
3/2 = 1 1
1/2 = 0 1 MSB
5010=1100102
AUC_MENG 4779 Spring 2016Prof. Dr. Maki K. Habib
Example for Repeated Division
Quotient Remainder
346/2 173 0
173/2 86 1
86/2 43 0
43/2 21 1
21/2 10 1
10/2 5 0
5/2 2 1
2/2 1 0
1/2 0 1
34610=1010110102
8/20/2019 Lecture 1 MENG 4779 Mechatronics and Digital Systems -- Spring 2016 (1)
17/62
AUC_MENG 4779 Spring 2016
Prof. Dr. Maki K. Habib
AUC_MENG 4779 Spring 2016 Prof. Dr. Maki K. Habib
How many different values can be represented with Nbinary digits? Decimal digits? Octal digits? Radix Z
digits?
• Decimal: 1 digit 0-9 10 different values
2 digits 10X10=100 different values
.. 6 digits 106=1,000,000 different values
• Binary: 1 digit 0,1 2 different values=21
2 digits 00,01,10,11 4 different values=22
n digits 2n
different values• Radix Z digits: n digits Zn different values(0 thru. Zn-1)
Examples
AUC_MENG 4779 Spring 2016Prof. Dr. Maki K. Habib
Octal-to-Decimal Conversion
Octal-to-Decimal Conversion
1020.75
)1
8(6)0
8(4)1
8(286.24
10250
1287643
)08(2)18(7)28(38
372
8/20/2019 Lecture 1 MENG 4779 Mechatronics and Digital Systems -- Spring 2016 (1)
18/62
AUC_MENG 4779 Spring 2016
Prof. Dr. Maki K. Habib
AUC_MENG 4779 Spring 2016Prof. Dr. Maki K. Habib
Decimal-to-Octal Conversion
Convert 26610 to Octal
Quotient Remainder
266/8 = 33 2 LSB
33/8 = 4 1
4/8 = 0 4 MSB
26610=4128
AUC_MENG 4779 Spring 2016Prof. Dr. Maki K. Habib
Octal-to-Binary Conversion
• Convert 4728 to binary
4 7 2
100 111 010
• Convert 54318 to binary
5 4 3 1
101 100 011 001
8/20/2019 Lecture 1 MENG 4779 Mechatronics and Digital Systems -- Spring 2016 (1)
19/62
AUC_MENG 4779 Spring 2016
Prof. Dr. Maki K. Habib
AUC_MENG 4779 Spring 2016Prof. Dr. Maki K. Habib
Binary-to-Octal Conversion
• Convert 1001110102 to octal
• Convert 110101102 to octal
82 7 4
010111001
86 2 3
011010110
AUC_MENG 4779 Spring 2016Prof. Dr. Maki K. Habib
Octal-to-Hex Conversion
• Convert B2F16 to octal
B2F16 =1011 0010 1111 {convert to binary}
=101 100 101 111
{group into three-bit groupings}
= 5 4 5 78 {Convert to octal}
8/20/2019 Lecture 1 MENG 4779 Mechatronics and Digital Systems -- Spring 2016 (1)
20/62
AUC_MENG 4779 Spring 2016
Prof. Dr. Maki K. Habib
AUC_MENG 4779 Spring 2016Prof. Dr. Maki K. Habib
BCD Code
• If each digit of a decimal number is represented by
its binary equivalent, the result is a code called
binary-code-decimal (BCD).
8 7 4 (decimal)
1000 0111 0100 (BCD)
9 4 3 (decimal)
1001 0100 0011 (BCD)
AUC_MENG 4779 Spring 2016Prof. Dr. Maki K. Habib
• Convert 0110100000111001(BCD) to its decimal
equivalent.
• Convert the BCD number 011111000001 to its decimal
equivalent.
Examples
8/20/2019 Lecture 1 MENG 4779 Mechatronics and Digital Systems -- Spring 2016 (1)
21/62
AUC_MENG 4779 Spring 2016
Prof. Dr. Maki K. Habib
AUC_MENG 4779 Spring 2016Prof. Dr. Maki K. Habib
Comparison of BCD and Binary
• A straight binary code takes the complete
decimal number and represents it in binary.
• A BCD code converts each decimal digit to
binary individually.
13710=100010012 (binary)
13710=0001 0011 0111 (BCD)
• BCD uses more bits, easier to convert to andfrom decimal.
AUC_MENG 4779 Spring 2016Prof. Dr. Maki K. Habib
Review Questions
• Represent the decimal value 178 by its straight
binary equivalent. Then encode the same
decimal number using BCD.
• How many bits are required to represent an
eight-digit decimal number in BCD?
• What is an advantage of encoding a decimal
number in BCD as compared with straight
binary? What is a disadvantage?
8/20/2019 Lecture 1 MENG 4779 Mechatronics and Digital Systems -- Spring 2016 (1)
22/62
AUC_MENG 4779 Spring 2016
Prof. Dr. Maki K. Habib
AUC_MENG 4779 Spring 2016Prof. Dr. Maki K. Habib
Putting it ALL together
AUC_MENG 4779 Spring 2016Prof. Dr. Maki K. Habib
The Nibble and Byte
• A string of 4 bits is called a nibble
• A string of 8 bits is called a byte.
• How many bytes are in a 32-bit string?
• What is the largest decimal value that can be
represented in binary using two bytes?
• How many bytes are needed to represent thedecimal value 846,569 in BCD?
8/20/2019 Lecture 1 MENG 4779 Mechatronics and Digital Systems -- Spring 2016 (1)
23/62
AUC_MENG 4779 Spring 2016
Prof. Dr. Maki K. Habib
AUC_MENG 4779 Spring 2016Prof. Dr. Maki K. Habib
Review Questions
• How many bytes are needed to represent 23510in binary?
• What is the largest decimal value that can be
represented in BCD using two bytes?
AUC_MENG 4779 Spring 2016Prof. Dr. Maki K. Habib
Alphanumeric Codes
• Codes representing letters of the alphabet,
punctuation marks, and other special characters as
well as numbers are called alphanumeric codes.
• The most widely used alphanumeric code is the
American Standard Code for Information
Interchange (ASCII).
The ASCII(pronounced “askee”) code is a seven-
bit code.
8/20/2019 Lecture 1 MENG 4779 Mechatronics and Digital Systems -- Spring 2016 (1)
24/62
AUC_MENG 4779 Spring 2016
Prof. Dr. Maki K. Habib
AUC_MENG 4779 Spring 2016Prof. Dr. Maki K. Habib
Logic Gates and Boolean
Algebra
AUC_MENG 4779 Spring 2016Prof. Dr. Maki K. Habib
Boolean Constants and Variables
• Boolean constants and variables are allowed to have only two
possible values, 0 or 1.
• Boolean 0 and 1 do not represent actual numbers but instead
represent the state of a voltage variable, or what is called its
logic level.
• 0/1 and Low/High are used most of the time.
• Three Logic operations: AND, OR, NOT
• Logic Gates – Digital circuits constructed from diodes, transistors, and
resistors whose output is the result of a basic logic
operation(OR, AND, NOT) performed on the inputs.
8/20/2019 Lecture 1 MENG 4779 Mechatronics and Digital Systems -- Spring 2016 (1)
25/62
AUC_MENG 4779 Spring 2016
Prof. Dr. Maki K. Habib
AUC_MENG 4779 Spring 2016Prof. Dr. Maki K. Habib
Truth Tables
• How a logic circuit’s output depends on the logic
levels present at the inputs.
AUC_MENG 4779 Spring 2016 Prof. Dr. Maki K. Habib
Signals, Logic Operators, and Gates
Basic elements of digital logic circuits
8/20/2019 Lecture 1 MENG 4779 Mechatronics and Digital Systems -- Spring 2016 (1)
26/62
8/20/2019 Lecture 1 MENG 4779 Mechatronics and Digital Systems -- Spring 2016 (1)
27/62
AUC_MENG 4779 Spring 2016
Prof. Dr. Maki K. Habib
AUC_MENG 4779 Spring 2016Prof. Dr. Maki K. Habib
Summary of OR operation
• Produce a result of 1 whenever any input is 1.
Otherwise 0,
• An OR gate is a logic circuit that performs an
OR operation on the circuit's input,
• The expression X = A + B is read as
“X equals A OR B”
AUC_MENG 4779 Spring 2016Prof. Dr. Maki K. Habib
Example of the use of an OR gate in an
Alarm system
8/20/2019 Lecture 1 MENG 4779 Mechatronics and Digital Systems -- Spring 2016 (1)
28/62
AUC_MENG 4779 Spring 2016
Prof. Dr. Maki K. Habib
AUC_MENG 4779 Spring 2016Prof. Dr. Maki K. Habib
Example
AUC_MENG 4779 Spring 2016Prof. Dr. Maki K. Habib
Example3
8/20/2019 Lecture 1 MENG 4779 Mechatronics and Digital Systems -- Spring 2016 (1)
29/62
AUC_MENG 4779 Spring 2016
Prof. Dr. Maki K. Habib
AUC_MENG 4779 Spring 2016Prof. Dr. Maki K. Habib
Review Questions
• What is the only set of input conditions that will produce a LOW output for any OR gate?
• Write the Boolean expression for a six-input ORgate
• If the A input in previous example is permanently kept at the 1 level, what will theresultant output waveform be?
AUC_MENG 4779 Spring 2016Prof. Dr. Maki K. Habib
AND Operation with AND Gates
• Truth Table and Gate symbol
8/20/2019 Lecture 1 MENG 4779 Mechatronics and Digital Systems -- Spring 2016 (1)
30/62
AUC_MENG 4779 Spring 2016
Prof. Dr. Maki K. Habib
AUC_MENG 4779 Spring 2016Prof. Dr. Maki K. Habib
Truth Table and Symbol for a three-
input AND gate
AUC_MENG 4779 Spring 2016Prof. Dr. Maki K. Habib
Summary of the AND operation
• The AND operation is performed the same asordinary multiplication of 1s and 0s.
• An AND gate is a logic circuit that performs theAND operation on the circuit’s inputs.
• An AND gate output will be 1 only for the casewhen all inputs are 1; for all other cases theoutput will be 0.
• The expression X = AB is read as
“X equals A AND B.”
8/20/2019 Lecture 1 MENG 4779 Mechatronics and Digital Systems -- Spring 2016 (1)
31/62
AUC_MENG 4779 Spring 2016
Prof. Dr. Maki K. Habib
AUC_MENG 4779 Spring 2016Prof. Dr. Maki K. Habib
Review Questions
• What is the only input combination that will produce a HIGH at the output of a five-inputAND gate?
• What logic level should be applied to the secondinput of a two-input AND gate if the logic signalat the first input is to be inhibited(prevented) fromreaching the output?
• True or false: An AND gate output will alwaysdiffer from an OR gate output for the same input
conditions.
AUC_MENG 4779 Spring 2016Prof. Dr. Maki K. Habib
NOT operation
• Truth table, Symbol, Sample waveform
8/20/2019 Lecture 1 MENG 4779 Mechatronics and Digital Systems -- Spring 2016 (1)
32/62
AUC_MENG 4779 Spring 2016
Prof. Dr. Maki K. Habib
AUC_MENG 4779 Spring 2016Prof. Dr. Maki K. Habib
Summary of Boolean Operations
• OR
0 + 0 = 0 0 + 1 = 1 1 + 0 = 1 1 + 1 = 1
• AND
0 • 0 = 0 0 • 1 = 0 1 • 0 = 0 1 • 1 = 1
• NOT
1’=0 0’=1 (NOTE THE SYMBOL USED FOR NOT!)
AUC_MENG 4779 Spring 2016Prof. Dr. Maki K. Habib
Describing logic circuits algebraically
• Any logic circuit, no matter how complex, can be
completely described using the three basic Boolean
operations: OR, AND, NOT.
• Example: logic circuit with its Boolean expression
8/20/2019 Lecture 1 MENG 4779 Mechatronics and Digital Systems -- Spring 2016 (1)
33/62
AUC_MENG 4779 Spring 2016
Prof. Dr. Maki K. Habib
AUC_MENG 4779 Spring 2016Prof. Dr. Maki K. Habib
Parentheses
(Often needed to establish precedence;
sometimes used optionally for clarity)
• How to interpret AB+C?
– Is it AB ORed with C ?
– Is it A ANDed with B+C ?
• Order of precedence for Boolean algebra: AND before OR.
Parentheses make the expression clearer, but they are not
needed for the case on the preceding slide.
• Note that parentheses are needed here :
AUC_MENG 4779 Spring 2016Prof. Dr. Maki K. Habib
Circuits Contains INVERTERs
• Whenever an INVERTER is present in a logic-circuit
diagram, its output expression is simply equal to the
input expression with a bar over it.
8/20/2019 Lecture 1 MENG 4779 Mechatronics and Digital Systems -- Spring 2016 (1)
34/62
AUC_MENG 4779 Spring 2016
Prof. Dr. Maki K. Habib
AUC_MENG 4779 Spring 2016Prof. Dr. Maki K. Habib
More Examples
AUC_MENG 4779 Spring 2016Prof. Dr. Maki K. Habib
Precedence
• First, perform all inversions of single terms,
• Perform all operations with parentheses,
• Perform an AND operation before an OR,
• operation unless parentheses indicate otherwise,
• If an expression has a bar over it, perform theoperations inside the expression first and then invert
the result
8/20/2019 Lecture 1 MENG 4779 Mechatronics and Digital Systems -- Spring 2016 (1)
35/62
AUC_MENG 4779 Spring 2016
Prof. Dr. Maki K. Habib
AUC_MENG 4779 Spring 2016Prof. Dr. Maki K. Habib
Determining output level from a
diagram
Determine the output for the
condition where all inputs are LOW.
AUC_MENG 4779 Spring 2016Prof. Dr. Maki K. Habib
Implementing Circuits From Boolean
Expressions
• When the operation of a circuit is defined by a
Boolean expression, we can draw a logic-circuit
diagram directly from that expression.
8/20/2019 Lecture 1 MENG 4779 Mechatronics and Digital Systems -- Spring 2016 (1)
36/62
AUC_MENG 4779 Spring 2016
Prof. Dr. Maki K. Habib
AUC_MENG 4779 Spring 2016Prof. Dr. Maki K. Habib
Example
• Draw the circuit diagram to implement the expression
))(( C B B A x
AUC_MENG 4779 Spring 2016Prof. Dr. Maki K. Habib
Review Question
• Draw the circuit diagram that implements the
expression
Using gates having no more than three inputs.
)( D A BC A x
8/20/2019 Lecture 1 MENG 4779 Mechatronics and Digital Systems -- Spring 2016 (1)
37/62
AUC_MENG 4779 Spring 2016
Prof. Dr. Maki K. Habib
AUC_MENG 4779 Spring 2016Prof. Dr. Maki K. Habib
NOR GATES AND NAND GATES
• NOR Symbol, Equivalent Circuit, Truth Table
AUC_MENG 4779 Spring 2016Prof. Dr. Maki K. Habib
Example
8/20/2019 Lecture 1 MENG 4779 Mechatronics and Digital Systems -- Spring 2016 (1)
38/62
AUC_MENG 4779 Spring 2016
Prof. Dr. Maki K. Habib
AUC_MENG 4779 Spring 2016Prof. Dr. Maki K. Habib
Example
• Determine the Boolean expression for a three-input
NOR gate followed by an INVERTER
AUC_MENG 4779 Spring 2016Prof. Dr. Maki K. Habib
NAND Gate
• Symbol, Equivalent circuit, truth table
8/20/2019 Lecture 1 MENG 4779 Mechatronics and Digital Systems -- Spring 2016 (1)
39/62
AUC_MENG 4779 Spring 2016
Prof. Dr. Maki K. Habib
AUC_MENG 4779 Spring 2016Prof. Dr. Maki K. Habib
Example
AUC_MENG 4779 Spring 2016Prof. Dr. Maki K. Habib
Example
• Implement the logic circuit that has the expression
using only NOR and NAND gates
DC AB x
8/20/2019 Lecture 1 MENG 4779 Mechatronics and Digital Systems -- Spring 2016 (1)
40/62
AUC_MENG 4779 Spring 2016
Prof. Dr. Maki K. Habib
AUC_MENG 4779 Spring 2016Prof. Dr. Maki K. Habib
Example
• Determine the output level in last example for
A=B=C=1 and D=0
AUC_MENG 4779 Spring 2016Prof. Dr. Maki K. Habib
Review Questions
• What is the only set of input conditions that will
produce a HIGH output from a three-input NOR
gate?
• Determine the output level in last example for
A=B=1, C=D=0,
• Change the NOR gate at last example to a NANDgate, and change the NAND to a NOR. What is the
new expression for x?
8/20/2019 Lecture 1 MENG 4779 Mechatronics and Digital Systems -- Spring 2016 (1)
41/62
AUC_MENG 4779 Spring 2016
Prof. Dr. Maki K. Habib
AUC_MENG 4779 Spring 2016Prof. Dr. Maki K. Habib
Boolean Theorems (single-variable)
AUC_MENG 4779 Spring 2016Prof. Dr. Maki K. Habib
Multivariable Theorems
x+y = y+x xy = yx commutativity
(x+y) + z = x + (y + z) (xy)z = x(yz) associativity
x(y+z) = xy + xz x + yz = (x+y) (x+z) distributivity
x + xy = x pf: x+xy = x1 + xy = x(1+y) = x1 = x
8/20/2019 Lecture 1 MENG 4779 Mechatronics and Digital Systems -- Spring 2016 (1)
42/62
AUC_MENG 4779 Spring 2016
Prof. Dr. Maki K. Habib
AUC_MENG 4779 Spring 2016Prof. Dr. Maki K. Habib
Examples
• Simplify the expression
• Simplify
• Simplify
D B A D B A y
B A B A z
BCD A ACD x
AUC_MENG 4779 Spring 2016Prof. Dr. Maki K. Habib
Review Questions
• Simplify
• Simplify
• Simplify
C ABC A y
DC B A DC B A y
ABD D A y
8/20/2019 Lecture 1 MENG 4779 Mechatronics and Digital Systems -- Spring 2016 (1)
43/62
AUC_MENG 4779 Spring 2016
Prof. Dr. Maki K. Habib
AUC_MENG 4779 Spring 2016Prof. Dr. Maki K. Habib
Demorgan’s Theorems
y x y x
y x y x
AUC_MENG 4779 Spring 2016Prof. Dr. Maki K. Habib
Example
• Simplify the expression to one having
only single variables inverted.
D BC A z
8/20/2019 Lecture 1 MENG 4779 Mechatronics and Digital Systems -- Spring 2016 (1)
44/62
AUC_MENG 4779 Spring 2016
Prof. Dr. Maki K. Habib
AUC_MENG 4779 Spring 2016Prof. Dr. Maki K. Habib
Implications of DeMorgan’s Theorems(I)
AUC_MENG 4779 Spring 2016Prof. Dr. Maki K. Habib
Implications of DeMorgan’s
Theorems(II)
8/20/2019 Lecture 1 MENG 4779 Mechatronics and Digital Systems -- Spring 2016 (1)
45/62
AUC_MENG 4779 Spring 2016
Prof. Dr. Maki K. Habib
AUC_MENG 4779 Spring 2016Prof. Dr. Maki K. Habib
Example
• Determine the output expression for the below circuit
and simplify it using DeMorgan’s Theorem
AUC_MENG 4779 Spring 2016Prof. Dr. Maki K. Habib
Review Questions
• Using DeMorgan’s Theorems to convert the
expressions to one that has only single-variable
inversions.
• Use only a NOR gate and an INVERTER to
implement a circuit having output expression:
• Use DeMorgan’s theorems to convert below
expression to an expression containg only single-
variable inversions.
C B A z QT S R y C B A z
DC B A y
8/20/2019 Lecture 1 MENG 4779 Mechatronics and Digital Systems -- Spring 2016 (1)
46/62
AUC_MENG 4779 Spring 2016
Prof. Dr. Maki K. Habib
AUC_MENG 4779 Spring 2016Prof. Dr. Maki K. Habib
Universality of NAND and NOR gates
AUC_MENG 4779 Spring 2016Prof. Dr. Maki K. Habib
Universality of NOR gate
8/20/2019 Lecture 1 MENG 4779 Mechatronics and Digital Systems -- Spring 2016 (1)
47/62
AUC_MENG 4779 Spring 2016
Prof. Dr. Maki K. Habib
AUC_MENG 4779 Spring 2016Prof. Dr. Maki K. Habib
Example
AUC_MENG 4779 Spring 2016Prof. Dr. Maki K. Habib
Example
8/20/2019 Lecture 1 MENG 4779 Mechatronics and Digital Systems -- Spring 2016 (1)
48/62
AUC_MENG 4779 Spring 2016
Prof. Dr. Maki K. Habib
AUC_MENG 4779 Spring 2016Prof. Dr. Maki K. Habib
Alternate Logic-Gate Representations
• Standard and alternate symbols for various logic
gates and inverter.
AUC_MENG 4779 Spring 2016Prof. Dr. Maki K. Habib
How to obtain the alternative symbol
from standard ones
• Invert each input and output of the standard symbol,
This is done by adding bubbles(small circles) on
input and output lines that do not have bubbles and by
removing bubbles that are already there.
• Change the operation symbol from AND to OR, or
from OR to AND.(In the special case of theINVERTER, the operation symbol is not changed)
8/20/2019 Lecture 1 MENG 4779 Mechatronics and Digital Systems -- Spring 2016 (1)
49/62
AUC_MENG 4779 Spring 2016
Prof. Dr. Maki K. Habib
AUC_MENG 4779 Spring 2016Prof. Dr. Maki K. Habib
Points of Consideration
• The equivalences can be extended to gates with any numberof inputs.
• None of the standard symbols have bubbles on their inputs,and all the alternate symbols do.
• The standard and alternate symbols for each gate representthe same physical circuit; there is no difference in thecircuits represented by the two symbols.
• NAND and NOR gates are inverting gates, and so both thestandard and the alternate symbols for each will have a bubble on either the input or the output, AND and OR gates
are non-inverting gates, and so the alternate symbols foreach will have bubbles on both inputs and output.
AUC_MENG 4779 Spring 2016Prof. Dr. Maki K. Habib
Logic-symbol interpretation
• Active High/Low
– When an input or output line on a logic circuit
symbol has no bubble on it, that line is said to be
active-High, otherwise it is active-Low.
8/20/2019 Lecture 1 MENG 4779 Mechatronics and Digital Systems -- Spring 2016 (1)
50/62
AUC_MENG 4779 Spring 2016
Prof. Dr. Maki K. Habib
AUC_MENG 4779 Spring 2016Prof. Dr. Maki K. Habib
Interpretation of the two NAND gate
symbols
AUC_MENG 4779 Spring 2016Prof. Dr. Maki K. Habib
Interpretation of the two OR gate
symbols
8/20/2019 Lecture 1 MENG 4779 Mechatronics and Digital Systems -- Spring 2016 (1)
51/62
AUC_MENG 4779 Spring 2016
Prof. Dr. Maki K. Habib
AUC_MENG 4779 Spring 2016Prof. Dr. Maki K. Habib
Review Questions
• Write the interpretation of the operation performed by
the below gate symbols,
– Standard NOR gate symbol
– Alternate NOR gate symbol
– Alternate AND gate symbol
– Standard AND gate symbol
AUC_MENG 4779 Spring 2016 Prof. Dr. Maki K. Habib
XOR Gate
The XOR gate is an e xclusive OR gate.
It will output a logic 1 if there is an exclusive logic 1 at input A or B.Exclusive means: Only one input can be high at one time.
Input AOutput X
Input B
XOR
BAX
The Boolean Equationfor XOR :
A B X
0 0 0
0 1 1
1 0 1
1 1 0
8/20/2019 Lecture 1 MENG 4779 Mechatronics and Digital Systems -- Spring 2016 (1)
52/62
AUC_MENG 4779 Spring 2016
Prof. Dr. Maki K. Habib
AUC_MENG 4779 Spring 2016 Prof. Dr. Maki K. Habib
The XNOR gate is an e xclusive OR gate with an NOT gate at the output. Itwill output a logic 0 if there is an exclusive logic 1 at input A or B.
A B X
0 0 1
0 1 0
1 0 0
1 1 1
Input AOutput X
Input B
XNOR
BAX
The Boolean Equation
for XNOR :
XNOR
AUC_MENG 4779 Spring 2016 Prof. Dr. Maki K. Habib
Truth Tables
• Another way (in addition to logic equations) to define certain
functionality
• Problem: their sizes grow exponentially with number of
inputs.
11111
01011
01101
01001
01110
01010
01100
00000
y2y1x3x2x1
inputs outputs
What are logic equations
corresponding to this table?
Design corresponding circuit.
y1 = x1 + x2 + x3
y2 = x1 * x2 * x3
8/20/2019 Lecture 1 MENG 4779 Mechatronics and Digital Systems -- Spring 2016 (1)
53/62
AUC_MENG 4779 Spring 2016
Prof. Dr. Maki K. Habib
AUC_MENG 4779 Spring 2016 Prof. Dr. Maki K. Habib
Input Minterms Maxterms
A B C Terms Designation Terms Designation
0 0 0 P0 S0
0 0 1 P1 S1
0 1 0 P2 S2
0 1 1 P3 S3
1 0 0 P4 S4
1 0 1 P5 S5
1 1 0 P6 S6
1 1 1 P7 S7
Minterms and Maxterms for Three Binary Variables
What is the signif icance of Minterms and Maxterms?In short, minterms and maxterms may be used to define the two standard forms for logic
expressions, namely the sum of p roducts (SOP), or sum of minterms, and the product of
sums (POS), or product of maxterms. These standard forms of expression aid the logic
circuit designer by simplifying the derivation of the function to be implemented.
3
AUC_MENG 4779 Spring 2016 Prof. Dr. Maki K. Habib
Row Input Output
Number A B C X
0 0 0 0 0
1 0 0 1 0
2 0 1 0 0
3 0 1 1 1
4 1 0 0 05 1 0 1 1
6 1 1 0 1
7 1 1 1 0
Example
2 X = P3 + P5 + P6
1
SOP
1
2X = S0S1S2S4S7
3
POS
8/20/2019 Lecture 1 MENG 4779 Mechatronics and Digital Systems -- Spring 2016 (1)
54/62
AUC_MENG 4779 Spring 2016
Prof. Dr. Maki K. Habib
AUC_MENG 4779 Spring 2016 Prof. Dr. Maki K. Habib
Logic Equations in Sum of Products Form
• Systematic way to obtain logic equations from a given truth table.
01111
00011
10101
10001
01110
10010
11100
11000
y2y1x3x2x1
inputs outputs
• A product term is included for
each row where yi has value 1
• A product term includes all input
variables.
• At the end, all product terms are
ORed
+ x1*x2*x3y1 = x1*x2*x3 + x1*x2*x3+ x1*x2*x3
+ x1*x2*x3y2 = x1*x2*x3 + x1*x2*x3 + x1*x2*x3+ x1*x2*x3
AUC_MENG 4779 Spring 2016 Prof. Dr. Maki K. Habib
Minimization Applying Boolean Laws
+ x1*x2*x3y1 = x1*x2*x3 + x1*x2*x3+ x1*x2*x3
• Consider one of previous logic equations:
= x1*x2*(x3 + x3) + x2*x3*(x1 + x1)
= x1*x2 + x2*x3
But if we start grouping in some other way we may not
end up with the minimal equation.
8/20/2019 Lecture 1 MENG 4779 Mechatronics and Digital Systems -- Spring 2016 (1)
55/62
AUC_MENG 4779 Spring 2016
Prof. Dr. Maki K. Habib
AUC_MENG 4779 Spring 2016 Prof. Dr. Maki K. Habib
1. Boolean functions expressed as a sum
of products (SOP) or a product
of sums (POS) are said to be incanonical form.
1. Note the POS is not the complement
of the SOP expression.
Note:
AUC_MENG 4779 Spring 2016 Prof. Dr. Maki K. Habib
Minimization Using Karnough Maps (1/5)
Provides more formal way to minimization
1. A Karnaugh Map is a grid-like representation of a truth table.
2. It is just another way of presenting a truth table, but the mode of
presentation gives more insight.
3. A Karnaugh map has zero and one entries at different positions. Each
position in a grid corresponds to a truth table entry.
A B C V
0 0 0 0
0 0 1 0
0 1 0 0
0 1 1 1
1 0 0 0
1 0 1 1
1 1 0 1
1 1 1 1
In the case of the Karnaugh Map the
advantage is that the Karnaugh Map is
designed to present the information in
a way that allows easy grouping of
terms that can be combined.
The
Truth Table
8/20/2019 Lecture 1 MENG 4779 Mechatronics and Digital Systems -- Spring 2016 (1)
56/62
AUC_MENG 4779 Spring 2016
Prof. Dr. Maki K. Habib
AUC_MENG 4779 Spring 2016 Prof. Dr. Maki K. Habib
It includes 3 steps
1. Form Karnough maps from the given truth table.
There is one Karnough map for each output variable.
2. Group all 1s into as few groups as possible with groups as large as
possible.
3. Each group makes one term of a minimal logic equation for the
given output variable.
Forming Karnough maps• The key idea in the forming the map is that
horizontally and vertically adjacent squares correspond to input
variables that differ in one variable only.Thus, a value for the first column (or row) can be arbitrary, but
labeling of adjacent columns (or rows) should be such that those
values differ in the value of only one variable.
Minimization Using Karnough Maps (2/5)
AUC_MENG 4779 Spring 2016Prof. Dr. Maki K. Habib
Minimization Using Karnough Maps (3/5)
Grouping ( This step is critical)When two adjacent squares contain 1s,
They indicate the possibility of an algebraic simplification and they may be
combined in one group of two.
Similarly, two adjacent pairs of 1s may be combined to form a group of four,
Then, two adjacent groups of four can be combined to form a group of eight,
and so on.
In general, the number of squares in any valid group must be equal to 2k.
Note that one 1 can be a member of more than one group and keep in mind
that you should end up with as few as possible groups which are as
large as possible.
The product term that corresponds to a given group is the product of
variables whose values are constant in the group.
If the value of input variable xi is 0 for the group, then xi is entered in the
product, while if xi has value 1 for the group, then xi is entered in the product.
Finding Product Terms
8/20/2019 Lecture 1 MENG 4779 Mechatronics and Digital Systems -- Spring 2016 (1)
57/62
AUC_MENG 4779 Spring 2016
Prof. Dr. Maki K. Habib
AUC_MENG 4779 Spring 2016 Prof. Dr. Maki K. Habib
+ x2*x3y = x1*x2
Minimization Using Karnough Maps (4/5)
0111
0001
00 01 11 10
0
1
x1 x2
x3
1
0
0
0
1
0
1
1
111
011
101
001
110
010
100
000
yx3x2x1
Example 1: Given truth table, find minimal circuit
AUC_MENG 4779 Spring 2016 Prof. Dr. Maki K. Habib
Minimization Using Karnough Maps (5/5)
Example 2:
y = x1*x3 + x2
0000
0110
0011
0001
00 01 11 10
00
01
11
10
x1x2
x3x4
1100
1001
00101100
00 01 11 10
00
01
11
10
x1x2
x3x4
Example 3:
Example 4:y = x1*x2*x3 + x1*x2*x4 + x2*x3*x4
y = x1*x4 + x2*x3*x4 + x1*x2*x3*x4
x1 x2
1001
1011
00 01 11 10
0
1
x3
8/20/2019 Lecture 1 MENG 4779 Mechatronics and Digital Systems -- Spring 2016 (1)
58/62
AUC_MENG 4779 Spring 2016
Prof. Dr. Maki K. Habib
AUC_MENG 4779 Spring 2016 Prof. Dr. Maki K. Habib
Gates as Control Elements
An AND gate and a tristate buffer act as controlled switches
or valves.
AUC_MENG 4779 Spring 2016 Prof. Dr. Maki K. Habib
Wired OR and Bus Connections
Wired OR allows tying together of several
controlled signals.
8/20/2019 Lecture 1 MENG 4779 Mechatronics and Digital Systems -- Spring 2016 (1)
59/62
AUC_MENG 4779 Spring 2016
Prof. Dr. Maki K. Habib
AUC_MENG 4779 Spring 2016 Prof. Dr. Maki K. Habib
Decoders/ Demultiplexers
A decoder allows the selection of one of 2 a options usingan a- bit address as input. A demultiplexer (demux) is a decoder that
only selects an output if its enable signal is asserted.
AUC_MENG 4779 Spring 2016Prof. Dr. Maki K. Habib
1 to 4 Line Demux
A 74155 can also be used as demultiplexer. It can function like a rotary
switch to demultiplex a single input to four different output lines.
8/20/2019 Lecture 1 MENG 4779 Mechatronics and Digital Systems -- Spring 2016 (1)
60/62
AUC_MENG 4779 Spring 2016
Prof. Dr. Maki K. Habib
AUC_MENG 4779 Spring 2016 Prof. Dr. Maki K. Habib
Encoders
A 2a -to- a encoder outputs an a-bit binary number
equal to the index of the single 1 among its 2a inputs.
AUC_MENG 4779 Spring 2016 Prof. Dr. Maki K. Habib
Multiplexers
Multiplexer (mux), or selector, allows one of several inputs to be selected and
routed to output depending on the binary value of a set of selection or address
signals provided to it.
8/20/2019 Lecture 1 MENG 4779 Mechatronics and Digital Systems -- Spring 2016 (1)
61/62
AUC_MENG 4779 Spring 2016
Prof. Dr. Maki K. Habib
AUC_MENG 4779 Spring 2016Prof. Dr. Maki K. Habib
Half-adder (HA): Truth table and block d iagram
Full-adder (FA): Truth table and block d iagram
x y c c 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
Inputs Outputs
cout cin
outin x y
s
FA
x y c s
----------------
0 0 0 00 1 0 1
1 0 0 1
1 1 1 0
Inputs Outputs
HA
x y
c
s
Design Example
AUC_MENG 4779 Spring 2016Prof. Dr. Maki K. Habib
Half-Adder Implementations
Three implementations of a half-adder.
c
s
(b) NOR-gate half-adder.
x
y
x
y
(c) NAND-gate half-adder with complemented carry.
x
y
c
s
s
x
y
x
y
(a) AND/XOR half-adder.
_
_
_c
8/20/2019 Lecture 1 MENG 4779 Mechatronics and Digital Systems -- Spring 2016 (1)
62/62
AUC_MENG 4779 Spring 2016
AUC_MENG 4779 Spring 2016Prof. Dr. Maki K. Habib
Full-Adder Implementations
HA
HA
xy
cin
cout
(a) Built of half-adders.
s
(b) Built as an AND-OR circuit.
(c) Suitable for CMOS realization.
cout
s
cin
xy
0
1
23
0
1
2
3
xy
cin
cout
s
0
1
Mux
Possible designs for a fu ll-adder in
terms of half-adders, logic gates, and
Multiplexers