You are on page 1of 107

MODULE - IV

Digital Systems

A system which handles and processes the signals in


discrete form is called as digital system.

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

The most common digital signals are binary signals. A binary


signal is a signal that can take only one of two discrete values and is
therefore characterized by transitions between two states.

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

(different number system in digital)

 Basic logic circuit concepts

 Combinational logic circuits

 Synthesis of logic circuits

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

ABC16 => C x 160 = 12 x 1 = 12


B x 161 = 11 x 16 = 176
A x 162 = 10 x 256 = 2560
274810

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

111 000 101

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

0001 0000 1010 1111

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 011 010 111

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

001 000 111 110

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

0001 1111 0000 1100

1 7 4 1 4

1F0C16 = 174148
11/29/2020 36
Exercise – Convert ...
Hexa-
Decimal Binary Octal decimal
33
1110101
703
1AF

Don’t use a calculator!

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

The basis of Boolean algebra lies in the operations of logical addition,


or the OR operation; and logical multiplication, or the AND operation.
Both of these find a correspondence in simple logic gates.

The variables in a Boolean, or logic, expression can take only one of


two values, usually represented by the numbers 0 and 1.

These variables are sometimes referred to as true (1) and false (0).
This convention is normally referred to as positive logic.

There is also a negative logic convention in which the roles of logic 1


and logic 0 are reversed.

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

Inverter using NAND AND using NAND

11/29/2020 49
UNIVERSAL GATES
Inverter using NOR AND using NOR

11/29/2020 50
XOR (Exclusive OR) Gate

XOR gate is used in half and full adder circuits


11/29/2020 51
Exercise:

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.

A function can be written as a product of maxterms, which is referred to as a


maxterm expansion or a standard product of sums.

Max term:

All possible minterms and maxterms of two variable truth table

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.

Maxterms present in f (output function) correspond with the 0’s of f in


the truth table.
output function

Proof: Z = X’Y + X (Y+Y’) = X’Y + X (1+Y)= X + Y(X+X’) = X+Y

11/29/2020 57
Example

Output can be
1or 0.

1 – is
represented by
product of
inputs.

0 – is
represented by
sum of inputs.

If the output is high for Row No. 3, 4, 5, 6, 7

What is the expression of logical function?


11/29/2020 58
In SOP form

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) (ABC+ABC+ABC+BC ) (b) B(A+C)+C(A+B)+AC


(c) (AB + C) (AB + D)

a)  

Answers:
a) B+AC

b) C+AB’

c) AB+CD

11/29/2020 67
Exercise:

Simplify

F= ((AB)’ + (AC)’)’

Using De Morgan’s Theorem


F= ((AB)’ + (AC)’)’
= (AB)’’ . (AC)’’
= (AB).(AC)
= A.B.C

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

• reduce number of literals (gate inputs)

• reduce number of gates

• reduce number of levels of gates

 KARNAUGH MAP (K-Map)

 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

Step-1: Find the number of variables

Ex.

Step-2: Find the cells in K-map corresponding to the minterms. Enter 1’s
in that cells.

000 010 101 100 Binary value of input variables


corresponding to the Minterms
0 2 5 4 Cell number

Step-3: Group 1’s in the adjacent cells. Look for largest possible loop.
(8 cell, 4 cell, 2 cell).

Step-4: Form minimum number of loops.

Step-5: Write the reduced function from the K-map.

11/29/2020 76
Rules for Grouping adjacent cells containing ones

1.No zeros allowed.


2.No diagonals.
3.Only power of 2 number of cells in each group.
4.Groups should be as large as possible.
5.Every one must be in at least one group.
6.Overlapping allowed.
7.Wrap around allowed.
8.Number of groups must be as fewer as possible.

11/29/2020 77
Rules for Grouping adjacent cells containing ones

1. Groups may not include any cell containing a zero 

2. Groups may be horizontal or vertical, but not diagonal. 

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. 

5. Each cell containing a one must be in at least one group

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:

Write the logic functions from the K-map

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.

Enter 1 for given minterms in corresponding location and 0 for others.


Group the maximum number of 1s in the order of 2n.
Ensure that all the 1s must come under at least once in a group.
Simplify the resultant minterms using basic laws and OR the Result.
Implement the hardware.

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

0 4 05 1 1 Group II = A’BCD A’BCD’ A’B’CD A’B’CD’


= A’C
7 6
01
1 1 Group III = ABC’D ABCD
0 12 13 15
014 = ABD

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’

2. Given the following Boolean function:


F = A'C + A'B + AB'C + BC
(a) Express it in sum of minterms,
(b) Find the minimal sum of products expression,

The function can be expressed in sum of


min terms form: F(A, B, C) = (1, 2, 3, 5, 7)

A ‘C + A 'B + AB'C + BC = C + A 'B

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

Ans: y' + w'z' + xz'


11/29/2020 98
Exercise:

Simplify the Boolean function

F = A'B'C' + B'CD' + A'BCD' + AB'C'


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

00 0 011 113 102 CD


AB
00 1 1 1 00 0 011 113 102
4 5 7 6
01 1 1 00 1 1 1
4 5 7 6
11 13 15 14
11 1 1 01 1
11 13 15 14
8 9 11 10
10 1 1 1 1 11
8 9 11 10
10 1 1 1
F = BD + B' D' + CD + AD
= BD + B' D' + CD + AB'
= BD + B' D' + B' C + AD
= BD + B' D' + B' C + AB' F = B'D' + B'C' + A'C'D

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

1. Half adder – to perform two bit binary addition

2. Full adder – to perform three bit binary addition

3. Multiplexer – binary information from one of many input lines and


directs it to a single output line. [2n:1]

4. Demultiplexer - Several output lines, one input line. [1:2n]

5. Encoder – similar to MUX, many input lines and n output lines.


[2n:n]

6. Decoder – similar to DeMUX, n input lines and many output lines.


[n:2n]

11/29/2020 105
Half Adder

Sum = X’Y+XY’
= XY

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

Output function Y = S' I0 + S I1

4 : 1 mux

Output function Y = S1' S0' I0 + S1' S0 I1 + S1 S0' I2 + S1 S0 I3


11/29/2020 108
Why product of input and
select signals

mi – Minterms of control inputs

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

You might also like