0% found this document useful (0 votes)
22 views40 pages

1 Introduction

The document discusses digital logic and number systems. It introduces common logical operators like AND, OR, and NOT. It also covers different number systems such as binary, decimal, octal, and hexadecimal. Conversion methods between these number systems are explained through examples. Finally, common logic gates like AND, OR, and NOT gates are defined along with their truth tables.

Uploaded by

aerata52dd
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)
22 views40 pages

1 Introduction

The document discusses digital logic and number systems. It introduces common logical operators like AND, OR, and NOT. It also covers different number systems such as binary, decimal, octal, and hexadecimal. Conversion methods between these number systems are explained through examples. Finally, common logic gates like AND, OR, and NOT gates are defined along with their truth tables.

Uploaded by

aerata52dd
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/ 40

Digital Logic

Er. Gaurav Gautam

Er. Gaurav Gautam, 9801104102


Introduction:
• In decimal system which is used • Similarly, to solve or simplify the
in our day to day life , the logical expressions used in the
arithmetic operation such as digital circuits we need to use
addition , subtraction, logical operators.
multiplication , division , square • Some common logical operators
root, modulus, etc. are used to are:
solve the equations. • AND Operator: (A.B Logical
Multiplication )
• OR Operator: (A+B logical
addition )
• NOT Operator (𝐴ҧ logical
Inversion )

Er. Gaurav Gautam, 9801104102


Common Number Systems

System Base Symbols Used by Humans? Used in Computers?


Decimal 10 0, 1, … 9 Yes No
Binary 2 0, 1 No Yes
Octal 8 0, 1, … 7 No No
Hexa- 0, 1, … 9,
decimal 16 No No
A, B, … F

Er. Gaurav Gautam, 9801104102


Conversion among Bases
• Possibilities

Decimal Octal

Binary Hexadecimal

• Example
2510 = 110012 = 318 = 1916
Er. Gaurav Gautam, 9801104102
Base
Decimal to Binary
• Technique
• Divide by two, keep track of the remainder
• The remainders read from bottom to top give the equivalent binary integer number.
• Example - 1  Example - 2
12510 = ?2 2 125 1
0.687510 = ?2 integer fraction
2 62 0
2 31 1 0.6875 x 2 = 1.3750 1 + 0.3750
2 15 1 0.3750 x 2 = 0.7500 0 + 0.7500
2 7 1 0.7500 x 2 = 1.5000 1 + 0.5000
2 3 1 0.5000 x 2 = 1.0000 1 + 0.0000
2 1 1
0 0.687510 = 0.10112
12510 = 11111012 Er. Gaurav Gautam, 9801104102
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. Finally, Add the results.
• Example - 1  Example - 2
1010112 = ?10 11.112 = ?10
1 0 1 0 1 1 1 1 . 1 1

1 x 25 + 0 x 24 + 1 x 23 + 0 x 22 + 1 x 21 + 1 x 20 1 x 21 + 1 x 20 + 1 x 2-1 + 1 x 2-2
32 + 0 + 8 + 0 + 2 + 1 2 + 1 + 0.5 + 0.25

1010112 = 4310 11.112 = 3.7510


Er. Gaurav Gautam, 9801104102
Decimal to Octal
• Technique
• Divide by eight, keep track of the remainder
• The remainders read from bottom to top give the equivalent octal integer number.
• Example - 1  Example - 2
12510 = ?8 0.687510 = ?8
8 125 5 integer fraction
8 15 7
0.6875 x 8 = 5.5000 5 + 0.5000
8 1 1
0.5000 x 8 = 4.0000 4 + 0.0000
0

12510 = 1758 0.687510 = 0.548

Er. Gaurav Gautam , 9801104102


Octal to Decimal
• Technique
• Multiply each digit by 8n, where n is the “weight” of the digit
• The weight is the position of the digit, starting from 0 on the right. Finally, Add the results.
• Example - 1  Example - 2
7248 = ?10 43.258 = ?10
7 2 4 4 3 . 2 5

7 x 82 + 2 x 81 + 4 x 80 4 x 81 + 3 x 80 + 2 x 8-1 + 5 x 8-2
448 + 16 + 4 32 + 3 + 0.25 + 0.0781

7248 = 46810 43.258 = 35.328110


Er. Gaurav Gautam , 9801104102
Octal to Decimal
• Technique
• Multiply each digit by 8n, where n is the “weight” of the digit
• The weight is the position of the digit, starting from 0 on the right. Finally, Add the results.
• Example - 1  Example - 2
7248 = ?10 43.258 = ?10
7 2 4 4 3 . 2 5

7 x 82 + 2 x 81 + 4 x 80 4 x 81 + 3 x 80 + 2 x 8-1 + 5 x 8-2
448 + 16 + 4 32 + 3 + 0.25 + 0.0781

7248 = 46810 43.258 = 35.328110


Er. Gaurav Gautam , 9801104102
Decimal to Hexa-Decimal
• Technique
• Divide by sixteen, keep track of the remainder
• The remainders read from bottom to top give the equivalent hexadecimal integer number.
• Example - 1  Example - 2
123410 = ?16 0.0312510 = ?16
16 1234 2 integer fraction
16 77 13=D
0.03125 x 16 = 0.5000 0 + 0.5000
16 4 4
0.5000 x 16 = 8.0000 8 + 0.0000
0

123410 = 4D216 0.0312510 = 0.0816

Er. Gaurav Gautam , 9801104102


Hexa-Decimal to Decimal
• Technique
• Multiply each digit by 16n, where n is the “weight” of the digit
• The weight is the position of the digit, starting from 0 on the right. Finally, Add the results.
• Example - 1  Example - 2
ABC16 = ?10 43.2516 = ?10
A B C 4 3 . 2 5

A x 162 + B x 161 + C x 160 4 x 161 + 3 x 160 + 2 x 16-1 + 5 x 16-2


10 x 162 + 11 x 161 + 12 x 160 64 + 3 + 0.125 + 0.0195
2560 + 176 + 12

ABC16 = 274810 43.2516 = 67.144510


Er. Gaurav Gautam , 9801104102
Logic Gates
• Most basic logical unit of the digital • Types of gate circuits are as follows
system is gate circuit. Basic Gates:
• It is electronic circuit having one or 1. AND Gate
more than one inputs and only one 2. OR Gate
output. 3. NOT Gate (Inverter)
• The relationship between the input Universal Gates:
and output is based on certain 1. NOR Gate
logic . 2. NAND Gate
• Based on the logic , the gates are Special Purpose Gates:
named as NOT gate, AND gate, OR 1. XOR Gate
gate, NAND gate, NOR gate, etc. 2. XNOR Gate

Er. Gaurav Gautam, 9801104102


1. AND Gate
 AND Gate has an output which is normally at logic level “0” and only goes “HIGH” to a logic
level “1” when ALL of its inputs are at logic level “1”

2-input AND Gate Truth Table Logic Notation


A A B C 𝐶 =𝐴∙𝐵
C
B 0 0 0
0 1 0
1 0 0
1 1 1

Er. Gaurav Gautam, 9801104102


2. OR Gate
 OR Gate or Inclusive-OR gate has an output which is normally at logic level “0” and only goes
“HIGH” to a logic level “1” when one or more of its inputs are at logic level “1”.

2-input OR Gate Truth Table Logic Notation


A A B C 𝐶 =𝐴+𝐵
C
B
0 0 0
0 1 1
1 0 1
1 1 1

Er. Gaurav Gautam, 9801104102


3. NOT (Inverter) Gate
• NOT gate has an output which is always opposite to input level.

Inverter Gate Truth Table Logic Notation

A C 𝐶 = 𝐴ҧ 𝑜𝑟 𝐶 = 𝐴′
A C
0 1
1 0

Er. Gaurav Gautam, 9801104102


4. NOR Gate
• NOR Gate is an OR gate followed by an inverter.
• NOR Gate has an output which is normally at logic level “1” and only goes
“LOW” to a logic level “0” when one or more of its inputs are at logic level “1”.

2-input NOR Gate Truth Table Logic Notation


A A B C 𝐶 = 𝐴+𝐵 ′
C
B 0 0 1
0 1 0
1 0 0
1 1 0

Er. Gaurav Gautam, 9801104102


5. NAND Gate
• NAND Gate is an AND gate followed by an inverter.
• NAND Gate has an output which is normally at logic level “1” and only goes
“LOW” to a logic level “0” when ALL inputs are at logic level “1”.

2-input NAND Gate Truth Table Logic Notation

A A B C 𝐶 = (𝐴 ∙ 𝐵)′
C
B 0 0 1
0 1 1
1 0 1
1 1 0

Er. Gaurav Gautam, 9801104102


6. Exclusive-OR (X-OR) Gate
• X-OR gate that has 1 state when one and only one of its two inputs assumes a
logic 1 state and has 0 state when all of its input are same.
• Also known as anti-coincidence gate or inequality detector.
2-input XOR Gate Truth Table Logic Notation

A A B C 𝐶 =𝐴⨁𝐵
C
B 0 0 0
0 1 1
1 0 1
1 1 0

Er. Gaurav Gautam, 9801104102


7. Exclusive-NOR (X-NOR) Gate
• X-NOR gate that has 1 state when all of its input are same and has 0 state when
one of its input has 0 state and other input is 1 state.
• Also known as coincidence gate or equality detector.

2-input XNOR Gate Truth Table Logic Notation


A A B C 𝐶 =𝐴⨀𝐵
C
B
0 0 1
0 1 0
1 0 0
1 1 1

Er. Gaurav Gautam, 9801104102


NAND as Universal Gate
(AB)’ ((AB)’)’ = AB
A A’ A
B
NOT using NAND AND using NAND

A’
A
(A’B’)’ = (A+B)
B
B’
OR using NAND

Er. Gaurav Gautam, 9801104102


NOR as Universal Gate
(A+B)’ ((A+B)’)’ = A+B
A
A A’
B
NOT using NOR OR using NOR

A’
A
(A’+B’)’ = AB
B
B’
AND using NOR

Er. Gaurav Gautam, 9801104102


Boolean Algebra Laws
• AND laws  OR laws
1. 𝐴 ∙ 0 = 0 𝑁𝑢𝑙𝑙 𝐿𝑎𝑤 1. 𝐴 + 0 = 𝐴 𝑁𝑢𝑙𝑙 𝐿𝑎𝑤
2. 𝐴 ∙ 1 = 𝐴 𝐼𝑑𝑒𝑛𝑡𝑖𝑡𝑦 𝐿𝑎𝑤 2. 𝐴 + 1 = 1 𝐼𝑑𝑒𝑛𝑡𝑖𝑡𝑦 𝐿𝑎𝑤
3. 𝐴 ∙ 𝐴 = 𝐴 3. 𝐴 + 𝐴 = 𝐴
4. 𝐴 ∙ 𝐴ҧ = 0 4. 𝐴 + 𝐴ҧ = 1

• Commutative laws  Associative laws


1. 𝐴 + 𝐵 = 𝐵 + 𝐴 1. 𝐴 + 𝐵 + 𝐶 = 𝐴 + (𝐵 + 𝐶)
2. 𝐴 ∙ 𝐵 = 𝐵 ∙ 𝐴 2. 𝐴 ∙ 𝐵 𝐶 = 𝐴(𝐵 ∙ 𝐶)

Er. Gaurav Gautam , 9801104102


Boolean Algebra Laws
• Distributive laws  Redundant Literal Rule
ҧ =𝐴+𝐵
1. 𝐴 + 𝐴𝐵
1. 𝐴 𝐵 + 𝐶 = 𝐴𝐵 + 𝐴𝐶
2. 𝐴 𝐴ҧ + 𝐵 = 𝐴𝐵

• Idempotent laws
 Absorption laws
1. 𝐴 ∙ 𝐴 = 𝐴
1. 𝐴 + 𝐴𝐵 = 𝐴
2. 𝐴 + 𝐴 = 𝐴 2. 𝐴(𝐴 + 𝐵) = 𝐴
 De Morgan’s Theorem
1. 𝐴 + 𝐵 = 𝐴ҧ𝐵ത
2. 𝐴𝐵 = 𝐴ҧ + 𝐵ത

Break the line change the sign


Er. Gaurav Gautam , 9801104102
Proof of 𝐴 + 𝐵 + 𝐶 = 𝐴ҧ 𝐵ത 𝐶ҧ
L.H.S. R.H.S.

A B C ഥ
A+B+C 𝐀 + 𝐁 + 𝐂 𝐀 ഥ
𝐁 𝐂ത ഥ𝐁
𝐀 ഥ 𝐂ത
0 0 0 0 1 1 1 1 1
0 0 1 1 0 1 1 0 0
0 1 0 1 0 1 0 1 0
0 1 1 1 0 1 0 0 0
1 0 0 1 0 0 1 1 0
1 0 1 1 0 0 1 0 0
1 1 0 1 0 0 0 1 0
1 1 1 1 0 0 0 0 0
From truth table, it is clearly visible that L.H.S. = R.H.S. Hence, the complement of
a sum of variables is equal to the product of their individual
Er. Gaurav Gautam , 9801104102
Proof of 𝐴𝐵𝐶 = 𝐴ҧ + 𝐵ത + 𝐶ҧ
L.H.S. R.H.S.

A B C ABC 𝐀𝐁𝐂 ഥ
𝐀 ഥ
𝐁 𝐂ത ഥ+𝐁
𝐀 ഥ
0 0 0 0 1 1 1 1 + 𝐂ത
0 0 1 0 1 1 1 0 1
0 1 0 0 1 1 0 1 1
0 1 1 0 1 1 0 0 1
1 0 0 0 1 0 1 1 1
1 0 1 0 1 0 1 0 1
1 1 0 0 1 0 0 1 1
1 1 1 1 0 0 0 0 1
0
From truth table, it is clearly visible that L.H.S. = R.H.S. Hence, the complement of
a product of variables is equal toEr. Gaurav
theGautam
sum of their individual
, 9801104102
Simplification using Boolean algebra:
1. 𝑥ҧ 𝑦ത 𝑧 + 𝑥ҧ y 𝑧 + 𝑥𝑦ത
2. x y + 𝑥ҧ 𝑧 + y 𝑧
3. 𝑥ҧ 𝑦ത 𝑧ഥ + 𝑥ҧ y 𝑧ഥ + x 𝑦ത 𝑧ഥ + x y 𝑧ഥ
4. AB + A(B+C) + B (B+C)

Er. Gaurav Gautam, 9801104102


Prove that:
ҧ
• A(𝐴+C)( 𝐴ҧ B+C)(𝐴ҧ BC+ 𝐶ҧ )=0
• (A+B)(𝐴ҧ 𝐵ത + 𝐶ҧ ) + 𝐴(B+C)
ҧ =
A+B+C

Er. Gaurav Gautam, 9801104102


Boolean Expressions and Boolean Function:

• Boolean algebra deals with binary • Eg.


variables and logic operations.
F(A,B,C,D) = A+B 𝐶ҧ +ADC

Boolean Boolean
• A Boolean function is described by an Function Expression
algebraic operation called Boolean
expression which consist of binary Any logical expression can be expressed
variables, the constants 0 and 1 and in the following two standard forms:
the logical operation symbols.
i. Sum-of-Products (SOP)
ii. Product of Sum (POS)

Er. Gaurav Gautam, 9801104102


Sum-Of-Product (SOP)
• When two or more product • SOP form can also contain a
terms (or Anded terms) are term with a single variable such
summed by Boolean algebra, the as F= A+𝐴ҧ𝐵ത + 𝐵𝐶

resulting expression is Sum-Of-
Product.
• O represents 𝐴ҧ
• Eg. F = AB+ 𝐴ҧ𝐵𝐶

• 1 represents A
F = ABC + C𝐷 ҧ
ഥ + 𝐵ത 𝐶𝐷
• Only high (1’s) output is taken
SOP expression is two or more
AND function OR ed together.

Er. Gaurav Gautam, 9801104102


Standard SOP (or Canonical SOP)
• Standard SOP is one in which all • Each individual term in standard
the variables in the domain SOP form is called as minterm.
appear in each product term in • Standardization makes the
the expression. evaluation , simplification ,
F= AB+BC+A 𝐷 ഥ implementation, realization of
is not Standard SOP Boolean expression more
systematic and easier.

F= A 𝐵𝐶𝐷 + 𝐴𝐵𝐶𝐷 + 𝐴𝐵𝐶ҧ 𝐷ഥ
is standard SOP

Er. Gaurav Gautam, 9801104102


Minterms for three variables(A,B,C):
A B C Terms Designation (mi) A B C Function Function
0 0 0 𝐴ҧ 𝐵ത 𝐶ҧ m0 Output (F1) Output (F2)

0 0 1 𝐴ҧ 𝐵𝐶
ത m1 0 0 0 1 0

0 1 0 𝐴ҧ 𝐵 𝐶ҧ m2 0 0 1 0 0

0 1 1 𝐴ҧ 𝐵 𝐶 m3 0 1 0 0 0

1 0 0 A 𝐵ത 𝐶ҧ m4 0 1 1 1 1

1 0 1 A 𝐵ത 𝐶 m5 1 0 0 0 0

1 1 0 A B 𝐶ҧ m6 1 0 1 0 1

1 1 1 ABC m7 1 1 0 1 1
1 1 1 0 1

F1 =𝐴ҧ 𝐵ത 𝐶+
ҧ 𝐴ҧ 𝐵 𝐶+A B 𝐶ҧ • F2 =𝐴ҧ 𝐵 𝐶 + A 𝐵ത 𝐶 + A B 𝐶ҧ +A B C
= m0 + m3 + m6 = m3 + m5 + m6 + m7
=σ𝑚(0,3,6)
Er. Gaurav Gautam, 9801104102
Converting SOP to Standard SOP
• Multiply each product term by • Convert A+B to Standard SOP.
ҧ where A is the missing
(A+ 𝐴), Here, F = A+B
term.
ത + B(A+ 𝐴)ҧ
= A(B+ 𝐵)
• Expand the multiplication and

= AB+A 𝐵+AB+ ҧ
𝐴B
repeat step 1 until standard SOP
is obtained ത 𝐴B
= AB+A 𝐵+ ҧ

Er. Gaurav Gautam, 9801104102


Convert A+A 𝐵ത + 𝐵C
ത to standard SOP

Er. Gaurav Gautam, 9801104102


Product-Of-Sum (POS)
• When two or more sum terms • POS form can also contain a
are multiplied the resulting term with a single variable such
expression is product of sum. as F= A(𝐴ҧ + 𝐵)(
ത 𝐵ത + 𝐶)
• eg (𝐴ҧ + 𝐵ത +C)(A + 𝐵ത + 𝐶)ҧ (𝐴ҧ +
𝐵+C) • O represents A
• 1 represents 𝐴ҧ
• AND function of two or more or • Only low(0’s) output is taken
ed functions.

Er. Gaurav Gautam, 9801104102


Standard POS (or Canonical POS)
• Standard SOP is one in which all • Each individual term in standard
the variables in the domain POS form is called as maxterm.
appear in each product term in • Standardization makes the
the expression. evaluation , simplification ,
F= A(𝐴ҧ + 𝐵)(
ത 𝐵ത + 𝐶) implementation, realization of
is not Standard POS Boolean expression more
systematic and easier.
F= (𝐴ҧ + 𝐵ത +C)(A + 𝐵ത + 𝐶)ҧ (𝐴ҧ +
𝐵+C)
is standard POS

Er. Gaurav Gautam, 9801104102


Maxterms for three variables(A,B,C):
A B C Terms Designation A B C Function Function
(mi) Output (F1) Output (F2)
0 0 0 A+B+C M0 0 0 0 1 0
0 0 1 A+B+𝐶ҧ M1 0 0 1 0 0
0 1 0 A+ 𝐵ത + 𝐶 M2 0 1 0 0 0
0 1 1 A+ 𝐵ത + 𝐶ҧ M3 0 1 1 1 1
1 0 0 𝐴ҧ + 𝐵 + 𝐶 M4 1 0 0 0 0
1 0 1 𝐴ҧ +B+𝐶ҧ M5 1 0 1 0 1
1 1 0 𝐴ҧ + 𝐵ത + 𝐶 M6 1 1 0 1 1
1 1 1 𝐴ҧ + 𝐵ത + 𝐶ҧ M7 1 1 1 0 1
ҧ
F1 = (A+B+𝐶)(A+ 𝐵ത + 𝐶)(𝐴ҧ + 𝐵 + • F2 = (A+B+C) (A+B+𝐶ҧ ) (A+ 𝐵ത +C)
𝐶)(𝐴ҧ +B+𝐶)ҧ (𝐴ҧ + 𝐵ത + 𝐶)ҧ (𝐴ҧ + 𝐵 + 𝐶 )
= M1M2M4M5M7 = M0M1M2M4
=σπ(1,2,4,5,7) = =σπ(0,1,2,4)
Er. Gaurav Gautam, 9801104102
Converting POS to Standard POS
ҧ where A
• Add each term by (A.𝐴), • Convert (A+ 𝐵ത + C)(𝐵ത + C+D) to
is the missing term. Standard SOP.
• Apply the rule Here, F = (A+ 𝐵ത + C)(𝐵ത + C+D)
A+BC = (A+B)(A+C) =?
• A.A=A =?
• Repeat the above process until =?
standard POS is obtained

Er. Gaurav Gautam, 9801104102


Convert Standard SOP to POS
• Evaluate each SOP terms and Similarly the same process for POS
determine its binary to SOP.
representation.
• Determine all the binary number
not included in evaluation in
above step.
• Write equivalent sum term for
each binary number obtained in
step 2.

Er. Gaurav Gautam


Convert standard SOP to POS:
𝐴ҧ𝐵𝐶
ത + 𝐴𝐵𝐶ҧ ത + ABC
+ 𝐴𝐵C
Step 1: 𝐴ҧ𝐵𝐶
ത + 𝐴𝐵𝐶ҧ ത + ABC
+ 𝐴𝐵C
: 001, 011, 101,111

Step 2: 000,010,100,110

Step 3: POS is given by:


:
ҧ
(A+B+C)(A+ 𝐵ത +C)(𝐴+B+C)(𝐴ҧ + 𝐵ത + 𝐶)

Er. Gaurav Gautam


Convert POS to SOP:
ҧ 𝐴ҧ + 𝐵 + 𝐶)(𝐴ҧ + 𝐵ത + 𝐶)
(A+B+𝐶)(
• Step 1:
=(A+B+𝐶)( ҧ 𝐴ҧ + 𝐵 + 𝐶)(𝐴ҧ + 𝐵ത + 𝐶)
=001, 100,110

Step 2: remaining binary number


= 000,010,011,101,111

Step3: SOP
=𝐴ҧ𝐵ത 𝐶ҧ + 𝐴𝐵
ҧ 𝐶ҧ + 𝐴𝐵𝐶
ҧ ത + 𝐴𝐵𝐶
+ 𝐴𝐵𝐶
Er. Gaurav Gautam

You might also like