Вы находитесь на странице: 1из 62

AUC_MENG 4779 Spring 2016

Mechatronics
and
Digital Systems
Maki K. Habib
Mechanical Engineering Department
School of Sciences and Engineering
The American University in Cairo
maki@ieee.org

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, Seibu
Electric 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.
AUC_MENG 4779 Spring 2016

Prof. Dr. Maki K. Habib

Prof. Dr. Maki K. Habib

AUC_MENG 4779 Spring 2016

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.
Prof. Dr. Maki K. Habib

AUC_MENG 4779 Spring 2016

The birth of
Mechatronics

rd
inte

p
isci

lin

ne
ipli
isc
g, d
nin
r
a
e
n, l
t io
ova
Mechatronics as
inn
,
n
engineering
t io
uca
d
e
,
science discipline
ary

Nanotechnology, Processor
speeds, High memory capacity
biotechnology, Consumer
electronics, Intelligent systems,
Information and communication
,
technologies, Biomimetic,
gy
o
l
Rapid prototyping, Optoo
n
HAFM
h
electronics, Embedded
Tec
Mechatronics as
systems, Micro-technology
Durability, multi-functionality,
engineering and
and MEMs, Human
flexibility,, recycle and
quality of technology
environmental considerations.
computer interaction,
Mechatronics education has
Electronic and Advanced
Mechatronics
gained international recognition
Numerically controlled manufacturing, Knowledge
witnessed by the growing number
systems, Semiconductor based systems, Automation,
as technology
of universities offering under and
technology boom,
Informatics and networking
and practices
postgraduate Mechatronics
Automotive industry,
degree courses due to its role as a
(team based)
unifying interdisciplinary and
Consumer electronics
Uniqueness of Mechatronics as a

llig
nte
s, i
ice
t
c
pr a

Servo technology,
Microprocessors

System Engineering

The increase in variety and


complexity of product design,
and the wide range of growing
industries initiated the demand
Technology developed
for engineers with
individually and independently.
Mechatronics thinking
Interactions between software,
knowledge and actions.
mechanical and electronics
elements.

1969

AUC_MENG 4779 Spring 2016

Prof. Dr. Maki K. Habib

e,
e nc

Mechatronics as
interdisciplinary
education and
research identity

significant design trend. Interactive


design process with consideration
on: innovation, human factors, life
cycle factors, quality, reliability,
functionality, smartness, portability,
compactness, low cost, etc.
Mechatronics has gained attention
and its importance was widely
recognized

1980

1990
2000
Fig. 1. The evolution of Mechatronics.

intelligent engineering science


paradigm.

Time line
2010

Prof. Dr. Maki K. Habib

AUC_MENG 4779 Spring 2016

Mechatronics
fuses, permeates (to be diffuse/penetrate through), and
comprehends (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 engineering
systems.

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.

AUC_MENG 4779 Spring 2016

Prof. Dr. Maki K. Habib

Prof. Dr. Maki K. Habib

AUC_MENG 4779 Spring 2016

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.
Prof. Dr. Maki K. Habib

AUC_MENG 4779 Spring 2016

The General Knowledge Space

Other topics of
interest

New topics
New topics
of interest

Biotechnology

Mechatronics
Knowledge Space

High Voltage
MEMs, VLSI,
Other new topics Power Systems
Microsystems Medical imaging &
of interest
Instrumentation
Smart
Mechatronics Foundational
Structures
and Core knowledge, such as
Computational
Mathematics, Physics, Electrical, Electronics,
Intelligence
Automotive
Electrical machines, Mechanics, System dynamics
Engineering
Precision
Engineering

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.

Intelligent Control,
Real-time Systems

Biomimetics

Seeking knowledge
relevant to new
projects and area
of research

Team based
experience through
projects

Wireless Sensor
Human Adaptive Networks and Ambient
/Friendly
Intelligence
Mechatronics

Continuous
Self learning
Prof. Dr. Maki K. Habib
AUC_MENG 4779 Spring 2016Fig.2. Mechatronics
Knowledge Space paradigm.

Prof. Dr. Maki K. Habib

Other new topics


of interest

New topics

New
professional
skills
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.

AUC_MENG 4779 Spring 2016

AUC_MENG 4779 Spring 2016

Prof. Dr. Maki K. Habib

AUC_MENG 4779 Spring 2016

Prof. Dr. Maki K. Habib

Prof. Dr. Maki K. Habib

AUC_MENG 4779 Spring 2016

Final design for


production with full
documentation

Synergetic and interactive


development environment
for Mechatronics design
and development process.

Project coordinator
Schedule, milestones,
resources, constrains, work
assignment, documentation

Finance and
Sales personnel

Others personnel
as necessary

Estimate
manufacturing cost, and
assess production
feasibility
Design review, evaluation,
enhancement, life cycle
design factors, and human
factors considerations.
Plan, schedule, roles and
responsibilities, design
details, simulate, test, build
prototype, evaluate, optimize.
Short list, assess, shapeup
solutions, and select solution. Set
target functional requirements
and details specifications.
Brainstorming for new ideas and
solutions development. List
potential solutions, scenarios, logic
flow, priorities.

Design team

Technical and
Production personnel

Manufacturing
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.

Interaction with environment


Stage 1
and other personnel for
Define market segments,
information, discussion,
Identify lead users,
presentation, etc. and as
Identify competitive
necessary
products,
Fig. 3. Synergetic and interactive development environment for Mechatronics design and
Prof.
Dr.
Maki
K.
Habib
AUC_MENG 4779 Spring 2016
development process with its interactive stages.

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.

AUC_MENG 4779 Spring 2016

Prof. Dr. Maki K. Habib

Prof. Dr. Maki K. Habib

AUC_MENG 4779 Spring 2016

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.
AUC_MENG 4779 Spring 2016

Prof. Dr. Maki K. Habib

Prof. Dr. Maki K. Habib

AUC_MENG 4779 Spring 2016

Digital Logic Design


Number Systems, Logic Gates and
Design
Maki K. Habib
Mechanical Engineering Department
School of Sciences and Engineering
American University in Cairo
maki@ieee.org
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

AUC_MENG 4779 Spring 2016

Prof. Dr. Maki K. Habib

Prof. Dr. Maki K. Habib

AUC_MENG 4779 Spring 2016

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

AUC_MENG 4779 Spring 2016

Prof. Dr. Maki K. Habib

Prof. Dr. Maki K. Habib

AUC_MENG 4779 Spring 2016

Analogue Systems
Most physical phenomena of interest are analogue
Transducers are simple
Potentially high precision

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

Number Systems
Numbers play an important part in our lives.
There are many number systems, such as decimal number
system. Each number constitutes at least one digit.

Digit
A 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 of
unique digits (It is the total number of digits allowed) in a given
number system.

Example, for the decimal number system:


Radix, r = 10, Digits allowed = 0,1, 2, 3, 4, 5, 6, 7, 8, 9
AUC_MENG 4779 Spring 2016

Prof. Dr. Maki K. Habib

Prof. Dr. Maki K. Habib

10

AUC_MENG 4779 Spring 2016

Conversion from decimal to binary

Octal(base 8)
Decimal(base 10)

Binary(base 2)

Conversion from binary to decimal

Hexadecimal
(base16)

Number systems and codes


AUC_MENG 4779 Spring 2016

Prof. Dr. Maki K. Habib

Examples

Decimal numbers(base 10)


36.210

9810

Hexadecimal number(base 16)


3F216

Binary number(base 2)
10112

AUC_MENG 4779 Spring 2016

Prof. Dr. Maki K. Habib

Prof. Dr. Maki K. Habib

11

AUC_MENG 4779 Spring 2016

Positional system
Each digit carries a certain weight based on its
position.
346.17463.71 Position matters
Weight vs Position

AUC_MENG 4779 Spring 2016

Prof. Dr. Maki K. Habib

Decimal Positional System


(Base 10 or radix 10)
decimal point

104 103 102 101 100 .

10-1 10-2

tenths position
ones position
tens position
hundredth position
hundreds position

AUC_MENG 4779 Spring 2016

Prof. Dr. Maki K. Habib

Prof. Dr. Maki K. Habib

12

AUC_MENG 4779 Spring 2016

Binary Positional System


(Base 2 or radix 2)
binary point

24

23

22

21

20

2-1 2-2

halves position
ones position
twos position
quarters position
fours position

AUC_MENG 4779 Spring 2016

Prof. Dr. Maki K. Habib

Examples
Decimal Example
346.1710 (3 10 2 ) (4 101 ) (6 100 ) (110 1 ) (7 10 2 )
300

40

0.1

0.07

Binary Example

1101.012 1 23 1 2 2 0 21 1 20 0 2 1 1 2 2
8 4
13.2510

AUC_MENG 4779 Spring 2016

Prof. Dr. Maki K. Habib

.25

Prof. Dr. Maki K. Habib

13

AUC_MENG 4779 Spring 2016

Binary to Decimal Conversion


What is 1101012 in decimal?
1101012 1 25 1 2 4 0 23 1 2 2 0 21 1 20
32 16

5310

AUC_MENG 4779 Spring 2016

n
0
1

2n
20=1
21=1

n
8
9

2n
28=256
29=512

22=4

23=8

10

210=1024

24=16

11

211=2048

25=32

12

212=4096

26=64

20

220=1M

27=128

30

230=1G

AUC_MENG 4779 Spring 2016

Prof. Dr. Maki K. Habib

Prof. Dr. Maki K. Habib

Prof. Dr. Maki K. Habib

14

AUC_MENG 4779 Spring 2016

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.
34610 256 90

5010 32 18
32 16 2
1 25 1 2 4 1 21
5010 110010 2

AUC_MENG 4779 Spring 2016

256 64 26
256 64 16 10
256 64 16 8 2
1 28 1 26 1 2 4 1 23 1 21
34610 101011010 2

Prof. Dr. Maki K. Habib

(Method 2)Flowchart for Repeated Division

AUC_MENG 4779 Spring 2016

Prof. Dr. Maki K. Habib

Prof. Dr. Maki K. Habib

15

AUC_MENG 4779 Spring 2016

Example for Repeated Division


Quotient

Remainder

50/2 =

25

25/2 =

12

12/2 =

6/2 =

3/2 =

1/2

LSB

MSB

5010=1100102
AUC_MENG 4779 Spring 2016

Prof. Dr. Maki K. Habib

Example for Repeated Division


Quotient

Remainder

346/2

173

173/2

86

86/2

43

43/2

21

21/2

10

10/2

5/2

2/2

1/2

34610=1010110102
AUC_MENG 4779 Spring 2016

Prof. Dr. Maki K. Habib

Prof. Dr. Maki K. Habib

16

AUC_MENG 4779 Spring 2016

Examples
How many different values can be represented with N
binary digits? Decimal digits? Octal digits? Radix Z
digits?
Decimal:

1 digit

..
Binary:

0-9

10 different values

2 digits

10X10=100 different values

6 digits

106=1,000,000 different values

1 digit
2 digits

0,1
00,01,10,11

4 different values=22
2n different values

n digits

Zn different values(0 thru. Zn-1)

Radix Z digits: n digits

AUC_MENG 4779 Spring 2016

2 different values=21

Prof. Dr. Maki K. Habib

Octal-to-Decimal Conversion
Octal-to-Decimal Conversion
372 3 (82 ) 7 (81) 2 (80 )
8
3 64 7 8 2 1
250
10
24.6 2 (81) 4 (80 ) 6 (8 1)
8
20.75
10
AUC_MENG 4779 Spring 2016

Prof. Dr. Maki K. Habib

Prof. Dr. Maki K. Habib

17

AUC_MENG 4779 Spring 2016

Decimal-to-Octal Conversion
Convert 26610 to Octal
Quotient

Remainder

266/8 =

33

33/8 =

4/8

LSB

MSB

26610=4128

AUC_MENG 4779 Spring 2016

Prof. 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


AUC_MENG 4779 Spring 2016

Prof. Dr. Maki K. Habib

Prof. Dr. Maki K. Habib

18

AUC_MENG 4779 Spring 2016

Binary-to-Octal Conversion
Convert 1001110102 to octal
1 0 0 1 1 1 0 1 0

28

Convert 110101102 to octal


0 1 1 0 1 0 1 1 0

AUC_MENG 4779 Spring 2016

68

Prof. 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
AUC_MENG 4779 Spring 2016

Prof. Dr. Maki K. Habib

78

{Convert to octal}

Prof. Dr. Maki K. Habib

19

AUC_MENG 4779 Spring 2016

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

1000 0111 0100

(decimal)
(BCD)

3 (decimal)

1001 0100 0011 (BCD)


AUC_MENG 4779 Spring 2016

Prof. Dr. Maki K. Habib

Examples
Convert 0110100000111001(BCD) to its decimal
equivalent.
Convert the BCD number 011111000001 to its decimal
equivalent.

AUC_MENG 4779 Spring 2016

Prof. Dr. Maki K. Habib

Prof. Dr. Maki K. Habib

20

AUC_MENG 4779 Spring 2016

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.
(binary)
13710=100010012
13710=0001 0011 0111 (BCD)
BCD uses more bits, easier to convert to and
from decimal.
AUC_MENG 4779 Spring 2016

Prof. 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?

AUC_MENG 4779 Spring 2016

Prof. Dr. Maki K. Habib

Prof. Dr. Maki K. Habib

21

AUC_MENG 4779 Spring 2016

Putting it ALL together

AUC_MENG 4779 Spring 2016

Prof. 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 the
decimal value 846,569 in BCD?

AUC_MENG 4779 Spring 2016

Prof. Dr. Maki K. Habib

Prof. Dr. Maki K. Habib

22

AUC_MENG 4779 Spring 2016

Review Questions
How many bytes are needed to represent 23510
in binary?
What is the largest decimal value that can be
represented in BCD using two bytes?

AUC_MENG 4779 Spring 2016

Prof. 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 sevenbit code.

AUC_MENG 4779 Spring 2016

Prof. Dr. Maki K. Habib

Prof. Dr. Maki K. Habib

23

AUC_MENG 4779 Spring 2016

Logic Gates and Boolean


Algebra

AUC_MENG 4779 Spring 2016

Prof. 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.
AUC_MENG 4779 Spring 2016

Prof. Dr. Maki K. Habib

Prof. Dr. Maki K. Habib

24

AUC_MENG 4779 Spring 2016

Truth Tables
How a logic circuits 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


AUC_MENG 4779 Spring 2016

Prof. Dr. Maki K. Habib

Prof. Dr. Maki K. Habib

25

AUC_MENG 4779 Spring 2016

OR Operation with OR gates


Truth Table and circuit symbol

AUC_MENG 4779 Spring 2016

Prof. Dr. Maki K. Habib

Symbol and truth table for a three-input


OR gate

AUC_MENG 4779 Spring 2016

Prof. Dr. Maki K. Habib

Prof. Dr. Maki K. Habib

26

AUC_MENG 4779 Spring 2016

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 2016

Prof. Dr. Maki K. Habib

Example of the use of an OR gate in an


Alarm system

AUC_MENG 4779 Spring 2016

Prof. Dr. Maki K. Habib

Prof. Dr. Maki K. Habib

27

AUC_MENG 4779 Spring 2016

Example

AUC_MENG 4779 Spring 2016

Prof. Dr. Maki K. Habib

Example3

AUC_MENG 4779 Spring 2016

Prof. Dr. Maki K. Habib

Prof. Dr. Maki K. Habib

28

AUC_MENG 4779 Spring 2016

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 OR
gate
If the A input in previous example is
permanently kept at the 1 level, what will the
resultant output waveform be?

AUC_MENG 4779 Spring 2016

Prof. Dr. Maki K. Habib

AND Operation with AND Gates


Truth Table and Gate symbol

AUC_MENG 4779 Spring 2016

Prof. Dr. Maki K. Habib

Prof. Dr. Maki K. Habib

29

AUC_MENG 4779 Spring 2016

Truth Table and Symbol for a threeinput AND gate

AUC_MENG 4779 Spring 2016

Prof. Dr. Maki K. Habib

Summary of the AND operation


The AND operation is performed the same as
ordinary multiplication of 1s and 0s.
An AND gate is a logic circuit that performs the
AND operation on the circuits inputs.
An AND gate output will be 1 only for the case
when all inputs are 1; for all other cases the
output will be 0.
The expression X = AB is read as
X equals A AND B.
AUC_MENG 4779 Spring 2016

Prof. Dr. Maki K. Habib

Prof. Dr. Maki K. Habib

30

AUC_MENG 4779 Spring 2016

Review Questions
What is the only input combination that will
produce a HIGH at the output of a five-input
AND gate?
What logic level should be applied to the second
input of a two-input AND gate if the logic signal
at the first input is to be inhibited(prevented) from
reaching the output?
True or false: An AND gate output will always
differ from an OR gate output for the same input
conditions.

AUC_MENG 4779 Spring 2016

Prof. Dr. Maki K. Habib

NOT operation
Truth table, Symbol, Sample waveform

AUC_MENG 4779 Spring 2016

Prof. Dr. Maki K. Habib

Prof. Dr. Maki K. Habib

31

AUC_MENG 4779 Spring 2016

Summary of Boolean Operations


OR
0+0=0

0+1=1

1+0=1

1+1=1

01=0

10=0

11=1

AND
00=0

NOT
1=0
0=1 (NOTE THE SYMBOL USED FOR
NOT!)
AUC_MENG 4779 Spring 2016

Prof. 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

AUC_MENG 4779 Spring 2016

Prof. Dr. Maki K. Habib

Prof. Dr. Maki K. Habib

32

AUC_MENG 4779 Spring 2016

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 2016

Prof. 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.

AUC_MENG 4779 Spring 2016

Prof. Dr. Maki K. Habib

Prof. Dr. Maki K. Habib

33

AUC_MENG 4779 Spring 2016

More Examples

AUC_MENG 4779 Spring 2016

Prof. 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 the
operations inside the expression first and then invert
the result

AUC_MENG 4779 Spring 2016

Prof. Dr. Maki K. Habib

Prof. Dr. Maki K. Habib

34

AUC_MENG 4779 Spring 2016

Determining output level from a


diagram
Determine the output for the
condition where all inputs are LOW.

AUC_MENG 4779 Spring 2016

Prof. 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.

AUC_MENG 4779 Spring 2016

Prof. Dr. Maki K. Habib

Prof. Dr. Maki K. Habib

35

AUC_MENG 4779 Spring 2016

Example
Draw the circuit diagram to implement the expression
x ( A B )( B C )

AUC_MENG 4779 Spring 2016

Prof. Dr. Maki K. Habib

Review Question
Draw the circuit diagram that implements the
expression

x ABC ( A D)
Using gates having no more than three inputs.

AUC_MENG 4779 Spring 2016

Prof. Dr. Maki K. Habib

Prof. Dr. Maki K. Habib

36

AUC_MENG 4779 Spring 2016

NOR GATES AND NAND GATES


NOR Symbol, Equivalent Circuit, Truth Table

AUC_MENG 4779 Spring 2016

Prof. Dr. Maki K. Habib

Example

AUC_MENG 4779 Spring 2016

Prof. Dr. Maki K. Habib

Prof. Dr. Maki K. Habib

37

AUC_MENG 4779 Spring 2016

Example
Determine the Boolean expression for a three-input
NOR gate followed by an INVERTER

AUC_MENG 4779 Spring 2016

Prof. Dr. Maki K. Habib

NAND Gate
Symbol, Equivalent circuit, truth table

AUC_MENG 4779 Spring 2016

Prof. Dr. Maki K. Habib

Prof. Dr. Maki K. Habib

38

AUC_MENG 4779 Spring 2016

Example

AUC_MENG 4779 Spring 2016

Prof. Dr. Maki K. Habib

Example
Implement the logic circuit that has the expression

x AB C D

using only NOR and NAND gates

AUC_MENG 4779 Spring 2016

Prof. Dr. Maki K. Habib

Prof. Dr. Maki K. Habib

39

AUC_MENG 4779 Spring 2016

Example
Determine the output level in last example for
A=B=C=1 and D=0

AUC_MENG 4779 Spring 2016

Prof. 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 NAND
gate, and change the NAND to a NOR. What is the
new expression for x?
AUC_MENG 4779 Spring 2016

Prof. Dr. Maki K. Habib

Prof. Dr. Maki K. Habib

40

AUC_MENG 4779 Spring 2016

Boolean Theorems (single-variable)

AUC_MENG 4779 Spring 2016

Prof. 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:

AUC_MENG 4779 Spring 2016

Prof. Dr. Maki K. Habib

x+xy = x1 + xy = x(1+y) = x1 = x

Prof. Dr. Maki K. Habib

41

AUC_MENG 4779 Spring 2016

Examples
Simplify the expression
Simplify z A B A B
Simplify x ACD ABCD

AUC_MENG 4779 Spring 2016

y ABD AB D

Prof. Dr. Maki K. Habib

Review Questions
Simplify
Simplify
Simplify

AUC_MENG 4779 Spring 2016

Prof. Dr. Maki K. Habib

y AC ABC
y A BC D ABC D

y AD ABD

Prof. Dr. Maki K. Habib

42

AUC_MENG 4779 Spring 2016

Demorgans Theorems

x y x y
x y x y

AUC_MENG 4779 Spring 2016

Prof. Dr. Maki K. Habib

Example
Simplify the expression z A C B D to one having
only single variables inverted.

AUC_MENG 4779 Spring 2016

Prof. Dr. Maki K. Habib

Prof. Dr. Maki K. Habib

43

AUC_MENG 4779 Spring 2016

Implications of DeMorgans Theorems(I)

AUC_MENG 4779 Spring 2016

Prof. Dr. Maki K. Habib

Implications of DeMorgans
Theorems(II)

AUC_MENG 4779 Spring 2016

Prof. Dr. Maki K. Habib

Prof. Dr. Maki K. Habib

44

AUC_MENG 4779 Spring 2016

Example
Determine the output expression for the below circuit
and simplify it using DeMorgans Theorem

AUC_MENG 4779 Spring 2016

Prof. Dr. Maki K. Habib

Review Questions
Using DeMorgans Theorems to convert the
expressions to one that has only single-variable
inversions.
z A B C

z ABC

y R ST Q

Use only a NOR gate and an INVERTER to


implement a circuit having output expression:
y A B CD

Use DeMorgans theorems to convert below


expression to an expression containg only singlevariable inversions.
AUC_MENG 4779 Spring 2016

Prof. Dr. Maki K. Habib

Prof. Dr. Maki K. Habib

45

AUC_MENG 4779 Spring 2016

Universality of NAND and NOR gates

AUC_MENG 4779 Spring 2016

Prof. Dr. Maki K. Habib

Universality of NOR gate

AUC_MENG 4779 Spring 2016

Prof. Dr. Maki K. Habib

Prof. Dr. Maki K. Habib

46

AUC_MENG 4779 Spring 2016

Example

AUC_MENG 4779 Spring 2016

Prof. Dr. Maki K. Habib

Example

AUC_MENG 4779 Spring 2016

Prof. Dr. Maki K. Habib

Prof. Dr. Maki K. Habib

47

AUC_MENG 4779 Spring 2016

Alternate Logic-Gate Representations


Standard and alternate symbols for various logic
gates and inverter.

AUC_MENG 4779 Spring 2016

Prof. 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 the
INVERTER, the operation symbol is not changed)

AUC_MENG 4779 Spring 2016

Prof. Dr. Maki K. Habib

Prof. Dr. Maki K. Habib

48

AUC_MENG 4779 Spring 2016

Points of Consideration
The equivalences can be extended to gates with any number
of 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 represent
the same physical circuit; there is no difference in the
circuits represented by the two symbols.
NAND and NOR gates are inverting gates, and so both the
standard 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 for
each will have bubbles on both inputs and output.
AUC_MENG 4779 Spring 2016

Prof. 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.

AUC_MENG 4779 Spring 2016

Prof. Dr. Maki K. Habib

Prof. Dr. Maki K. Habib

49

AUC_MENG 4779 Spring 2016

Interpretation of the two NAND gate


symbols

AUC_MENG 4779 Spring 2016

Prof. Dr. Maki K. Habib

Interpretation of the two OR gate


symbols

AUC_MENG 4779 Spring 2016

Prof. Dr. Maki K. Habib

Prof. Dr. Maki K. Habib

50

AUC_MENG 4779 Spring 2016

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 exclusive 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.
XOR
Input A

Output X

Input B

AUC_MENG 4779 Spring 2016

Prof. Dr. Maki K. Habib

The Boolean Equation


for XOR:

X AB

Prof. Dr. Maki K. Habib

51

AUC_MENG 4779 Spring 2016

XNOR
The XNOR gate is an exclusive OR gate with an NOT gate at the output. It
will output a logic 0 if there is an exclusive logic 1 at input A or B.

XNOR
Input A

Output X

Input B

The Boolean Equation


for XNOR:

X AB
Prof. Dr. Maki K. Habib

AUC_MENG 4779 Spring 2016

Truth Tables
Another way (in addition to logic equations) to define certain
functionality
Problem: their sizes grow exponentially with number of
inputs.
inputs

x1

x2

x3

y1

y2

AUC_MENG 4779 Spring 2016

Prof. Dr. Maki K. Habib

outputs

What are logic equations


corresponding to this table?
y1 = x1 + x2 + x3
y2 = x1 * x2 * x3
Design corresponding circuit.

Prof. Dr. Maki K. Habib

52

AUC_MENG 4779 Spring 2016

Minterms and Maxterms for Three Binary Variables


Input

Minterms

Maxterms

Terms Designation

Terms

Designation

P0

S0

P1

S1

P2

S2

P3

S3

P4

S4

P5

S5

P6

S6

P7

S7

What is the significance 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 products (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.
Prof. Dr. Maki K. Habib

AUC_MENG 4779 Spring 2016

Example
Row

Input

SOP

Output
1

Number

X = P3 + P5 + P6

3
0

AUC_MENG 4779 Spring 2016

Prof. Dr. Maki K. Habib

POS
X = S0S1S2S4S7

Prof. Dr. Maki K. Habib

53

AUC_MENG 4779 Spring 2016

Logic Equations in Sum of Products Form

Systematic way to obtain logic equations from a given truth table.


inputs

outputs

x1

x2

x3

y1

y2

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

y1 = x1*x2*x3

+ x1*x2*x3 + x1*x2*x3 + x1*x2*x3

y2 = x1*x2*x3

+ x1*x2*x3 + x1*x2*x3 + x1*x2*x3 + x1*x2*x3


Prof. Dr. Maki K. Habib

AUC_MENG 4779 Spring 2016

Minimization Applying Boolean Laws


Consider one of previous logic equations:
y1 = x1*x2*x3

+ x1*x2*x3 + x1*x2*x3 + x1*x2*x3

= 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.

AUC_MENG 4779 Spring 2016

Prof. Dr. Maki K. Habib

Prof. Dr. Maki K. Habib

54

AUC_MENG 4779 Spring 2016

Note:
1. Boolean functions expressed as a sum
of products (SOP) or a product
of sums (POS) are said to be in
canonical form.
1. Note the POS is not the complement
of the SOP expression.

Prof. Dr. Maki K. Habib

AUC_MENG 4779 Spring 2016

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
The
Truth Table

0 0

0 0

0 0 0

AUC_MENG 4779 Spring 2016

Prof. Dr. Maki K. Habib

0
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.
Prof. Dr. Maki K. Habib

55

AUC_MENG 4779 Spring 2016

Minimization Using Karnough Maps (2/5)


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.

AUC_MENG 4779 Spring 2016

Prof. 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.

Finding Product Terms


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.
Prof. Dr. Maki K. Habib
AUC_MENG 4779 Spring 2016

Prof. Dr. Maki K. Habib

56

AUC_MENG 4779 Spring 2016

Minimization Using Karnough Maps (4/5)


Example 1: Given truth table, find minimal circuit
x1

x2

x3

x1 x2
00 01 11 10

x3
0

y = x1*x2 + x2*x3

Prof. Dr. Maki K. Habib

AUC_MENG 4779 Spring 2016

Minimization Using Karnough Maps (5/5)


Example 2:
x1 x2

y = x1*x3 + x2

Example 4:
00 01

11

10

00

01
11
10

10

00

01
11
10

AUC_MENG 4779 Spring 2016

Prof. Dr. Maki K. Habib

11

y = x1*x2*x3 + x1*x2*x4 + x2*x3*x4

x1x2
x3x4

00 01

x3x4

00 01 11 10

x3

x1x2

Example 3:

y = x1*x4 + x2*x3*x4 + x1*x2*x3*x4

Prof. Dr. Maki K. Habib

57

AUC_MENG 4779 Spring 2016

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.
AUC_MENG 4779 Spring 2016

Prof. Dr. Maki K. Habib

Prof. Dr. Maki K. Habib

58

AUC_MENG 4779 Spring 2016

Decoders/ Demultiplexers

A decoder allows the selection of one of 2 a options using


an 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 2016

Prof. Dr. Maki K. Habib

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.

1 to 4 Line Demux

AUC_MENG 4779 Spring 2016

Prof. Dr. Maki K. Habib

Prof. Dr. Maki K. Habib

59

AUC_MENG 4779 Spring 2016

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.
AUC_MENG 4779 Spring 2016

Prof. Dr. Maki K. Habib

Prof. Dr. Maki K. Habib

60

AUC_MENG 4779 Spring 2016

Inputs

Outputs

x
y
c
s
---------------0
0
0
0
0
1
0
1
1
0
0
1
1
1
1
0

Design Example

HA
s

Half-adder (HA): Truth table and block diagram


Inputs
Outputs
x
y
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

cout

FA

cin

Full-adder (FA): Truth table and block diagram


AUC_MENG 4779 Spring 2016

Prof. Dr. Maki K. Habib

Half-Adder Implementations
x
y

_
x
_
y

x
y

x
y

s
(a) AND/XOR half-adder.
_
c

(b) NOR-gate half-adder.


x

s
y
(c) NAND-gate half-adder with complemented carry.

Three implementations of a half-adder.


AUC_MENG 4779 Spring 2016

Prof. Dr. Maki K. Habib

Prof. Dr. Maki K. Habib

61

AUC_MENG 4779 Spring 2016

Full-Adder Implementations
y x

y x
cout

HA
cout

HA

cin

cin

s
(a) Built of half-adders.
y

Mux
cout

0
1
2
3

0
1
s

0
1
2
3

cin

(c) Suitable for CMOS realization.


AUC_MENG 4779 Spring 2016

Prof. Dr. Maki K. Habib

(b) Built as an AND-OR circuit.

Possible designs for a full-adder in


terms of half-adders, logic gates, and
Multiplexers
Prof. Dr. Maki K. Habib

62

Вам также может понравиться