Professional Documents
Culture Documents
Digital Systems
11/29/2020 1
What is signal
• A signal is a function that conveys information about the behavior or
attributes of some phenomenon.
• In the physical world, any quantity exhibiting variation in time or
variation in space (such as an image) is potentially a signal that might
provide information on the status of a physical system, or convey a
message between observers, among other possibilities.
• The term "signal" includes, among others, audio, video, speech, image,
communication, geophysical, sonar, radar, medical and musical signals.
• Types : Analog Signal & Digital Signal
11/29/2020 2
Analog Signals
•Analog signal is a continuous signal which represents physical
measurements (voltage, current, or meter movement).
•Uses continuous range of values to represent information
•Example :Human voice in air, analog electronic devices.
11/29/2020 3
Digital Signals
•A digital signal, on the other hand, can take only a finite number of
values.
•Digital signals are discrete time signals generated by digital modulation.
•Uses discrete or discontinuous values to represent information
•Example :Computers, CDs, DVDs, and other digital electronic devices.
11/29/2020 4
Binary Signal
11/29/2020 5
Analog Vs Digital
Analog continuous
Digital discrete (step by step)
11/29/2020 6
Content:
Representation of Numerical Data in Binary Form
11/29/2020 7
Number Systems
• Common Number Systems
Used by Used in
System Base Symbols humans? computers?
Decimal 10 0, 1, … 9 Yes No
Binary 2 0, 1 No Yes
Octal 8 0, 1, … 7 No No
Hexa- 16 0, 1, … 9, No No
decimal A, B, … F
11/29/2020 8
Quantities/Counting (1 of 3)
Hexa-
Decimal Binary Octal decimal
0 0 0 0
1 1 1 1
2 10 2 2
3 11 3 3
4 100 4 4
5 101 5 5
6 110 6 6
7 111 7 7
11/29/2020 9
Quantities/Counting (2 of 3)
Hexa-
Decimal Binary Octal decimal
8 1000 10 8
9 1001 11 9
10 1010 12 A
11 1011 13 B
12 1100 14 C
13 1101 15 D
14 1110 16 E
15 1111 17 F
11/29/2020 10
Quantities/Counting (3 of 3)
Hexa-
Decimal Binary Octal decimal
16 10000 20 10
17 10001 21 11
18 10010 22 12
19 10011 23 13
20 10100 24 14
21 10101 25 15
22 10110 26 16
23 10111 27 17
Etc.
11/29/2020 11
Conversion Among Bases
• The possibilities:
Decimal Octal
Binary
Binary Hexadecimal
11/29/2020 12
Decimal to Binary
• Technique
– Divide by two, keep track of the remainder
– First remainder is bit 0 (LSB, least-significant bit)
– Second remainder is bit 1
– Etc.
11/29/2020 13
Example
12510 = ?2
2 125
2 62 1
2 31 0
15 1
2
7 1
2
2 3 1
2 1 1
0 1
12510 = 11111012
11/29/2020 14
Decimal to Octal
• Technique
– Divide by 8
– Keep track of the remainder
11/29/2020 15
Example
123410 = ?8
8 1234
154 2
8
19 2
8
2 3
8
0 2
123410 = 23228
11/29/2020 16
Decimal to Hexadecimal
• Technique
– Divide by 16
– Keep track of the remainder
11/29/2020 17
Example
123410 = ?16
16 1234
77 2
16
16 4 13 = D
0 4
123410 = 4D216
11/29/2020 18
Binary to Decimal
• Technique
– Multiply each bit by 2n, where n is the “weight” of
the bit
– The weight is the position of the bit, starting from
0 on the right
– Add the results
11/29/2020 19
Example
Bit “0”
1010112 => 1 x 20 = 1
1 x 21 = 2
0 x 22 = 0
1 x 23 = 8
0 x 24 = 0
1 x 25 = 32
4310
11/29/2020 20
Octal to Decimal
• Technique
– Multiply each bit by 8n, where n is the “weight” of
the bit
– The weight is the position of the bit, starting from
0 on the right
– Add the results
11/29/2020 21
Example
7248 => 4 x 80 = 4
2 x 81 = 16
7 x 82 = 448
46810
11/29/2020 22
Hexadecimal to Decimal
• Technique
– Multiply each bit by 16n, where n is the “weight”
of the bit
– The weight is the position of the bit, starting from
0 on the right
– Add the results
11/29/2020 23
Example
11/29/2020 24
Octal to Binary
• Technique
– Convert each octal digit to a 3-bit equivalent
binary representation
11/29/2020 25
Example
7058 = ?2
7 0 5
7058 = 1110001012
11/29/2020 26
Hexadecimal to Binary
• Technique
– Convert each hexadecimal digit to a 4-bit
equivalent binary representation
11/29/2020 27
Example
10AF16 = ?2
1 0 A F
10AF16 = 00010000101011112
11/29/2020 28
Binary to Octal
• Technique
– Group bits in threes, starting on right
– Convert to octal digits
11/29/2020 29
Example
10110101112 = ?8
1 3 2 7
10110101112 = 13278
11/29/2020 30
Binary to Hexadecimal
• Technique
– Group bits in fours, starting on right
– Convert to hexadecimal digits
11/29/2020 31
Example
10101110112 = ?16
10 1011 1011
2 B B
10101110112 = 2BB16
11/29/2020 32
Octal to Hexadecimal
• Technique
– Use binary as an intermediary
11/29/2020 33
Example
10768 = ?16
1 0 7 6
2 3 E
10768 = 23E16
11/29/2020 34
Hexadecimal to Octal
• Technique
– Use binary as an intermediary
11/29/2020 35
Example
1F0C16 = ?8
1 F 0 C
1 7 4 1 4
1F0C16 = 174148
11/29/2020 36
Exercise – Convert ...
Hexa-
Decimal Binary Octal decimal
33
1110101
703
1AF
11/29/2020 39
Exercise – Convert …
Answer
Hexa-
Decimal Binary Octal decimal
33 100001 41 21
117 1110101 165 75
451 111000011 703 1C3
431 110101111 657 1AF
11/29/2020 40
BOOLEAN ALGEBRA
A set of rules to perform logical addition and multiplication
These variables are sometimes referred to as true (1) and false (0).
This convention is normally referred to as positive logic.
11/29/2020 41
11/29/2020 42
Truth Table
Analysis of logic functions, that is, functions of logical (Boolean)
variables, can be carried out in terms of truth tables. A truth table is a
listing of all the possible values each of the Boolean variables can take,
and of the corresponding value of the function.
The rules that define a logic function are often represented in tabular
form by means of a truth table
11/29/2020 43
Logic Gates
Logic gates are physical devices that can be used to implement logic
functions.
1. OR
2. AND
3. NOT
4. NOR
5. NAND
6. XOR
11/29/2020 44
11/29/2020 45
11/29/2020 46
11/29/2020 47
NAND and NOR Gates
11/29/2020 48
UNIVERSAL GATES
11/29/2020 49
UNIVERSAL GATES
Inverter using NOR AND using NOR
11/29/2020 50
XOR (Exclusive OR) Gate
11/29/2020 52
De Morgan’s theorems
11/29/2020 53
11/29/2020 54
The importance of De Morgan’s laws is in the statement of the duality
that exists between AND and OR operations: any function can be realized
by just one of the two basic operations, plus the complement operation.
This gives rise to two families of logic functions: sums of products and
product of sums.
Any logical expression can be reduced to either one of these two forms.
Although the two forms are equivalent, it may well be true that one of
the two has a simpler implementation (fewer gates).
11/29/2020 55
Sum of Products (SOP) and Product of Sums (POS)
A function can be written as a sum of minterms, which is referred to as a
minterm expansion or a standard sum of products.
Max term:
11/29/2020 56
How to write a function
Minterms present in f (output function) correspond with the 1’s of f in
the truth table.
11/29/2020 57
Example
Output can be
1or 0.
1 – is
represented by
product of
inputs.
0 – is
represented by
sum of inputs.
11/29/2020 59
11/29/2020 60
Solution:
Solution:
Solution:
Exercise:
1.
2.
11/29/2020 65
3. Simplify the following Boolean expression and draw the logic circuits
for the simplified expressions.
a)
Answers:
a) B+AC
b) C+AB’
c) AB+CD
11/29/2020 67
Exercise:
Simplify
F= ((AB)’ + (AC)’)’
11/29/2020 68
Exercise:
Simplify
1) F= (A+B).(A+B)’ = 0
2) F= A.B + (A.B)’ = 1
3) F= (A+B.C’).(A+B.C’) =A+B
11/29/2020 69
Minimization Technique
Logic Minimization: reduce complexity of the gate level implementation
TABULATION METHOD
(Quine-McCluskey Method)
11/29/2020 71
Karnaugh map
The Karnaugh map (or simply a K-map) is similar to a truth table because it presents
all the possible values of input variables and the resulting output for each value.
The K-map is an array of squares (or cells) in which each square represents a binary
value of the input variables.
The number of squares in a Karnaugh map is equal to (2n) the total number of
possible input variable combinations (i.e number of squares is equal to the number of
rows in a truth table).
Indicate the input variables along the sides of the K-map. The binary values of input
variables are arranged based on gray code.
Ex. for two variables, the number of square is 2 2 = 4, for three variables, the number
of squares is 23 = 8 and for four variables, the number of squares is 2 4 = 16.
Truth Table K-map
A B Z Minterm
0 0 0 A’B’
0 1 1 A’B
1 0 1 AB’
11/29/2020
1 1 1 AB 72
Manual Logic reduction K-map
Disadvantages: Advantages:
Finding the suitable pair of terms is In every two adjacent cells, one of the
difficult. variables has 1 and 0.
If the suitable terms are not paired, it All minterms which differ by one
will lead to long reduction process. variable are in adjacent cells.
Through grouping, the changing
variable mapped by the loop can be
eliminated.
11/29/2020 73
Two, Three and Four variable Karnaugh map and Minterms
11/29/2020 74
2-variable K-map 3-variable K-map
0 1
2 3
4-variable K-map
11/29/2020 75
Procedure in K-map
Ex.
Step-2: Find the cells in K-map corresponding to the minterms. Enter 1’s
in that cells.
Step-3: Group 1’s in the adjacent cells. Look for largest possible loop.
(8 cell, 4 cell, 2 cell).
11/29/2020 76
Rules for Grouping adjacent cells containing ones
11/29/2020 77
Rules for Grouping adjacent cells containing ones
11/29/2020 78
3. Groups must contain 1, 2, 4, 8, or in general 2n cells.
That is if n = 1, a group will contain two 1's since 21 = 2.
If n = 2, a group will contain four 1's since 22 = 4.
11/29/2020 79
4. Each group should be as large as possible.
11/29/2020 80
6. Groups may overlap.
7. Groups may wrap around the table. The leftmost cell in a row may be grouped with
the rightmost cell and the top cell in a column may be grouped with the bottom cell.
11/29/2020 81
8. There should be as few groups as possible, as long as this does not contradict any of
the previous rules.
11/29/2020 82
Writing the logic function after grouping
Write the mintems corresponding to each loop by omitting the changing
variables.
for example A is a changing variable in red loop
11/29/2020 83
Mapping a Standard SOP Expression on the Karnaugh Map
11/29/2020 84
Mapping a Nonstandard SOP Expression on the Karnaugh Map
(Factorizing)
11/29/2020 85
Exercise:
Simplify the following SOP expression using the Karnaugh mapping
procedure :
11/29/2020 86
11/29/2020 87
Exercise:
11/29/2020 88
11/29/2020 89
Exercise:
Shows a Karnaugh map of a sum-of-products (SOP) function. Determine
the simplified SOP function.
11/29/2020 90
11/29/2020 91
Mapping Directly on Karnaugh Map from a Truth Table
Exercise:
Implement the following Boolean expression using minimum number of 3-
input NAND gates.
11/29/2020 92
11/29/2020 93
Exercise:
Consider a logic circuit with 4 input variables in which the output is high
when at least 3 inputs are high. Reduce the logic function using K-map.
11/29/2020 94
Exercise: Reduce the expression F = Σm(0,1,2,3,6,7,13,15) by mapping and
implement in NAND logic.
CD 00 01 11 10
AB
00 1 1 1 1 Group I = A’B’C’D’ A’B’C’D A’B’CD A’B’CD’
= A’B’
0 1 3 2
F = A’B’+A’C+ABD
11 0 8 0 9 011 010
11/29/2020 95
NAND Implementation
A’
B’
A’ F = A’B’+A’C+ABD
A
B
D
11/29/2020 96
1. Simplify the Boolean function
F(x, y, z) = (0, 2, 4, 5, 6)
Ans: Z’+XY’
11/29/2020 97
Exercise:
Simplify the Boolean function
F(w, x, y, z)=
(0,1,2,4,5,6,8,9,12,13,14)
yz
wx
00 01 11 10
0 1 3 2
00
4 5 7 6
01
12 13 15 14
11
8 9 11 10
10
4 5 7 6
01
12 13 15 14
11
8 9 11 10
10
11/29/2020 99
Exercise: Simplify the following Boolean functions
1. F(A, B, C, D) = (0, 2, 3, 5, 7, 8, 9,10,11,13,15)
CD 2. F(A, B, C, D) = (0,1,2,5,8,9,10)
AB
11/29/2020 100
Exercise:
CD
AB
00 01 11 10
0 1 3 2
00 1 1 1
4 5 7 6
01 1 1 1
12 13 15 14
11 1 1
8 9 11 10
10 1 1 1
11/29/2020 101
Exercise:
CD
AB
00 01 11 10
0 1 3 2
00
4 5 7 6
01
12 13 15 14
11
8 9 11 10
10
11/29/2020 102
Combinational Logic Circuits
Combinational logic (sometimes also referred to as time-independent logic) is a type of
digital logic which is implemented by Boolean circuits, where the output is a pure
function of the present input only.
Sequential logic is a type of logic circuit whose output depends not only on the present
value of its input signals but on the sequence of past inputs.
11/29/2020 103
11/29/2020 104
Examples of Combinational Logic Circuits
11/29/2020 105
Half Adder
Sum = X’Y+XY’
= XY
Carry = XY
X Å Y = X Y + X Y XOR
X Å Y = X Y + X Y XNOR
11/29/2020 106
Full Adder
SUM=
Carry Out=
11/29/2020 107
Multiplexers / Data Selectors
2n data inputs, n control inputs (called "select line"), 1 output
Used to connect 2n points to a single point
Control signal pattern forms binary index of input connected to output
2 : 1 mux
4 : 1 mux
11/29/2020 109
11/29/2020 110
Demultiplexer
It is a digital function that
performs inverse of the multiplexing
operation.
It has one input line (E) and
transmits it to one of 2n possible
output lines (D0, D1, D2, …, D2n -1).
The selection of the specific output is
controlled by the bit combination of n
select inputs.
1 : 4 Demux
Output functions
E
E
11/29/2020 111
Encoder
8 : 3 Encoder
An encoder is a digital circuit that performs the inverse operation of a decoder.
An encoder has (or fewer) input lines and output lines.
The encoder can be implemented with OR gate whose inputs are determined
directly from the truth table.
11/29/2020 112