DLD Module 1 Lecture Notes
DLD Module 1 Lecture Notes
Tripathy
LECTURE NOTES
ON
MODULE-I
PREPARED BY
1
Lecture Notes on Digital Logic Design by Dr. P. R. Tripathy
Introduction:
In the modern world of electronics, the term Digital is generally associated with a computer
because the term Digital is derived from the way computers perform operation, by counting
digits. For many years, the application of digital electronics was only in the computer system.
But now-a-days, digital electronics is used in many other applications. Following are some of
the examples in which Digital electronics is heavily used.
Industrial process control
Military system
Television
Communication system
Medical equipment
Radar
Navigation
Digital electronic circuits operate with voltages of two logic levels namely Logic Low and Logic
High. The range of voltages corresponding to Logic Low is represented with ‘0’. Similarly, the
range of voltages corresponding to Logic High is represented with ‘1’.
2
Lecture Notes on Digital Logic Design by Dr. P. R. Tripathy
3
Lecture Notes on Digital Logic Design by Dr. P. R. Tripathy
4
Lecture Notes on Digital Logic Design by Dr. P. R. Tripathy
5
Lecture Notes on Digital Logic Design by Dr. P. R. Tripathy
6
Lecture Notes on Digital Logic Design by Dr. P. R. Tripathy
Octal Arithmetic:
7
Lecture Notes on Digital Logic Design by Dr. P. R. Tripathy
8
Lecture Notes on Digital Logic Design by Dr. P. R. Tripathy
9
Lecture Notes on Digital Logic Design by Dr. P. R. Tripathy
Hexadecimal Arithmetic:
10
Lecture Notes on Digital Logic Design by Dr. P. R. Tripathy
Gray Code:
The Gray code was designed by Frank Gray at Bell Labs and patented in 1953. It is an un-
weighted binary code in which two successive values differ only by 1 bit. It is also known as
reflected binary code, unit distance code, minimum error code, cyclic code.
11
Lecture Notes on Digital Logic Design by Dr. P. R. Tripathy
Excess-3 Code:
The excess-3 code is also treated as XS-3 code. The excess-3 code is a non-weighted and self-
complementary BCD code used to represent the decimal numbers.
12
Lecture Notes on Digital Logic Design by Dr. P. R. Tripathy
There are the following advantages of excess-3 code which make it required to use:
13
Lecture Notes on Digital Logic Design by Dr. P. R. Tripathy
14
Lecture Notes on Digital Logic Design by Dr. P. R. Tripathy
Error detection and correction code plays an important role in the transmission of data from
one source to another. The noise also gets added into the data when it transmits from one
system to another, which causes errors in the received binary data at other systems. The bits of
the data may change (either 0 to 1 or 1 to 0) during transmission.
It is impossible to avoid the interference of noise, but it is possible to get back the original data.
For this purpose, we first need to detect either an error z is present or not using error detection
codes. If the error is present in the code, then we will correct it with the help of error correction
codes.
1's complement:
The 1's complement of a number is found by changing all 1's to 0's and all 0's to 1's. This is
called as taking complement or 1's complement. Example of 1's Complement is as follows.
15
Lecture Notes on Digital Logic Design by Dr. P. R. Tripathy
2's complement:
The 2's complement of binary number is obtained by adding 1 to the Least Significant Bit (LSB)
of 1's complement of the number.
2's complement = 1's complement + 1
Example of 2's Complement is as follows.
Binary Arithmetic:
Binary Addition:
16
Lecture Notes on Digital Logic Design by Dr. P. R. Tripathy
Binary Subtraction:
Binary Multiplication:
Binary Division:
17
Lecture Notes on Digital Logic Design by Dr. P. R. Tripathy
Logic Gates:
The logic gate is the most basic building block of any digital system, including computers. Each
one of the basic logic gates is a piece of hardware or an electronic circuit that can be used to
implement some basic logic expression.
The three basic logic gates are the OR gate, the AND gate and the NOT gate
The OR gate Operation: The OR operation on two independent logic variables A and B is
written as Y = A+B and reads as Y equals A OR B and not as A plus B. An OR gate is a logic circuit
with two or more inputs and one output. The output of an OR gate is LOW only when all of its
inputs are LOW.
If we have four logic variables and we want to know the logical output of (A + B + C + D), then it
would be the output of a four-input OR gate with A, B, C and D as its inputs.
18
Lecture Notes on Digital Logic Design by Dr. P. R. Tripathy
The AND gate Operation: An AND gate is a logic circuit having two or more inputs and one
output. The output of an AND gate is HIGH only when all of its inputs are in the HIGH state. In
all other cases, the output is LOW.
The AND operation on two independent logic variables A and B is written as Y = A.B and reads
as Y equals A AND B and not as A multiplied by B. Here, A and B are input logic variables and Y is
the output.
A NOT gate is a one-input, one-output logic circuit whose output is always the complement of
the input. That is, a LOW input produces a HIGH output, and vice versa. When interpreted for a
19
Lecture Notes on Digital Logic Design by Dr. P. R. Tripathy
positive logic system, a logic ‘0’ at the input produces a logic ‘1’ at the output, and vice versa. It
is also known as a ‘complementing circuit’ or an ‘inverting circuit’.
The NOT operation on a logic variable X is denoted as X or X. That is, if X is the input to a NOT
circuit, then its output Y is given by Y = X or Xand reads as Y equals NOT X. Thus, if X = 0, Y = 1
and if X = 1, Y = 0.
The NAND gate Operation: NAND stands for NOT AND. The output of a NAND gate is a logic ‘0’
when all its inputs are a logic ‘1’. For all other input combinations, the output is a logic ‘1’.
The NOR gate Operation: NOR stands for NOT OR. The output of a NOR gate is a logic ‘1’ when
all its inputs are logic ‘0’. For all other input combinations, the output is a logic ‘0’.
20
Lecture Notes on Digital Logic Design by Dr. P. R. Tripathy
In general, the Boolean expression for a NOR gate with more than two inputs can be written as
The Exclusive OR (EX-OR) gate Operation: The EXCLUSIVE-OR gate, commonly written as EX-OR
gate, is a two-input, one-output gate. The output of an EX-OR gate is a logic ‘1’ when the inputs
are unlike and a logic ‘0’ when the inputs are like.
Example: How do you implement three-input and four-input EX-OR logic functions with the help
of two-input EX-OR gates?
21
Lecture Notes on Digital Logic Design by Dr. P. R. Tripathy
Example: How can you implement a NOT circuit using a two-input EX-OR gate?
The Exclusive NOR (EX-NOR) gate Operation: EXCLUSIVE-NOR (commonly written as EX-NOR)
means NOT of EX-OR, i.e. the logic gate that we get by complementing the output of an EX-OR gate.
The output of a two-input EX-NOR gate is a logic ‘1’ when the inputs are like and a logic ‘0’
when they are unlike.
22
Lecture Notes on Digital Logic Design by Dr. P. R. Tripathy
Boolean Algebra:
Annulment Law
Identity Law
23
Lecture Notes on Digital Logic Design by Dr. P. R. Tripathy
Theorem 8:
24
Lecture Notes on Digital Logic Design by Dr. P. R. Tripathy
Theorem 9:
Theorem 11:
25
Lecture Notes on Digital Logic Design by Dr. P. R. Tripathy
Statement - The complement of a logical sum equals the logical product of the complements.
Statement - The complement of a logical product equals the logical sum of the complements.
26
Lecture Notes on Digital Logic Design by Dr. P. R. Tripathy
O = XY + YZ + X’Z
27
Lecture Notes on Digital Logic Design by Dr. P. R. Tripathy
O = XY + YZ. 1 + X’Z
O = XY + YZ (X + X’) + X’Z
O = XY + XYZ + X’YZ + X’Z
O = XY + X’Z
Another method to prove the Consensus theorem by the Karnaugh map is as follows:
O = XY + X’Z
The truth table for the consensus theorem which is having three variables X, Y, and Z. The
consensus theorem gives the output high when the Z variable is high or when both X and Y
variables are input high.
The Boolean expression F = AB + BC’ + AC. Identity whether we can apply the Consensus
theorem.
In the given expression, we first check the condition for the Consensus theorem as described
above:
28
Lecture Notes on Digital Logic Design by Dr. P. R. Tripathy
As all the conditions are verified so we can apply the consensus theorem. We can write just the
terms containing complemented variables (i.e., C) and leave out the Redundancy term (i.e., AB)
after using the Redundancy theorem.
F = BC’ + AC
The Boolean expression F = (A + B). (B + C) + (A’ + C). Identity whether we can apply
the Consensus theorem.
In the given expression, we first check the condition for the Consensus theorem as described
above:
As all the conditions are verified so we can apply the consensus theorem. We can write just the
terms containing complemented variables (i.e., A) and leave out the Redundancy term (i.e., B +
C) after using the Redundancy theorem.
F = (A + B) . (A’ + C)
The Duality principle states that when both sides are replaced by their duals the Boolean
identity remains valid.
Some Boolean expressions and their corresponding duals are given in the table below:
29
Lecture Notes on Digital Logic Design by Dr. P. R. Tripathy
30
Lecture Notes on Digital Logic Design by Dr. P. R. Tripathy
Boolean Function:
A Boolean function is a logical operation of one or more than one variables whose resultant is a
single binary bit. It can only be either TRUE or FALSE. Boolean functions are based
on Boolean logic.
The binary variables and logic operations are used in Boolean algebra. The algebraic expression
is known as Boolean Expression, is used to describe the Boolean Function. The Boolean
expression consists of the constant value 1 and 0, logical operation symbols, and binary
variables.
We defined the Boolean function F=xy' z+p in terms of four binary variables x, y, z, and p. This
function will be equal to 1 when x=1, y=0, z=1 or z=1.
Example 2:
Apart from the algebraic expression, the Boolean function can also be described in terms of the
truth table. We can represent a function using multiple algebraic expressions. They are their
logically equivalents. But for every function, we have only one unique truth table.
In truth table representation, we represent all the possible combinations of inputs and their
result. We can convert the switching equations into truth tables
31
Lecture Notes on Digital Logic Design by Dr. P. R. Tripathy
The output will be high when A=1 or BC'=1 or D=1 or all are set to 1. The truth table of the
above example is given below. The 2n is the number of rows in the truth table. The n defines
the number of input variables. So the possible input combinations are 23=8.
32