Post on 14-Apr-2018
transcript
7/27/2019 Logic Circuits and Switching Theory
1/57
Louie Angelo M. Jalandoni
7/27/2019 Logic Circuits and Switching Theory
2/57
The mathematical representation of numerals
according to its bases.
7/27/2019 Logic Circuits and Switching Theory
3/57
Binary base 2 ( 0 and 1 )
Octal base 8 ( 0 7 )
Decimal base 10 ( 0 9 ) Hexadecimal base 16 ( 0 9 ) ( A F )
7/27/2019 Logic Circuits and Switching Theory
4/57
Binary Decimal Octal Hexadecimal
0000 0 0 0
0001 1 1 1
0010 2 2 2
0011 3 3 3
0100 4 4 4
0101 5 5 5
0110 6 6 6
0111 7 7 7
1000 8 10 8
7/27/2019 Logic Circuits and Switching Theory
5/57
Binary Decimal Octal Hexadecimal
1001 9 11 9
1010 10 12 A
1011 11 13 B
1100 12 14 C
1101 13 15 D
1110 14 16 E
1111 15 17 F
7/27/2019 Logic Circuits and Switching Theory
6/57
1. Divide the decimal number to its base
2. Write the remainder on the right side
3. Repeat Step 1 and 2 until the quotientbecame zero
4. Read all the remainders from bottom to top.
7/27/2019 Logic Circuits and Switching Theory
7/57
Base Decimal Remainder
2 50 0
2 25 1
2 12 0
2 6 0
2 3 1
2 1 1
0 0
When the remainder will be read from bottom to top it
will be 01100102
7/27/2019 Logic Circuits and Switching Theory
8/57
Convert the following decimal values in binary,
octal and hexadecimal
1. 425
2. 330
3. 927
7/27/2019 Logic Circuits and Switching Theory
9/57
0110010
0 x 20
1 x 21
1 x 24
1 x 25
Add up the product of the 1s multiplied to base raise to thepositional value then the value will be
0110010 = 2 + 16 + 32 = 50
7/27/2019 Logic Circuits and Switching Theory
10/57
0110010
Remember that the left most bit is the most
significant bit and the right most is the least
significant bit
Group the number by three starting from the LSB
until you reach the MSB
0 / 110 / 010 = 0 6 2 8
7/27/2019 Logic Circuits and Switching Theory
11/57
0110010
Do the same process on Binary to Octal but groupthe term by four.
011 / 0010 Convert the number using the binary system to
decimal again.
011 = 3 0010 = 2
Then the answer is 3216
7/27/2019 Logic Circuits and Switching Theory
12/57
Convert each character into binary composing 3
bits binary number
6 2
110 010
Then combine the converted number
1100102
7/27/2019 Logic Circuits and Switching Theory
13/57
The same on Binary but the base will be 8
instead of
62
2 x 81 = 2
6 x 82
= 48 Add the values and the answer will be 5010
7/27/2019 Logic Circuits and Switching Theory
14/57
Convert each character into binary composing 4
bits binary number
3 2
0011 0010
Then combine the converted number
1100102
7/27/2019 Logic Circuits and Switching Theory
15/57
The same on Binary but the base will be 16
instead of
32
2 x 161 = 2
3 x 162
= 48 Add the values and the answer will be 5010
7/27/2019 Logic Circuits and Switching Theory
16/57
CONVERSION of FRACTIONAL PART (From Decimal to any Bases)
STEPS:1. Multiply the given Decimal number by the base-r of the nummber into which the given decimal no. is to be
converted to.
2. Repeat the proceeding process until the fractions becomes Zero or until the number of digits have sufficientaccuracy
3. Generate the Final answer from the integral part from TOP to BOTTOM.
Example: 0.125 >>>Binary=(001)2
INTEGER FRACTIONAL PART0.125x2 0 0.25
0.25x2 0 0.5
0.5x2 1 0
INTEGER FRACTIONAL PART
0.125 >>>OCTAL = (0.1)8 1 0
INTEGER FRACTIONAL PART
0.125 >>>HEXADECIMAL =(0.2)16 2 0
7/27/2019 Logic Circuits and Switching Theory
17/57
Used in Digital Computers for simplifying
subtraction operation and for logical
operation.
Radix Complementrs complement =10
Diminished Radix Complement r -1s
complement = 9
7/27/2019 Logic Circuits and Switching Theory
18/57
7/27/2019 Logic Circuits and Switching Theory
19/57
To get the 1s complement, just invert the
values of the term
To get the 2s complement, just add 1 to the
1s complement.
7/27/2019 Logic Circuits and Switching Theory
20/57
STEPS in Binary Subtraction Using 1s Complement
1. Copy the minuend
2. Get the 1s complement of the subtrahend then add it to
the minuend
3. If there is an end carry, Add 1 to the sum otherwise, get
the 1s complement of the sum then prefix a NEGATIVE
sign (-).
7/27/2019 Logic Circuits and Switching Theory
21/57
STEPS in Binary Subtraction Using 2s
Complement
The twos complement of a Binary number
is obtained by getting its Ones complement
then adding 1 to Binary.
7/27/2019 Logic Circuits and Switching Theory
22/57
Binary Logic Deals with variable that take on two discrete values and with
operations that assume logical meaning.
Used to describe in mathematical way the manipulation &
processing Binary information.
LOGIC 1 LOGIC 0
HIGH LOW
+5V 0V
OPEN CLOSE
ON OFF
TRUE FALSE
7/27/2019 Logic Circuits and Switching Theory
23/57
Variables are represented by a single letter havingonly two values: 1 or 0.
There are three basic logic operation:
And Operation represented by a dot or anabsence of operation. Z = X.Y or Z = XY
Or Operation represented by plus sign.
Z = X+Y Not Operation represented by a prime or bar
Z = X
7/27/2019 Logic Circuits and Switching Theory
24/57
LOGIC GATES
blocks of hardware that produce a logic output signal if
the input requirement has been satisfied.
LOGIC CIRCUIT The interconnection of gates to achieve a prescribed
outcome
TRUTH TABLE Tabulations of all possible combinations of input & its
corresponding output
7/27/2019 Logic Circuits and Switching Theory
25/57
The answer is false when one is false
Truth Table
Equation: Z = XY
X Y Z (OUTPUT)
0 0 0
0 1 0
1 0 0
1 1 1
7/27/2019 Logic Circuits and Switching Theory
26/57
The answer is true when one is true
Truth table
Equation: Z = X+Y
X Y Z (OUTPUT)
0 0 0
0 1 1
1 0 1
1 1 1
7/27/2019 Logic Circuits and Switching Theory
27/57
Inverse value
Truth Table
Equation: Z = X
X Z (OUTPUT)
0 1
1 0
7/27/2019 Logic Circuits and Switching Theory
28/57
Nand Gate
Nor Gate
7/27/2019 Logic Circuits and Switching Theory
29/57
The answer is true when one is false
Truth Table
Equation: Z = (XY)
X Y Z (OUTPUT)0 0 1
0 1 1
1 0 1
1 1 0
7/27/2019 Logic Circuits and Switching Theory
30/57
The answer is false when one is true
Truth table
Equation: Z = (X+Y)
X Y Z (OUTPUT)
0 0 1
0 1 0
1 0 0
1 1 0
7/27/2019 Logic Circuits and Switching Theory
31/57
EX OR
EX NOR
7/27/2019 Logic Circuits and Switching Theory
32/57
The answer is true when the inputs are different
Truth table
Equation: Z = XY + XY
X Y Z (OUTPUT)0 0 0
0 1 1
1 0 1
1 1 0
7/27/2019 Logic Circuits and Switching Theory
33/57
The answer is true when the inputs are same
Truth table
Equation: Z = XY + XY
X Y Z (OUTPUT)0 0 1
0 1 0
1 0 0
1 1 1
7/27/2019 Logic Circuits and Switching Theory
34/57
Summary truth tables
The summary truth tables below show the output states
input for all types of 2-input and 3-gates:
A B AND NAND OR NOR EX-OR EX-NOR
0 0 0 1 0 1 0 1
0 1 0 1 1 0 1 0
1 0 0 1 1 0 1 0
1 1 1 0 1 0 0 1
A B C AND NAND OR NOR
0 0 0 0 1 0 1
0 0 1 0 1 1 0
0 1 0 0 1 1 0
0 1 1 0 1 1 0
1 0 0 0 1 1 0
1 0 1 0 1 1 0
1 1 0 0 1 1 0
Summary for all 2-input gates
Inputs Output of each gate
Summary for all 3-input gates
Note : that EX-OR and EX-NOR
gates can only have 2 inputs.
Inputs Output of each gate
7/27/2019 Logic Circuits and Switching Theory
35/57
Type Distinctive shape Rectangular shape
Booleanalgebra
between A
& B
Truth table
AND
INPUT OUTPUT
A B A AND B
0 0 0
0 1 0
1 0 0
1 1 1
OR A + B
INPUT OUTPUT
A B A OR B
0 0 0
0 1 1
1 0 1
1 1 1
NOT
INPUT OUTPUT
A NOT A
0 1
1 0
In electronics a NOT gate is more commonly called an inverter. The circle on the symbol iscalled a bubble , and is generally used in circuit diagrams to indicate an inverted input oroutput.
NAND
INPUT OUTPUT
A B A NAND B
0 0 1
0 1 1
1 0 1
1 1 0
NOR
INPUT OUTPUT
A B A NOR B
0 0 1
0 1 0
1 0 0
1 1 0
7/27/2019 Logic Circuits and Switching Theory
36/57
XOR
INPUTOUTPUT
A B A XOR B
0 0 0
0 1 1
1 0 1
1 1 0
XNOR
INPUT OUTPUT
A B A XNOR B
0 0 1
0 1 0
1 0 0
1 1 1
Two more gates are the exclusive-OR or XOR function and its inverse, exclusive-NOR or XNOR. The two input Exclusive-OR is true only when the two input valuesare different, false if they are equal, regardless of the value. If there are more thantwo inputs, the gate generates a true at its output if the number of trues at its input isodd.. In practice, these gates are built from combinations of simpler logic gates.
7/27/2019 Logic Circuits and Switching Theory
37/57
BASIC
GATES
NAND Gate
ImplementationNOR Gate Implementation
NOT Gate
OR Gate
AND Gate
7/27/2019 Logic Circuits and Switching Theory
38/57
7/27/2019 Logic Circuits and Switching Theory
39/57
A Mathematical notation used to represent the function
of the Digital circuit.
A notation that allows variables & constants to have only
2 possible values 0 & 1.
The Term Boolean Algebra honors a fascinating
English mathematician; George Boole
7/27/2019 Logic Circuits and Switching Theory
40/57
- An expression formed with Binary variables
the two operators OR & AND & a
UNARY operator not parenthesis & equal
sign for the given variables the functioncan either be One or Zero.
7/27/2019 Logic Circuits and Switching Theory
41/57
EQUATION No. BOOLEAN EQUATION DESCRIPTION
1X + Y = Y + X
Commutative Property
XY = YX
2X + (Y + Z) = (X + Y) + Z
Associative PropertyX(YZ) = (XY)Z
3X X = X
Idempotent PropertyX + X = X
4 X 1 = X Identity PropertyX + 1 = 1
5X 0 = 0
Null PropertyX + 0 = X
6X (Y + Z) = XY + XZ
Distributive Property
(XY) + (XZ) = X + YZ
7X X = 0
Negation PropertyX + X = 1
8 (X) = X Double Negation Property
9
X + XY = X
Absorption PropertyX (X + Y) = XX + (XY) = X + Y
7/27/2019 Logic Circuits and Switching Theory
42/57
Y= C+CA + CB +C
Using commutative law
Y=CA + CB +C+C
Using Idempotent law where
Y = CA + CB + 1
OR Condition of 1Y = 1
7/27/2019 Logic Circuits and Switching Theory
43/57
Is equivalent to
xy = x + y
(x+y ) = xy
7/27/2019 Logic Circuits and Switching Theory
44/57
Canonical forms boolean functions
expressed in sum of minterms or product of
maxterms.
7/27/2019 Logic Circuits and Switching Theory
45/57
a single variable or product of variable which
may or may not be complemented. Denoted
by a lower case m, the equation is anded
F= AB +AC+ ABC + AB
7/27/2019 Logic Circuits and Switching Theory
46/57
A single variable or sum of variables, denoted
by an Uppercase M and the equation is ored.
F = (A+C+D)(A+D)(D+A)
7/27/2019 Logic Circuits and Switching Theory
47/57
X Y Z MINTERMS MAXTERMS
DESIGNATION DESIGNATION
0 0 0 X'Y'Z' m0 X+Y+Z M0
0 0 1 X'Y'Z m1 X+Y'+Z' M1
0 1 0 X'YZ' m2 X+Y+Z' M2
0 1 1 X'YZ m3 X+Y'+Z M3
1 0 0 XYZ m4 X'+Y+Z M4
1 0 1 X'Y'Z' m5 X+Y+Z' M5
1 1 0 XY'Z' m6 X'+Y'+Z M61 1 1 XYZ m7 X'+Y'+Z' M7
0's to express 1's to express
MINTERMS & MAXTERMS WITH 3 BINARY VARIABLES
7/27/2019 Logic Circuits and Switching Theory
48/57
MINTERM:
F = ABC + ABC + A B C
F(A,B,C) =m3 + m4 + m1
MAXTERM: F = (A+B+C) +( A+B+C )+ (A+ B +C)
F(A,B,C) =M4 . M7 . M0
7/27/2019 Logic Circuits and Switching Theory
49/57
Standard Form of Equation:
The term that form the function may be one or any number or literal.
TWO TYPES:
Sum of Product (SOP)
A Boolean expression containing AND terms called PRODUCT of TERMS (one
or more literals)
Ex: F=Y + XY+XYZ
PRODUCT OF SUM (POS)
A Boolean expression containing OR terms called sum term.
Each term may have any number of literals
Ex: F=(X+Y)(Y+Z)(X+YZ)
7/27/2019 Logic Circuits and Switching Theory
50/57
Map a diagram made up of squares represents one minterm
KARNAUGH MAP
A chart or grid containing boxes called cells; each which represents one minterm.
TYPES of MAP
1. Two Variable Map
Consists of two variables
2. Three Variable Map
A three variable map plotted in a map
3. FOUR Variable Map
7/27/2019 Logic Circuits and Switching Theory
51/57
Steps: Construct the K-Map & place 1s in the squares corresponding to 1s in truth table ;
place zeros in the other squares.
Examine the map for adjacent 1s & loop those 1s which are not adjacent to any other
ones.
Looping continue as there are pairs octet or quad that contains 1. You can still loop the
one that is already looped if there are still other 1s left.
Form the OR sum of all terms generated by each loop.
7/27/2019 Logic Circuits and Switching Theory
52/57
2 Variable Karnaugh Map
2 INPUT OR GATE
7/27/2019 Logic Circuits and Switching Theory
53/57
3-variable Karnaugh maps 3-variable examples
Here is the truth table for a 3-input system 1. Simplify the following expression using a Karnaugh map:
inpu t C in pu t B inpu t A o utpu t
0 0 0 0
0 0 1 0 You may be able to tell what is going to happen by completing the
0 1 0 0
0 1 1 1 The Boolean statement is:
1 0 0 0
1 0 1 1
1 1 0 11 1 1 1 The truth table is:
This is converted into a Karnaugh map, as follows: in pu t C in pu t B in pu t A o utpu t
0 0 0 0
0 0 1 10 1 0 1
0 1 1 0
1 0 0 0
1 0 1 1
1 1 0 1
1 1 1 0
The Karnaugh map is:
This is the exclusive OR function. The value of C is irrelevant.
7/27/2019 Logic Circuits and Switching Theory
54/57
B B
A m0 m1
A m2 m3
7/27/2019 Logic Circuits and Switching Theory
55/57
7/27/2019 Logic Circuits and Switching Theory
56/57
CD CD CD CDAB m0 m1 m3 m2
AB m4 m5 m7 m6
AB m12 m13 m15 m14
AB m8 m9 m11 m10
7/27/2019 Logic Circuits and Switching Theory
57/57