0% found this document useful (0 votes)
18 views102 pages

Digital Logic Design

Digital Logic Design

Uploaded by

dlj2527
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)
18 views102 pages

Digital Logic Design

Digital Logic Design

Uploaded by

dlj2527
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/ 102

SRI KRISHNA COLLEGE OF TECHNOLOGY

[An Autonomous Institution | Affiliated to Anna University and Approved by AICTE | Accredited by NAAC – UGC with ‘A’ Grade]
Kovaipudhur, Coimbatore – 641 042.

23EC102 - DIGITAL LOGIC DESIGN AND


COMPUTER ARCHITECTURE

Dr P Divya
Assistant Professor
Department of ECE
Module I
Maps CO1 & CO2

MODULE I: DIGITAL LOGIC

Number Systems - Boolean algebra – Minimization of Boolean Functions using


Karnaugh Maps – Implementation of Logic Circuits using Gates – Combinational
Logic: Adder, Subtractor, Multiplexer, Demultiplexer, Encoders, Decoders –
Sequential Logic: Flip flops, Registers, Counters – Finite State Machines

CO1 : Implement logic circuits and simplify Boolean functions

CO2: Analyze combinational and sequential logic circuits


INTRODUCTION
Analog Vs Digital Signal
Signal

• Signal is a function that represents information or data.

• Signal is an electromagnetic wave that carries information through physical medium.

• Here the data is converted into electromagnetic signal either as analog or digital and sent from sender to receiver.
Analog Vs Digital Signal
Analog system

• Analog signal is a form of electrical energy for which there is a linear relationship between electrical quantity and the value that
the signal represents.

• The signal whose amplitude takes any value in a continuous range is called analog signal.
• Analog Signals are continuous in nature which vary with respect to time.
• The signals include audio signals transmitted through wires, video signals broadcasted using older technology & radio signals.

Digital system

• The signal, whose amplitude takes only limited values is called Digital signal.
• Digital signals are discrete, they contain only distinct values.
• Digital signals carry binary data i.e. 0 or 1 in form of bits, it can only contain one value at a period of time.
• The minimum value is 0 volts whereas maximum value is 5 volts.
Analog Vs Digital Signal
Comparison
Binary Digital Signal
• For digital systems, the variable takes on discrete values.
• Two level, or binary values.

• Binary values are represented abstractly by:


• Digits 0 and 1
• Words (symbols) False (F) and True (T)
• Words (symbols) Low (L) and High (H)
• And words Off and On
Decimal Number System
• Base (also called radix) = 10
• 10 digits { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 }
2 1 0 -1 -2
• Digit Position
5 1 2 7 4
• Integer & fraction
• Digit Weight 100 10 1 0.1 .01

• Weight = (Base) Position 500 10 2 0.7 0.04

• Magnitude
• Sum of “Digit x Weight” 2 1 0 -1
d2*B +d1*B +d0*B +d-1*B +d-2*B -2

• Formal Notation (512.74)10 8


Octal Number System
• Base = 8
• 8 digits { 0, 1, 2, 3, 4, 5, 6, 7 } 1/ 1/6
64 8 1 8 4
• Weights 5 1 2 7 4
• Weight = (Base) Position
2 1 0 -1 -2
2 1 0 -1 -2
5 *8 +1 *8 +2 *8 +7 *8 +4 *8
• Magnitude
=(330.9375)10
• Sum of “Digit x Weight”
(512.74)8
• Formal Notation
9
Binary Number System
• Base = 2
• 2 digits { 0, 1 }, called binary digits or “bits”
• Weights 4 2 1 1/2 1/4
1 0 1 0 1
• Weight = (Base) Position

2 1 0 -1 -2
• Magnitude 2 1 0 -1
1 *2 +0 *2 +1 *2 +0 *2 +1 *2 -2

• Sum of “Bit x Weight” =(5.25)10

• Formal Notation 11000101


(101.01)2

• Groups of bits 8 bits = Byte


10
Hexadecimal Number System
• Base = 16
• 16 digits { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, A, B, C, D, E, F }
256 16 1 1/16 1/256
• Weights 1 E 5 7 A
• Weight = (Base) Position
2 1 0 -1 -2
2 1 0 -1 -2
1 *16 +14 *16 +5 *16 +7 *16 +10 *16
• Magnitude
=(485.4765625)10
• Sum of “Digit x Weight”
(1E5.7A)16
• Formal Notation
11
Number System
• Number of combinations will start from ‘0’ to (r - 1)

Decimal Number system (radix (or) base is 10 )

Number of combinations 0, 1, 2, 3, 4, 5, ,6 7, 8, 9

Binary Number system (radix (or) base is 2)

Number of combinations 0, 1

Octal Number system (radix (or) base is 8 )

Number of combinations 0, 1, 2, 3, 4, 5, 6, 7

Hexa Decimal Number system (radix (or) base is 16 )

Number of combinations 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, A, B, C, D, E, F

Number system with radix 4

Number of combinations 0, 1, 2, 3
Decimal to Binary conversion
• (6 5 3 2)10

= 6x103 + 5x102 + 3x101 + 2x100

• 526.47 = 5 x 10 2 +2 x 10 1 + 6 x 10 0 + 4 x 10 -1 + 7 x 10 -2

• Example: Convert (43)10 to binary

Ans : (43)10 = (101011)2


Decimal to Binary conversion
Example: Convert (0.6875)10 to binary
Sol :
The process is continued until the fraction becomes 0 or until the number of
digits has sufficient accuracy.

0.6875 x 2 = 1.3750 1 (MSB)


0.3750 x 2 = 0.7500 0
0.7500 x 2 = 1.5000 1
0.5000 x 2 = 1.0000 1 (LSB)
Ans = (0. 1011) 2
Decimal to Binary conversion
• Example: Convert (43.6875)10 to binary

0.6875 x 2 = 1.3750 1 (MSB)


0.3750 x 2 = 0.7500 0
0.7500 x 2 = 1.5000 1
0.5000 x 2 = 1.0000 1 (LSB)

= (0. 1011) 2

(43.6875)10 = (101011.1011)2
Decimal to Binary conversion
• Convert the following numbers from base 10 to base 2
Ex : (172.878)10

Ans: (172.878)10 = (10101100.1110)2


Binary to Decimal conversion
• Ex: Convert binary to decimal (1001001100)2 → ( ? )10
• Using Expansion method, we
have- (1001001100)2
= 1 x 29 + 0 x 28 + 0 x 27 + 1 x 26 + 0 x 25 + 0 x 24 + 1 x 23 + 1 x 22 +
0 x 21 + 0 x 2 0
= 512 + 64 + 8 + 4
= (588)10
From here, (1001001100)2 = (588)10
Decimal to Octal
Ex : Convert the following numbers from base 10 to base 8
1) (172)10 2) (1032.6875)10

Ans = (254) 8 Ans: (2010.54)8


Octal to Decimal
• Example : Convert the (37246)8 to Decimal
Octal to Binary and Binary to Octal
• Octal to Binary
(376)8
= 3 7 6
= 011 111 110

(376)8 = (011111110)2

• Binary to octal
(10011010101)2 = 010 011 010 101
2 3 2 5
(10011010101)2 = (2325)8
Decimal to Hexadecimal
• Convert the following number from base 10 to base
16- (2020.65625)10

Ans = (2020.65625)10 = (7E4.A8)16


Hexadecimal to Decimal
Decimal to any radix
1) (229)10 → ( ? )5
From here, (229)10 = (1404)5

2) (3211)4 → ( ? )10

Expansion method, we have-


(3211)4
= 3 x 43 + 2 x 42 + 1 x 41 + 1 x 40
= 192 + 32 + 4 + 1
= (229)10
From here, (3211)4 = (229)10
Conversion from an Octal to Hexadecimal Number
and Vice Versa
• To convert an octal number into a hexadecimal number the following steps
are to be followed:

(i) First convert the octal number to its binary equivalent

(ii) Then form groups of 4 bits, starting from the LSB.

(iii) Then write the equivalent hexadecimal number for each group of 4 bits.

• Similarly, for converting a hexadecimal number into an octal number the


following steps are to be followed:

(i) First convert the hexadecimal number to its binary equivalent.

(ii) Then form groups of 3 bits, starting from the LSB.

(iii) Then write the equivalent octal number for each group of 3 bits.
Conversion from an Octal to Hexadecimal Number
and Vice Versa
•Example: Convert the following hexadecimal numbers into equivalent octal
numbers. (a) A72E (b) 4.BF85
Conversion from an Octal to Hexadecimal
Number and Vice Versa
Simple Rules
1. Decimal to any -------------> Divide the decimal number by the radix of
the number which we want to convert.
2. Any Number to Decimal -------------> Use expansion method. Multiply and add
the each position with powers of its radix.
3. Binary to octal -------------> Each number in octal should be converted to
3 bit binary.
4. Octal to binary -------------> Start from LSB and group three binary bit. If
required, add extra zeros to MSB to form a 3
5. Binary to Hex -------------> Each number in octal should be converted to
4 bit binary.
6. Hex to binary -------------> Start from LSB and group four binary bit. If
required, add extra zeros to MSB to form a 4
bit binary.
7. Octal to Hex and vice versa -------------> Octal to binary and then Hex.(OR) Hex to
binary and then octal
More Examples
More Examples
Example . Convert 1010.0112 into a decimal number.
Solution. The binary number given is 1 0 1 0. 0 1 1

Positional weights 3 2 1 0 ·1·2·3


The positional weights for each of the digits are w1itten in italics below each digit.
Hence the decimal equivalent number is given as:
1 X 23 +0 X 22 + 1 X 21 + 0 X 2° + 0 X 2' 1+ 1 X 2 2 + 1 X 2-3
= 8 + 0 + 2 + 0 + 0 + 0.25 + 0.125
= 10.37510'
Example . Convert 362.358 into a decimal numbe1:
Solution.The octal number given is 3 6 2. 3 5
Positional weights 2 1 0 ·1·2
The positional weights for each of the digits are w1itten in italics below each digit.
Hence the decimal equivalent number is given as:
3 X 82 + 6 X 81 + 2 X 8° +3 X 8"1 + 5 X 8 2
= 192 +48 + 2 + 0.375 + 0.078125
= 242.45312510'
More Examples
Ex a mp l e . Convert 42A.12 16 into a decimal number:
S o l u tion. The hexadecimal number given is 4 2 A. 1 2
Positional weights 2 1 0 -1-2
The positional weights for each of the digits are written i n italics below each
digit.
Hence the decimal4 Xequivalent
162 + 2 Xnumber is given
161 + 10 as:
X 16° + 1 X 16-1 + 1 16-2
X

= 1024 + 32 + 10 + 0.0625 + 0.00390625


= 1066.0664062510'

E x a mp l e Convert 1011010102 into an equivalent octal number.


Solution. The binary number given is 101101010
Starting with LSB and grouping 3 bits 101 101 010
Octal equivalent 5 5 2
Hence the octal equivalent number is (552)8 .
E x a mp l e .. Convert 10111102 into an equivalent octal number.
Solution. The binary number given is 1011110
Starting with LSB and grouping 3 bits 001 011 110
Octal equivalent 1 3 6
More Examples
More Examples
Binary System Operations
• The binary number system employs the numbers 0 and 1 only; therefore,
the possible combinations of binary addition are:
0+0 = 0 0+1 = 1 1+0 = 1 1 + 1 = 0 with a carry of 1
Complements of Numbers
Ones-Complement
• The ones-complement of a number can be found by replacing all zeros with
ones and all ones with zeros.
Example : Find the ones-complement of 1101100
1101100
Ans : 0010011
Example : Find the ones-complement of 0.1011
0.1011
Ans : 0.0100
Example : Find the ones-complement of 1101100.1011
1101100.1011
Ans : 0010011.0100
Complements of Numbers

• 2’s Complement = 1’S complement + adding ‘1’ in LSB

Example : Find the twos-complement of 1101100


1101100

1’s Complement - 0010011


Adding ‘1’ in LSB- 1

Ans: 0010100
Complements of Numbers
• 2’s Complement another method
The twos-complement of a number can be found by leaving all the least
significant zeros and the least significant one unchanged and then replacing
all zeros with ones and all ones with zeros in all the other digits.

Example : Find the twos-complement of 1101100

Sol :

Starting from the right side of the given number we leave 100 unchanged
and then for the remaining digits, i.e, 1101 we replace the ones with zeros
and the zero with one. Therefore, the twos-complement of 1101100 is
0010100 .
Addition
• Decimal Addition

1 1 Carry
5 5
+ 5 5

1 1 0
= Ten ≥ Base
 Subtract a
Base
37
Binary Addition
• Column Addition

1 1 1 1 1 1
1 1 1 1 0 1 = 61
+ 1 0 1 1 1 = 23

1 0 1 0 1 0 0 = 84

≥ (2)10

38
Binary Subtraction
• Borrow a “Base” when needed
1 2 = (10)2
0 2 2 0 0 2
1 0 0 1 1 0 1 = 77
− 1 0 1 1 1 = 23

0 1 1 0 1 1 0 = 54

39
Binary Subtraction
• More Examples:
• A = 11001 and B = 10111 Solution: 00010

• A =11001010 and B =10011011 Solution: 00101111


Binary Multiplication
• Bit by bit
1 0 1 1 1
x 1 0 1 0
0 0 0 0 0
1 0 1 1 1
0 0 0 0 0
1 0 1 1 1

1 1 1 0 0 1 1 0 41
Number Base Conversions
Evaluate
Magnitude
Octal
(Base 8)

Evaluate
Magnitude
Decimal Binary
(Base 10) (Base 2)

Hexadecimal
Evaluate (Base 16) 42

Magnitude
Boolean Algebra
• George Boole introduced algebraic formulas to design and analyze the
digital circuits. This is called Boolean algebra.
Boolean Algebra
• Rules

1. If X = 0 , then X = 1 , and vice-versa.

2. 0 ⋅ 0 = 0

3. 0 ⋅ 1 =0 1⋅0=0

4. 1 ⋅ 1 = 1

5. 0 + 0 = 0

6. 0 + 1 =1 1+0=1

7. 1 + 1 = 1
Theorems & Properties
Theorems
of Boolean Algebra
1. Commutative laws

a. A ⋅ B = B ⋅ A

b. A + B = B + A

2. Associative laws

a. ( A ⋅ B ) ⋅ C = A ⋅ ( B ⋅ C )

b. ( A + B ) + C = A + ( B + C )

3. Distributive laws

a. A ⋅ ( B + C ) = A ⋅ B + A ⋅ C

b. A + ( B ⋅ C ) = ( A + B ) ⋅ ( A + C )
4. Identity laws a. A ⋅ A = A
b. A + A = A
5. Negation laws
a. ( A ) = A
b. ( A ) = A = A
6. Redundancy laws
a. A⋅(A+B)=A
b. A + ( A ⋅ B ) = A 7.
a.0 ⋅ A = 0
b. 1 ⋅ A = A
c.0 + A = A
d. 1 + A = 1
8.
a. A⋅A=0
b. A + A = 1 9.
a. A ⋅ ( A + B ) = A ⋅ B
b. A + ( A ⋅ B ) = A + B
10. DeMorgan’s theorems
a. (A ⋅ B)'= A' + B'
b. (A + B)'= (A' ⋅ B')
Example: Reduce the following Expression:

Example: Reduce the following Expression:


Logic Gates
Basic Gates
AND gate
Basic Gates
Basic Gates
OR Gate
Basic Gates
Other Gates
Other Gates
Other Gates
Other Gates
Universal Gates
• NAND and NOR gates are also known as universal gates as all other gates
can be derived from them.
Universal Gates
Universal Gates
Universal Gates
Minterms
Maxterms
Conversion from One Standard Form to Another
Properties of Minterms and Maxterms

aBoolean
Problems
Problems
Sum of Product (SOP) Form
• A sum-of-products form can be formed by adding (or summing) two or more
product terms using a Boolean addition operation. Here the product terms
are defined by using the AND operation and the sum term is defined by
using OR operation.

• Examples
AB + ABC + CDE
(AB) ‘ + ABC + CD E ‘
Sum of Product (SOP)
Note:
Form
• SOP form can be obtained by Writing an AND term for each input
combination, which produces HIGH output.
• Writing the input variables if the value is 1, and write the complement of the
variable if its value is 0.
• OR the AND terms to obtain the output function.
Product of Sums (POS) Form
• Here the sum terms are defined by using the OR operation and the product
term is defined by using AND operation. When two or more sum terms are
multiplied by a Boolean OR operation, the resultant output expression will
be in the form of product-of-sums form or POS form.

• Examples
(A+B) * (A + B + C) * (C +D)
(A+B)’ * (C + D + E’)
Karnaugh maps
Karnaugh Maps (K maps)
• Rules of simplification for K-Map
Karnaugh Maps (K maps)
Rules of simplification for K-Map
Karnaugh Maps (K maps)
Rules of simplification for K-Map
Karnaugh Maps (K maps)
Rules of simplification for K-Map
Karnaugh Maps (K maps)
2-variable Karnaugh maps are trivial but can be used to introduce
the methods you need to learn. The map for a 2-input OR gate
looks like this:
A
0 1
B
A
Y 0 1
B A
1 1 1
A B Y
0 0 0
0 1 1
B
1 0 1
1 1 1
A+B
Guidelines for Simplifying Functions
• Each square on a K-map of n variables has n logically adjacent squares. (i.e.
differing in exactly one variable)
• When combing squares, always group in powers of 2m , where m=0,1,2,….
• In general, grouping 2m variables eliminates m variables.
• Group as many squares as possible. This eliminates the most
variables.
• Make as few groups as possible. Each group represents a separate
product term.
• You must cover each minterm at least once. However, it may be
covered more than once.
• K MAP Examples
• Simplify the following Boolean equation using K-map
K MAP Examples
K MAP Examples
K MAP Examples
K MAP Examples
K-Map Examples
xamples
K-Map with Don't care's


K-Map with Don’t care’s
Plotting Functions on the
K-map

POS Form
PoS Optimization from SoP
F(W,X,Y,Z)= Σm(0,1,2,5,8,9,10)
= ∏ M(3,4,6,7,11,12,13,14,15)

0 F(W,X,Y,Z)= (W’ + X’)(Y’ + Z’)(X’ + Z)


0 0 0 Or,
0 0 0 0
F(W,X,Y,Z)= X’Y’ + X’Z’ + W’Y’Z

0 Which one is the minimal one?

109

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy