Beee Digitalcircuits
Beee Digitalcircuits
Digital Systems
10/18/24 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
10/18/24 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.
10/18/24 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.
10/18/24 4
Binary Signal
10/18/24 5
Analog continuous Digital discrete (step by step)
Analog Vs Digital
10/18/24 6
Different number systems in digital
10/18/24 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
10/18/24 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
10/18/24 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
10/18/24 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.
10/18/24 11
Conversion Among Bases
The possibilities:
Decimal Octal
Binary
Binary Hexadecimal
10/18/24 12
Binary to Decimal
Octal to Decimal
Hexadecimal to Decimal
Decimal to Binary
Octal to Binary
Hexadecimal to Binary
Decimal to Octal
Decimal to Hexadecimal
Binary to Octal
Binary to Hexadecimal
Octal to Hexadecimal
through binary
Hexadecimal to Octal
10/18/24 13
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
10/18/24 14
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
10/18/24 15
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
10/18/24 16
Example
7248 => 4 x 80 = 4
2 x 81 = 16
7 x 82 = 448
46810
10/18/24 17
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
10/18/24 18
Example
10/18/24 19
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.
10/18/24 20
Example
2 125
2 62 1
12510 = ?2
2 31 0
15 1
2
7 1
2
2 3 1
2 1 1
0 1
12510 = 11111012
10/18/24 21
Octal to Binary
Technique
Convert each octal digit to a 3-bit equivalent
binary representation
10/18/24 22
Example
7058 = ?2
7 0 5
7058 = 1110001012
10/18/24 23
Hexadecimal to Binary
Technique
Convert each hexadecimal digit to a 4-bit
equivalent binary representation
10/18/24 24
Example
10AF16 = ?2
1 0 A F
10AF16 = 00010000101011112
10/18/24 25
Decimal to Octal
Technique
Divide by 8
Keep track of the remainder
10/18/24 26
Example
123410 = ?8
8 1234
154 2
8
19 2
8
2 3
8
0 2
123410 = 23228
10/18/24 27
Decimal to Hexadecimal
Technique
Divide by 16
Keep track of the remainder
10/18/24 28
Example
123410 = ?16
16 1234
16 77 2
16 4 13 = D
0 4
123410 = 4D216
10/18/24 29
Binary to Octal
Technique
Group bits in threes, starting on right
Convert to octal digits
10/18/24 30
Example
10110101112 = ?8
1 3 2 7
10110101112 = 13278
10/18/24 31
Binary to Hexadecimal
Technique
Group bits in fours, starting on right
Convert to hexadecimal digits
10/18/24 32
Example
10101110112 = ?16
10 1011 1011
2 B B
10101110112 = 2BB16
10/18/24 33
Octal to Hexadecimal
Technique
Use binary as an intermediary
10/18/24 34
Example
10768 = ?16
1 0 7 6
2 3 E
10768 = 23E16
10/18/24 35
Hexadecimal to Octal
Technique
Use binary as an intermediary
10/18/24 36
Example
1F0C16 = ?8
1 F 0 C
1 7 4 1 4
1F0C16 = 174148
10/18/24 37
THE BINARY NUMBER SYSTEM
Decimal fraction
10/18/24 38
Examples of
Decimal to Binary conversion
10/18/24 39
Exercise – Convert ...
Hexa-
Decimal Binary Octal decimal
33
1110101
703
1AF
Don’t use a calculator!
10/18/24 40
Exercise – Convert …
Answer
Hexa-
Decimal Binary Octal decimal
33 100001 41 21
117 1110101 165 75
451 111000011 703 1C3
431 110101111 657 1AF
10/18/24 41
Multiplication and Division
10/18/24 42
Addition and Subtraction
10/18/24 43
Complements and
Negative Numbers
10/18/24 44
The two’s complement of an n-bit binary number is
obtained by subtracting the number itself from
10/18/24 45
10/18/24 46
10/18/24 47
Another code that finds many applications is the Gray code.
This is simply a reshuffling of the binary code with the
property that any two consecutive numbers differ only by one
bit.
10/18/24 48
How to write the logical expression of a digital circuit?
10/18/24 49
To write the logical expression in SOP form
10/18/24 50
All possible minterms and maxterms of two variable truth table
10/18/24 51
Example-1: How to write a function
Output can be
1or 0.
1 – is
represented
by product of
inputs.
0 – is
represented
by sum of
inputs.
10/18/24 53
In SOP form
10/18/24 54
Design a logic circuit to perform 3 bit addition
10/18/24 55
SUM=
Carry Out=
10/18/24 56
There are set of rules to add or multiply the variables in the
logical expression.
10/18/24 57
BOOLEAN ALGEBRA
A set of rules to perform logical addition and multiplication
10/18/24 58
10/18/24 59
An "identity" is merely a relationship that is always true, regardless of the
values that any variables involved might take on; similar to laws or
properties.
10/18/24 61
Annulment Law – A term AND´ed with a “0” equals 0 or OR´ed with a
“1” will equal 1
A . 0 = 0 A variable AND’ed with 0 is always equal to 0
A + 1 = 1 A variable OR’ed with 1 is always equal to 1
Identity Law – A term OR´ed with a “0” or AND´ed with a “1” will
always equal that term
A + 0 = A A variable OR’ed with 0 is always equal to the variable
A . 1 = A A variable AND’ed with 1 is always equal to the variable
10/18/24 62
10/18/24 63
Proof
10/18/24 64
De Morgan’s theorems
10/18/24 65
DeMorgan's theorems provide mathematical verification of the
equivalency of the NAND and negative-OR gates and the equivalency of
the NOR and negative-AND gates.
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).
10/18/24 68
Exercise-1: Realize XY + X’Y’ using
10/18/24 69
Step-2: Replace the gates by AND and NOT.
10/18/24 70
10/18/24 71
Exercise-2:
10/18/24 72
Exercise-3: Design a logic circuit whose output is HIGH only when a
majority of the inputs A, B and C are HIGH.
Exercise-4: Determine the Boolean expression for the logic circuit shown
in Fig. Simplify the Boolean expression using Boolean Laws and De
Morgan’s theorem. Redraw the logic circuit using the simplified Boolean
expression.
10/18/24 73
Exercise-4:
10/18/24 74
10/18/24 75
Exercise-4:
10/18/24 76
Exercise-5:
Simplify:
10/18/24 77
10/18/24 78
Exercise-6:
1.
2.
10/18/24 79
Exercise-7:
Simplify
10/18/24 80
Exercise-8: Determine the logic expression for the output Y, from the
truth table shown. Simplify and sketch the logic circuit for the simplified
expression.
10/18/24 81
Exercise-10:. Simplify the following Boolean expression and draw the
logic circuits for the simplified expressions.
a)
a) B+AC
b) C+AB’
c) AB+CD
10/18/24 82
Exercise-11:
Simplify
F= ((AB)’ + (AC)’)’
10/18/24 83
Exercise-12:
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
10/18/24 84
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
10/18/24 85
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
10/18/24 86
10/18/24 87
10/18/24 88
10/18/24 89
NAND and NOR Gates
10/18/24 90
UNIVERSAL GATES
10/18/24 91
UNIVERSAL GATES
10/18/24 92
XOR (Exclusive OR) Gate
TABULATION METHOD
(Quine-McCluskey Method)
10/18/24 94
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’
10/18/24 1 1 1 AB 95
Procedure to build the Karnaugh
map
Find number of squares (or cells), and draw the array
Assign decimal value and binary equivalent to each square (follow gray code)
Enter 1’s in the cells corresponding to the minterms of the given expression
Write the reduced term corresponding to each group, which gives expression
with minimum number of terms
10/18/24 96
Manual Logic reduction K-map
Disadvantages: Advantages:
Finding the suitable pair of In every two adjacent cells, one
terms is difficult. of the variables changes (1 and
If the suitable terms are not 0).
paired, it will lead to long All minterms which differ by
reduction process. one variable are in adjacent
cells.
Through grouping, the
changing variable mapped by
the loop can be eliminated.
10/18/24 97
Two, Three and Four variable Karnaugh map and
Minterms
10/18/24 98
2-variable K-map 3-variable K-map
0 1
2 3
4-variable K-map
10/18/24 99
Procedure in K-map (continued)
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).
10/18/24 100
Rules for Grouping adjacent cells
containing ones
10/18/24 101
Rules for Grouping adjacent cells
containing ones
1. Groups may not include any cell containing a zero
10/18/24 102
3. Groups must contain 1, 2, 4, 8, or in general 2n cells.
10/18/24 103
4. Each group should be as large as possible.
10/18/24 104
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.
10/18/24 105
8. There should be as few groups as possible, as long as this does not contradict any of
the previous rules.
10/18/24 106
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
10/18/24 107
Mapping a Standard SOP Expression on the Karnaugh Map
10/18/24 108
Mapping a Nonstandard SOP Expression on the Karnaugh Map
(Factorizing)
10/18/24 109
Exercise:
Simplify the following SOP expression using the Karnaugh mapping
procedure :
10/18/24 110
10/18/24 111
Exercise:
10/18/24 112
10/18/24 113
Exercise:
Shows a Karnaugh map of a sum-of-products (SOP) function. Determine
the simplified SOP function.
10/18/24 114
10/18/24 115
Mapping Directly on Karnaugh Map from a Truth Table
Exercise:
Implement the following Boolean expression using minimum number of 3-
input NAND gates.
10/18/24 116
10/18/24 117
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.
10/18/24 118
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
Group I = A’B’C’D’ A’B’C’D A’B’CD
00 1 1 1 1 A’B’CD’
0 1 3 2
= A’B’
1 Group II = A’BCD A’BCD’ A’B’CD
0 4 05 1 A’B’CD’
7 6
01 = A’C
Group III = ABC’D ABCD
0 12 113 115 014 = ABD
F = A’B’+A’C+ABD
11 0 8 0 9 011 010
10/18/24 119
NAND Implementation
A’
B’
A’ F = A’B’+A’C+ABD
A
B
D
10/18/24 120
1. Simplify the Boolean function
F(x, y, z) = (0, 2, 4, 5, 6)
Ans: Z’+XY’
10/18/24 121
Exercise:
Simplify the Boolean function
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
10/18/24 123
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 01 1 11 3 10 2 CD
AB
00 1 1 1 00 0 01 1 11 3 10 2
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
F = BD + B' D' + CD + AD
10 1 1 1
= 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
10/18/24 124
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
10/18/24 125
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
10/18/24 126
Combinational Logic Circuits
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.
10/18/24 127
10/18/24 128
Examples of Combinational Logic Circuits
10/18/24 129
Half Adder
Sum = X’Y+XY’
= XY
Carry = XY
X Y X Y X Y XOR
X Y X Y X Y XNOR
10/18/24 130
Full Adder
SUM=
Carry Out=
10/18/24 131
A simple 4 Bit Ripple Carry Adder is shown below. It is not the most efficient
adder because the higher stages in the cascade have to wait for the previous
stage to compute Carry Out bit.
10/18/24 132
10/18/24 133
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
10/18/24 135
10/18/24 136
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
10/18/24 137
2 : 4 Decoder Decoder
A B
Zi = m iE
A B
E Z0
E
1
Z1
1
1
Z2
1
Z3
10/18/24 138
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.
10/18/24 139
10/18/24 140