0% found this document useful (0 votes)
10 views20 pages

DL Unit 2 Part 1

Uploaded by

wbtyjqgg9
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
10 views20 pages

DL Unit 2 Part 1

Uploaded by

wbtyjqgg9
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 20

Course Title:

Digital Logic
(BIT 103)
BIT 1st semester-Tribhuvan University (TU)

Compiled by Ujjwal Rijal


[email protected]

Compiled by Ujjwal Rijal ||


1 [email protected]
Unit-2 Part ONE
Digital Design Fundamentals
and Boolean Algebra
Compiled by Ujjwal Rijal
[email protected]

Compiled by Ujjwal Rijal ||


2 [email protected]
 Analog Signals vs. Digital Signals
Analog Signals Digital Signals
• It is a continuous wave that changes over a • It is an overall time period. It is a discrete
time period. wave that carries information in binary form.
• It is represented by sine wave. • It is represented by square wave.
• It is described by the amplitude, period or • It is described by bit rate and bit intervals.
frequency and phase.
• It has no fixed range. • It has finite set of numbers i.e. 0 and 1.
• It transmits data in the form of wave. • It carries data in the binary form i.e. 0 and 1.
• Analog signals are less accurate. • Digital signals are more accurate.
• Wave form of analog signal is: • Wave form of digital signal is:

• Examples: human voice, thermometer, etc. • Examples: computers, digital phones, etc.
3 Compiled by Ujjwal Rijal ||
[email protected]
 Truth Table
 A table which represents the input-output relationship of the binary variables for
each logical gate is called truth table.
 It shows the relation between all the input and output in a tabular form.
 Thus, a truth table is a table representing the results of the logical operation on all
the possible combinations of logical values.
 The number of rows in a truth table is equal to 2n (where, n = number of
variables). For example, for 2 input variables, number of rows will be 22 = 4.

A B A+B
0 0 0
0 1 1
1 0 1
1 1 1

Compiled by Ujjwal Rijal ||


4 [email protected]
 Boolean Operators and Operands
 Operator is the symbol that defines the operation, whereas operation can be
defined as the action upon data (operand).
 The basic operators used in Boolean Algebra are: AND, OR and NOT.
Every operation can be expressed in terms of these basic operators. For
example: NAND operation is the combination of AND followed by NOT
operation.
 AND Operator
 AND operator is represented by “.”. So, a AND b can be represented as a.b.
Other symbols ∩, ∧ are also used for representing AND operation. The
result of AND operation is exactly same as simple arithmetic operation. The
result will only be true (1), when all the inputs are true (1).

5 Compiled by Ujjwal Rijal ||


[email protected]
Contd. ….
 OR Operator
 It is represented by “+”. So, a OR b can be represented as a+b. Other symbols
∪, ∨ are also used for representing OR operation.
 The result of OR operation is not exactly same as simple arithmetic operations.
 In this operation, the result will be true (1), if at least one input is true (1).

6 Compiled by Ujjwal Rijal ||


[email protected]
Contd. ….
 NOT Operator
 It is represented as Ā for any particular input A. Other symbol 𝐀′ is also used
for representing NOT operation.
 The result of NOT operation is the complement or bar or reverse of Boolean
input.

7 Compiled by Ujjwal Rijal ||


[email protected]
Contd. ….
 Operands
 Operands are the data items on which operations are performed.
 In an operation A + B, the operands are A and B.
 The value of operands A and B can change either to 0 or 1.

8 Compiled by Ujjwal Rijal ||


[email protected]
 Boolean Variables
 The variables that have only two values 0 and 1 are called
Boolean variables.
 The Boolean variables are denoted by A, B, ………, X, Y,
………. .
 Boolean variables are also called logic variables.

9 Compiled by Ujjwal Rijal ||


[email protected]
 Boolean Algebra
 Boolean algebra is the algebra of logic which deals with the study of binary
variables and logical operations.
 This makes possible to transform logical statements into mathematical
symbols and to calculate truth table or falsity of related statements by using
rules.
 The concept of Boolean algebra was introduced by an English
mathematician George Boole.
 In Boolean algebra, the variables are permitted to have two values “True”
and “False” usually written as 1 and 0 respectively.

10 Compiled by Ujjwal Rijal ||


[email protected]
 Boolean Function/ Logic Function
 A logic function is an expression formed by the binary variables, binary operators
OR and AND, unary operator NOT, parenthesis and equal sign.
 For a given value of the variable, the function can be either 0 or 1.
 Example: Consider the Boolean function in algebraic expression:

F = X. Y. Z’ + X. Y’

 Here, X, Y, Z are Boolean variables. The right hand side of the above operation is
known as expression.
 Each occurrences of a variable or its complement in an expression is called literal.
 In the above expression, there are three variables (X, Y, Z) and five literals (X, Y,
Z’, X,Y’).

11 Compiled by Ujjwal Rijal ||


[email protected]
 Boolean Algebra vs. Ordinary Algebra
 Boolean algebra does not have operations equivalent of division and
subtraction.
 Ordinary algebra deals with real numbers, which contains an infinite
number of elements (1, 2, …….). But Boolean algebra has finite set of
elements i.e. it deals with only two elements 0 and 1.
 In Boolean algebra, there are no coefficients or exponents involved i.e.
A + A = A and A . A = A.
 The distributive law [(A + B) . (A + C) = A + (B . C)] does not hold in the
case of ordinary algebra.
 Unlike in ordinary algebra, there are several graphical methods of
representing Boolean expressions in the case of Boolean algebra, etc.

12 Compiled by Ujjwal Rijal ||


[email protected]
 Introduction to Logic Gates
 A logic gate is an electronic circuit that operates on one or more input
signals to produce an output signal.
 The logic gate is used for binary operation and is the basic component of
the digital computer.
 It is embodied into integrated circuit (IC) and each gate has its specific
function and graphical symbol.
 The function of gate is expressed by means of an algebraic expression.
 There are basically three types of Logic gates:
1. Basic Gates : AND, OR, NOT.
2. Derived Gates : NAND, NOR, XOR, XNOR.
3. Universal Gates: NAND, NOR.

13 Compiled by Ujjwal Rijal ||


[email protected]
Contd. ….
I. AND Gate
Definition:
 AND gate is an electronic circuit which produces high (1) output when all the
inputs are high. Otherwise, the output will be low (0).
 It can have two or more inputs and produce a single output.
Algebraic Expression:
F = A.B
 Where, “.” stands for AND operation, A & B are inputs and F is output.
Graphical Symbol: Truth Table:

14 Compiled by Ujjwal Rijal ||


[email protected]
Contd. ….
II. OR Gate
Definition:
 OR gate is an electronic circuit which produces high (1) output when one of the
inputs is high. If all the inputs are low(0), then the output will also be low.
 It can have two or more inputs and produce a single output.
Algebraic Expression:
F = A+B
 Where, “+” stands for OR operation, A & B are inputs and F is output.
Graphical Symbol: Truth Table:

15 Compiled by Ujjwal Rijal ||


[email protected]
Contd. ….
III. NOT Gate
Definition:
 NOT gate is an electronic circuit whose output is the complement of input. It is also
called Inverter.
 It means that if we provide high (1) input to this gate, then it will produce low (0)
output and vice-versa. It has only one input and output.
Algebraic Expression:
F=Ā

Graphical Symbol: Truth Table:

16 Compiled by Ujjwal Rijal ||


[email protected]
Contd. ….
IV. NAND Gate
Definition:
 NAND gate is the combination of AND gate followed by NOT gate. It is the
complement of AND gate.
 It produces low (0) output when all the inputs are high (1). Otherwise, the output will
be high (1).
Algebraic Expression:
F = (A.B)’
 Where, A & B are inputs and F is output.
Graphical Symbol: Truth Table:

17 Compiled by Ujjwal Rijal ||


[email protected]
Contd. ….
IV. NOR Gate
Definition:
 NOR gate is the combination of OR gate followed by NOT gate. It is the complement
of OR gate.
 It produces high (1) output when all the inputs are low (0). Otherwise, the output will
be low.
Algebraic Expression:
F = (A+B)’
 Where, A & B are inputs and F is output.
Graphical Symbol: Truth Table:

18 Compiled by Ujjwal Rijal ||


[email protected]
Contd. ….
V. Exclusive – OR (XOR) Gate
Definition:
 The XOR gate produces low output (0) when both the inputs are same. Otherwise,
the will be high (1). It means that it produces high output in case of different inputs.
Algebraic Expression:
F = (A⊕B) = A’.B + A.B’
 Where, “⊕” stands for the XOR operation, A & B are inputs and F is output.
Graphical Symbol: Truth Table:

19 Compiled by Ujjwal Rijal ||


[email protected]
Contd. ….
VI. Exclusive – NOR (XNOR) Gate
Definition:
 The XNOR gate is equivalent to an XOR gate followed by an inverter.
 This gate produces high output (1) when all the inputs are either high or low. It means
that it produces high output in case of same inputs.
Algebraic Expression:
F = (A⊙B) = A.B + A’.B’
 Where, “⊙” stands for the XNOR operation, A & B are inputs and F is output.
Graphical Symbol: Truth Table:

20 Compiled by Ujjwal Rijal ||


[email protected]

You might also like