Download as pdf or txt
Download as pdf or txt
You are on page 1of 106

Digital Electronics & Logic Design

(EC 104)

Dr. Vivek Garg


Department of Electronics Engineering
S. V. National Institute of Technology (SVNIT)
Surat

email: vivekg@eced.svnit.ac.in; vivekgarg0101@gmail.com


Course Outline

1/2/2024 2
Course Outline

1/2/2024 3
Course Text and Materials

1/2/2024 4
Digital Logic Circuits
Shift Registers

• An array of flip flop is used to store a group of bits.


• To store n bits, n flip flops are cascaded.
• Types: 1. Based on input and outputs
Serial In Serial Out
Serial in Parallel Out
Parallel in Serial Out
Parallel in Parallel Out
2. Based on application
Shift Register
Storage Register

1/2/2024 5
Digital Logic Circuits
Serial In Serial Out

• For n bit storage n clock pulse is required.


• It provides n clock pulse delay
• To get n bit serial out, n-1 clock pulses are required.

1/2/2024 6
Digital Logic Circuits
Serial In Serial Out

1/2/2024 7
Digital Logic Circuits
Serial In Serial Out

1/2/2024 8
Digital Logic Circuits
Serial In Serial Out

1/2/2024 9
Digital Logic Circuits
Serial In Parallel Out

• For n bit storage n clock pulse is required.


• For Parallel output, it requires 0 clock pulses.
• It is used as serial to parallel convertor

1/2/2024 10
Digital Logic Circuits
Serial In Parallel Out

1/2/2024 11
Digital Logic Circuits
Parallel In Parallel Out

1/2/2024 12
Digital Logic Circuits
Parallel In Serial Out

1/2/2024 13
Digital Logic Circuits
Parallel/Serial Input and Serial Output

1/2/2024 14
Digital Logic Circuits
Bi-Directional Shift Registers

1/2/2024 15
Digital Logic Circuits
Universal Shift Registers

1/2/2024 16
Digital Logic Circuits
Shift Registers : Time Delay

1/2/2024 17
Digital Logic Circuits
Shift Registers : Time Delay

1/2/2024 18
Digital Logic Circuits
Counters
• Used to count number of clock pulse is applied.
• Frequency divider
• Time/Frequency measurement
• Pulse Width
• Waveform Generator
• With ‘n’ FF, maximum possible stages are 2n.
• Types of counters: (Based on the wav of clock pulse is applied):
a) Asynchronous
b) Synchronous

1/2/2024 19
Digital Logic Circuits
Asynchronous

1/2/2024 20
Digital Logic Circuits
Synchronous

1/2/2024 21
Digital Logic Circuits
Ripple/Asynchronous/Serial Counter

1/2/2024 22
Digital Logic Circuits
Ripple/Asynchronous/Serial Counter

• For given modulus value, number of flip flops required:

1/2/2024 23
Digital Logic Circuits
Ripple/Asynchronous/Serial Counter

1/2/2024 24
Digital Logic Circuits
Ripple/Asynchronous/Serial Counter
2 Bit Negative Edge Triggered UP Counter

1/2/2024 25
Digital Logic Circuits
Ripple/Asynchronous/Serial Counter
3 Bit Negative Edge Triggered UP Counter

1/2/2024 26
Digital Logic Circuits
Ripple/Asynchronous/Serial Counter
2 Bit Negative Edge Triggered Down Counter

1/2/2024 27
Digital Logic Circuits
Ripple/Asynchronous/Serial Counter
3 Bit Negative Edge Triggered Down Counter

1/2/2024 28
Digital Logic Circuits
Ripple/Asynchronous/Serial Counter (UP/Down Counter)

1/2/2024 29
Digital Logic Circuits
Ripple/Asynchronous/Serial Counter
2 Bit Positive Edge Triggered Up Counter

1/2/2024 30
Digital Logic Circuits
Ripple/Asynchronous/Serial Counter
2 Bit Positive Edge Triggered Down Counter

1/2/2024 31
Digital Logic Circuits
Ripple/Asynchronous/Serial Counter
2 Bit Positive Edge Triggered UP/Down Counter

1/2/2024 32
Digital Logic Circuits
Ripple/Asynchronous/Serial Counter
Mod 6 Counter Design

1/2/2024 33
Digital Logic Circuits
Ripple/Asynchronous/Serial Counter
Mod 10 Asynchronous Counter Design

1/2/2024 34
Digital Logic Circuits
Synchronous Counter
4 Bit UP Counter Design

1/2/2024 35
Digital Logic Circuits
Synchronous Counter
4 Bit Down Counter Design

1/2/2024 36
Digital Logic Circuits
Ripple/Asynchronous/Serial Counter
4 Bit UP/Down Counter Design

1/2/2024 37
Digital Logic Circuits
Ripple/Asynchronous/Serial Counter

1/2/2024 38
Digital Logic Circuits

1/2/2024 39
Digital Logic Circuits

1/2/2024 40
Digital Logic Circuits

Sequential circuit analysis

• Behavior of the sequential circuit is determined from the i/ps, o/ps


and present state of the circuit.
• O/ps and next state function of i/ps and the present state.
• Analysis: Obtain proper description of the time sequence of i/ps,
o/ps and states.
– State table or state diagram
– Or Boolean expressions (time sequence must be included
directly or indirectly)

1/2/2024 41
Digital Logic Circuits
State Table

Mealy Model circuits: O/p depends on the i/ps as well as the present state

Moore Model circuits: O/p depends on the present state only. One dimensional
state table is enough.
1/2/2024 42
Digital Logic Circuits
State Table, Diagram, and Equations

1/2/2024 43
Digital Logic Circuits
State Table, Diagram, and Equations

1/2/2024 44
Digital Logic Circuits

State Reduction
• Any design process must consider the problem of minimizing
the cost of the final circuit.
• Cost reductions: Reductions in the number of FFs and gates.
• Reduction of number of FFs in sequential circuits: state
reduction (m FFs: 2m states)
• State reduction algorithms concerned with the reduction of
number of states in the state table keeping the external i/p and
o/p requirements unchanged.

1/2/2024 45
Digital Logic Circuits
State Reduction

• Only in the i/p and o/p sequences are


important.
• Internal states are used merely to
provide the required sequences and
hence represented by alphabets
instead of binary values (as you will
see in counters).

• Consider the i/p sequence:


01010110100 starting from initial
state ‘a’

1/2/2024 46
Digital Logic Circuits
State Reduction

• Two states are


equivalent if for each
i/p, they give exactly
the same o/p and send
the circuit either to the
same state or to an
equivalent state.
1/2/2024 47
Digital Logic Circuits

1/2/2024 48
Digital Logic Circuits

1/2/2024 49
Digital Logic Circuits

Excitation Table

1/2/2024 50
Digital Logic Circuits
Sequential Circuit Design
• Starts with specification and ends with the logic diagram or set of
Boolean functions from which the logic diagram can be obtained.
• A combinational circuit could be fully specified by a truth table.
• A sequential circuit requires a state table or a state diagram.
• The design involves
• Choosing the FF
• Finding a combination circuit which along with the FFs fulfills the
specifications.
• n FFs can represent 2n states.
• Combination circuit derived from the state table by finding- FF i/p
and o/p equations.
• After assignment of states by binary combinations, a sequential
problem translates to combinational problem.

1/2/2024 51
Digital Logic Circuits
Sequential Circuit Design
• Specification
• Formulations: State diagram or State table.
• State reduction if sequential circuit characterized by the i/p-o/p relationships
independent of the number of states.
• State Assignment: Assign binary codes to the states in the table.
• Determine the number of FFs needed and assign a letter symbol
• Choose the type of FF. (SR or D for transfer of data, T for applications
involving complementation (binary counters) and JK for general applications.)
• From the state table, derive the circuit excitation and output tables.
• Using the map or any other simplification method, derive the circuit output
functions and FF i/p functions.
• Draw the logic diagram.
1/2/2024 52
Digital Logic Circuits

1/2/2024 53
Digital Logic Circuits

1/2/2024 54
Digital Logic Circuits

1/2/2024 55
Digital Logic Circuits
Design with unused states

1/2/2024 56
Digital Logic Circuits

1/2/2024 57
Digital Logic Circuits

1/2/2024 58
Digital Logic Circuits

1/2/2024 59
Digital Logic Circuits

Unused States

1/2/2024 60
Digital Logic Circuits

1/2/2024 61
Digital Logic Circuits
State Diagram

1/2/2024 62
Digital Logic Circuits

1/2/2024 63
Digital Logic Circuits

1/2/2024 64
Digital Logic Circuits
MOD 6 Counter

1/2/2024 65
Digital Logic Circuits
MOD 6 Counter

1/2/2024 66
Digital Logic Circuits
MOD 6 Counter

1/2/2024 67
Digital Logic Circuits
3 Bit UP Counter

1/2/2024 68
Digital Logic Circuits
3 Bit UP Counter

1/2/2024 69
Digital Logic Circuits
3 Bit Down Counter

1/2/2024 70
Digital Logic Circuits
3 Bit Down Counter

1/2/2024 71
Digital Logic Circuits

1/2/2024 72
Digital Logic Circuits

1/2/2024 73
Digital Logic Circuits
Check for lockout

1/2/2024 74
Digital Logic Circuits
Check for lockout

1/2/2024 75
Digital Logic Circuits
Check for lockout

1/2/2024 76
Digital Logic Circuits

1/2/2024 77
Digital Logic Circuits

1/2/2024 78
Digital Logic Circuits
Ring Counter

1/2/2024 79
Digital Logic Circuits
Ring Counter

1/2/2024 80
Digital Logic Circuits
Ring Counter

• Only one FF is high in a clock pulse


• A n-bit ring counter circulates a single
bit among the FFs to provide n
distinguishable states.
• Output Frequency: fo = f/n
• Number of unused states: 2n-n
• For decoding no logic gate is required.

1/2/2024 81
Digital Logic Circuits
Johnson Counter or Twisted Ring Counter

• A n-bit Johnson counter


circulates a single bit
among the FFs to provide
2n distinguishable states.
• For decoding two input
AND/NOR gate is used

1/2/2024 82
Digital Logic Circuits

1/2/2024 83
Digital Logic Circuits

• A switch-tail ring counter is a circular shift register with the complement


output of the last FF connected to the input of the first FF.
• The number of states can be doubled if the shift register is connected as a
switch-tail ring counter.
• Sequence of eight states (4-bit switch-tail Ring counter).
• Total number of unused states: 2n-2n
• Also called as mobies counter, creeping counter, walking counter, and
switch tail counter
• fo = f/2n
• Disadvantage: lock out may occur when counter entered into to unused
states.

1/2/2024 84
Digital Logic Circuits
Problems:

1.

1/2/2024 85
Digital Logic Circuits
Problems:

1.

1/2/2024 86
Digital Logic Circuits
Problems:

2. Draw state diagram of the circuit given below:

1/2/2024 87
Digital Logic Circuits
Problems:

2. Draw state diagram of the circuit given below:

1/2/2024 88
Digital Logic Circuits
Problems:

3.

1/2/2024 89
Digital Logic Circuits
Problems:
4.

1/2/2024 90
Digital Logic Circuits
Problems:
4.

1/2/2024 91
Digital Logic Circuits
Problems:
5.

1/2/2024 92
Digital Logic Circuits
Problems:
6.

1/2/2024 93
Digital Logic Circuits
Problems:
7.

1/2/2024 94
Digital Logic Circuits
Problems:
8.

1/2/2024 95
Digital Logic Circuits
Problems:
8.

1/2/2024 96
Digital Logic Circuits
Problems:
9. Assuming initial state as 000, what should be the output for next 4 clocks?

1/2/2024 97
Digital Logic Circuits

Number Systems

Depending on the base or radix, number systems can be classified into the
following four major types −

• Decimal
• Binary
• Octal
• Hexadecimal

1/2/2024 98
Digital Logic Circuits

Number Systems

Depending on the base or radix, number systems can be classified into the
following four major types −

1/2/2024 99
Digital Logic Circuits
Number Systems

Conversion of one number system to other:


• Decimal to others

a) 87 : 1010111

b) 25.625 :

1/2/2024 100
Digital Logic Circuits
Number Systems

Conversion of one number system to other:


• Decimal to others

a). (43)10 : ( )16, ( )2


b). (187)10 : ( )2
c) Convert binary 111111110010 to hexadecimal.
d) Convert the binary number 1001.00102 to decimal.

1/2/2024 101
Digital Logic Circuits
Number Systems

Conversion of one number system to other:


• Decimal to others

a). (43)10 : ( )16, ( )2 2B, 0100 0011


b). (187)10 : ( )2 10111011

c) Convert binary 111111110010 to hexadecimal. FF2

d) Convert the binary number 1001.00102 to decimal. 9.125

1/2/2024 102
Digital Logic Circuits
Number Systems
Conversion of one number system to other:
• Others to decimal

1/2/2024 103
Digital Logic Circuits
Number Systems
Conversion of one number system to other:
• Octal to binary and binary to octal

1/2/2024 104
Digital Logic Circuits
Number Systems
Conversion of one number system to other:
• Hexadecimal to binary and binary to Hexadecimal

1/2/2024 105
Digital Logic Circuits
Arithmetic Operations
• Binary

• Octal

• Hexadecimal

1/2/2024 106

You might also like