Digital Electronic Notes
Digital Electronic Notes
1. 1. Introduction
Digital electronics is a type of electronics that deals with the digital systems which processes
the data/information in the form of binary(0s and 1s) numbers, whereas analog electronics deals
with the analog systems which processes the data/information in the form of continuous signals.
Continuous signals
A Continuous signal is function f(t), whose value is defined for all time 't'.
in other words
Continuous signal a varying quantity with respect to independent variable time.
Example: Figure 1.1(a) shows the continuous signal.
Digital signals
A digital signal is a quantized discrete time signals.
Example: Figure 1.1(b) shows the discrete and digital signals.
1. Positive logic
Logic 0 = False, 0V, Open Switch, OFF
Logic 1= True, +5V, Closed Switch, ON
2. Negative logic
Logic 0 = True, +5V, Closed Switch, ON
Logic 1= False, 0V, Open Switch, OFF
Boolean algebra differs from normal or elementary algebra. Latter deals with numerical
operations such as, addition, subtraction, multiplication and division on decimal numbers. And
former deals with the logical operations such as conjunction (OR), disjunction(AND) and
negation(NOT).
In present context, positive logic has been used for the entire discussion, representation and
simplification of Boolean variables.
1. Boolean variables takes only two values, logic 1 and logic 0, called binary numbers.
2. Basic operations of Boolean algebra are complement of a variable, ORing and ANDing of two
or more variables.
3. Mathematical description of Boolean operations using variables is called Boolean expression.
4. Complement of variable is represented by an over-bar (-).
Example: 𝑌 = 𝐴̅, Y is the output variable
5. ORing of variables is represented by a plus symbol (+) Example:𝑌 = 𝐴 + 𝐵, Y is the output
variable
6. ANDing of variables is represented by a dot symbol (.)
Example:𝑌 = 𝐴. 𝐵, Y is the output variable
7. Boolean operations are different from binary operations. Example : 1+1=10 in Binary
Addition 1+1=1 in Boolean algebra.
Table 1.1, shows the complement operation of a variable, table 1.2 summarized the OR
operation and table 1.3, summarized the AND operation of two variables.
A 𝒀 = 𝑨̅
0 1
1 0
A B Y=A+B
0 0 0
0 1 1
1 0 1
1 1 1
Table 1.2: OR operation on A and B
A B Y=A.B
0 0 0
0 1 0
1 0 0
1 1 1
i. e. , A. B = B. A and A + B = B + A
𝐴. (𝐵 + 𝐶) = 𝐴. 𝐵 + 𝐴. 𝐶
𝐴 + 𝐵𝐶 = (𝐴 + 𝐵)(𝐴 + 𝐶)
Law-5: OR Laws
𝐴+0=𝐴
𝐴+1=1
𝐴+𝐴=𝐴
𝐴 + 𝐴̅ = 1
0̅ = 1
1̅ = 0
̅
𝐴̅ = 𝐴
Law-7: Absorption Law
𝑨(𝑨 + 𝑩) = 𝑨
𝑨 + 𝑨𝑩 = 𝑨
𝑨 + 𝑨̅𝑩 = 𝑨 + 𝑩
A B C 𝑨̅̅+̅̅𝑩̅̅+̅̅𝑪̅ 𝑨̅.𝑩̅. 𝑪̅
0 0 0 1 1
0 0 1 0 0
0 1 0 0 0
0 1 1 0 0
1 0 0 0 0
1 0 1 0 0
1 1 0 0 0
1 1 1 0 0
Table 1.4: De-Morgan's First Law
A B C ̅𝑨̅.̅𝑩̅.̅𝑪̅ A̅ + B̅ + C̅
0 0 0 1 1
0 0 1 1 1
0 1 0 1 1
0 1 1 1 1
1 0 0 1 1
1 0 1 1 1
1 1 0 1 1
1 1 1 0 0
Table 1.5: De-Morgan's Second Law
Boolean expressions must be simplified and evaluated using the order of operator precedence
shown in table 1.6
Example:
̅ ̅ ̅̅ ̅ ̅̅ ̅ ̅ ̅̅̅ ̅
𝒀 = (𝑨 (𝑪⏟ + 𝑩⏟⏟̅ 𝑫 ) + 𝑩 ⏟ 𝑪⏟̅ ) 𝑬̅
𝐘=𝐀+𝐁+𝐂+𝐃+𝐄
3. 𝐘 = 𝐂 + ̅𝐁𝐂̅̅
Solution:
Y = C + B̅ + C̅ Y = (C + C̅ ) + B̅ Y = 1 + B̅
𝐘=𝟏
5. 𝐘 = (𝐀 + 𝐂)(𝐀𝐃 + 𝐀𝐃̅) + 𝐀𝐂 + 𝐂
Solution:
Y = (A + C)(A(D + D̅)) + AC + C Y = (A + C)(A)(1) + AC + C
Y = AA + AC + AC + C Y = A + AC + C Y = A(1 + C) + C
𝐘=𝐀+𝐂
̅ ̅̅ ̅ ̅̅ ̅ ̅ ̅̅ ̅̅ ̅
7. 𝐘 = ̅𝐀̅+̅
̅ 𝐁̅𝐂̅+̅𝐃̅(̅𝐄+̅̅ 𝐅̅)
Solution:
̅ ̅ ̅ ̅ ̅
Y = (̅̅A̅̅ +̅̅B̅̅ C̅̅ )̅ ( D̅̅ (̅̅E̅̅ +̅̅F̅̅ )̅) Y = (A + BC̅ )( D̅ + (̅̅E̅̅ +̅̅F̅̅ )
𝐘 = (𝐀 + 𝐁𝐂̅)( 𝐃̅ + 𝐄 + 𝐅̅)
8. 𝐘 = 𝐀𝐁 + 𝐀(𝐁 + 𝐂) + 𝐁(𝐁 + 𝐂)
Solution:
Y = AB + AB + AC + BB + BC Y = AB + AC + B + BC Y = AB
+ AC + B(1 + C) Y = AB + AC + B Y = B(A + 1) + AC
𝐘 = 𝐁 + 𝐀𝐂
Logic gate is the basic building block of any digital circuits. The logic gates may have one or
more inputs and only one output. The relationship between input and output is based on a
certain logic, which is same as Boolean operations, such as AND, OR and NOT.
Based on the Boolean operations, the gates are named as AND gate, OR gate and NOT gate.
These three gates are called basic gates, and some more gates can be derived by using the basic
gates, they are named as NAND gate, NOR gate, EXOR gate and XNOR gate. NAND and NOR
gates are called universal gates, because by using only the NAND gates /NOR gates we can
realize all basic gates even all Boolean expression.
Logic gates, its truth table, expression and symbols are summarized in the table 1.7 as follows.
AND Gate
1
Inputs Output
A B 𝒀 = 𝑨. 𝑩
0 0 0
0 1 0
1 0 0
1 1 1
0 0 0
0 1 1
1 0 1
1 1 1
NOT Gate
3 Inputs Output
A 𝒀 = 𝑨̅
0 1
1 0
A B Y
4
0 0 1
0 1 1
1 0 1
NOR Gate 1Inputs 1 0
Output
A B Y
5
0 0 1
0 1 0
1 0 0
EX-OR Gate
1Inputs 1 0
Output
A B Y
6
0 0 0
0 1 1
1 0 1
EX-NOR Gate 1Inputs 1 0
Output
A B Y
7
0 0 1
0 1 0
1 0 0
1 1 1
Y = AB + BC + AC
Logic diagram
1.3.2. Realize the following Boolean expression using only NAND gates.
Y = AB + BC + AC
Logic diagram
Step-1: Replace basic gates by NAND equivalents
Step-2: Eliminate two single input NAND gates are connected in series.
The relationship between Boolean variables and output variable is called Boolean expression, the
Boolean expressions can be represented in two different forms, they are,
1. Sum of Products (SOP) form and
2. Product of Sums (POS) form
The Boolean Expressions in which the product of input variables are summed together for output
high.
Example: Consider a truth table shown in table 1.8.
A B C Y
0 0 0 0
0 0 1 1
0 1 0 1
0 1 1 0
1 0 0 1
1 0 1 1
1 1 0 0
1 1 1 1
Table 1.8: Truth table
Expression (1) is a standard or canonical sum of product form, which is directly derived from the
truth table.
Expression (2) is the simplified form of canonical SOP form called, minimal SOP form.
NOTE:
1. Canonical SOP form to minimal SOP form and vice versa can also be derived using truth table.
2. Each product terms of SOP form is called minterms.
3. Canonical SOP form of Boolean expressions can also be written using decimal equivalent of input
variables for the output high.
Example: for the Boolean expression (1), the output is high for ABC=001, ABC=010 ABC=100,
ABC=101 and ABC=111.
The decimal equivalent of ABC=001 is '1', ABC=010 is '2', ABC=100 is '4', ABC=101 is '5' and
ABC=111 is '7'
Therefore, Y can also be expressed as
Y(A, B, C) = (m1,m2,m4,m5,m7)
Y(A, B, C)
Problem: Refer the truth table shown in table 1.9., write the Boolean expression in canonical
SOP form and minimal SOP form. Also write the different ways of writing canonical SOP form.
A B C Y
0 0 0 0
0 0 1 1
0 1 0 1
0 1 1 0
1 0 0 0
Success Bridge Page 14
1 0 1 1
1 1 0 1
1 1 1 1
The Boolean Expressions in which the Sum of input variables are multiplied together for output
low.
Example: Consider a truth table shown in table 1.9.
A B C Y
0 0 0 0
0 0 1 1
0 1 0 1
0 1 1 0
1 0 0 1
1 0 1 1
1 1 0 0
1 1 1 1
Expression (1) is a standard or canonical Products of sum form, which is directly derived from the
truth table.
Expression (2) is the simplified form of canonical POS form called, minimal POS form.
NOTE:
1. Canonical POS form to minimal POS form and vice versa can also be derived using truth table.
2. Each Sum terms of POS form is called maxterm.
3. Canonical POS form of Boolean expressions can also be written using decimal equivalent of input
variables for the output high.
Example: for the Boolean expression (1), the output is low for ABC=000, ABC=011 and
ABC=110.
The decimal equivalent of ABC=000 is '0', ABC=011 is '3', and ABC=110 is '6'
Therefore, Y can also be expressed as
Y(A, B, C) = (M0,M3,M6) OR
Y(A, B, C) = ∏ M(0,3,6)
Problem: Refer the truth table shown in table 1.9., write the Boolean expression in canonical
POS form and minimal POS form. Also write the different ways of writing canonical SOP form.
A B C Y
0 0 0 0
0 0 1 1
0 1 0 1
0 1 1 0
The simplification of Boolean expressions using Boolean algebraic rules is not unique and
most of the cases, the resultant expression is not in minimal form. In order to get the uniqueness
and final minimal form, K-map technique will be used. In the following section, the introduction to
K-maps, grouping of variables and simplification procedures are discussed with examples.
NOTE:
Number of cells in K-map = number of possible cases
No. of possible cases=2𝑁
N is the number of input variables.
NOTE: K-maps can take wither POS form or SOP form, in SOP form 1's are need to be grouped
and in POS form 0's are need to be grouped.
NOTE: Only adjacent cells will be considered for grouping, diagonal cells should not be grouped.
NOTE: grouping can be done using 2 variables, 4 variables, 8 variables, 16 variables etc..,
highest priority for grouping maximum variables in the above denomination. Variables are 0's
for POS form and 1's for SOP form.
Procedure:
1. Select the number of cells according to the number of input variables.
Example:
Simplify the following canonical SOP form of Boolean expression using K-map technique. Y(A,
B, C,D) = ∑ m(0,2,3,4,6,9,11,13,15)
******
1. SR Latch:
In flip-flops, storing of ‘1’ is called Set and storing of ‘0’ is called Reset, hence the name SR
latch. i.e., Set and Reset Latch. Figure (4) Shows the NOR gate realization of SR latch.
Characteristic table:
Inputs Output
Qn S R Qn+1
0 0 0 0
0 0 1 0
0 1 0 1
0 1 1 X
1 0 0 1
1 0 1 0
1 1 0 1
1 1 1 X
Excitation table:
Inputs Outputs
Qn Qn+1 S 𝑹
0 0 0 X
0 1 1 0
1 0 0 1
1 1 X 0
Equations (4) and (5) represents the Boolean equation or algebraic description of the
excitations (input values) in terms in terms of the desired state.
2. ̅𝑺𝑹̅ Latch
Figure (6) Shows the NAND gate realization of SR latch.
In the Figure (6), S and R are Set and Reset inputs respectively, G1 and G2 are NAND gates,
Q and 𝑄̅ are output lines.
The circuit can be analyzed with the following cases.
Case (i): If 𝑆̅ = 0, and 𝑅̅ = 1.
As we know that, output of NAND gate is always ‘1’ if any one input is ‘0’, So if 𝑆̅ = 0,
output of G1 is ‘1’ irrespective of other input i.e., 𝑄 = 1 and output of G1 is one of the input for
G2.
Now, G2 takes the values 𝑅̅ = 1. and 𝑄 = 1, therefore, 𝑄̅ = 0. This operation is called Set.
With the same reset state, let us consider 𝑆̅ = 1 and 𝑅̅ = 1.
𝑆̅ = 1 and previous output 𝑄̅ = 0 are the inputs for G1 and the output of G1 is 1, i.e., 𝑄 = 1
similarly, 𝑅̅ = 1 and Q=1 are the input for G2 and the output of G2 is 1, i.e., 𝑄̅ = 0. From the
discussion, it has been observed that, for the values of 𝑅̅ = 𝑆̅ = 1, the 𝑆̅𝑅̅ latch retains the
previous data. This operation is memory (storing of binary symbol ‘1’).
Table 5: Truth table of 𝑆̅𝑅̅ Latch Table 5: Function table of 𝑆̅𝑅̅ Latch
Characteristic table:
Qn ̅𝑺 𝑹̅ Qn+1
0 0 0 X
0 0 1 1
0 1 0 0
0 1 1 0
1 0 0 X
1 0 1 1
1 1 0 0
1 1 1 1
Table 6: Characteristic table of 𝑆̅𝑅̅ Latch Excitation
table:
Inputs Outputs
Qn Qn+1 ̅𝑺 𝑹̅
0 0 1 X
0 1 0 1
1 0 1 0
1 1 X 1
3. Gated SR Latch
In normal SR and 𝑆̅𝑅̅ latches outputs will change immediately just after the change in
input values. It is frequently desirable to avoid change in input values from affecting the state of
the latch immediately. In order to allow the input changes to be effective only during a prescribed
period of time, an enable signal is introduced. SR latch with enable is called gated SR latch or
clocked latch or controlled latch.
In the following section gated 𝑆̅𝑅̅ is discussed. An enable input can be introduced by two
additional NAND gates with a control input ‘C’, shown in figure (7).
In the figure (8), G1 and G2 are two additional NAND gates connected to introduce control
input/enable input. Cross coupling of G3 and G4 forms a 𝑆̅𝑅.̅ The inputs to the 𝑆̅𝑅̅ latch are
denoted as S* and R*, and these values depends on SR and enable input signal.
The gated SR latch arrangement shown in figure (7) can be analyzed with the following cases
as follows. Before that, make a note of the expressions for S* and R*
𝑆∗ = ̅𝑆̅.̅𝐸𝑛̅̅ => 𝑆̅ + ̅𝐸𝑛̅̅ − − − (6)
𝑅∗ = ̅𝑅̅.̅𝐸𝑛̅̅ => 𝑅̅ + ̅𝐸𝑛̅̅ − − − (7)
Table (8 & 9) shows the truth table/function table of gated SR which summarizes the
operations gated SR latch in two different methods. Table (10) shows the characteristic table of
gated SR latch and Table (11) shows the excitation table.
Characteristic table: Tabular form of generation of output from present input and previous
output is called characteristic table.
Excitation table: Tabular form of finding inputs to change present state to required next state is
called excitation table. Present state is denoted as Qn and next state is denoted as Qn+1.
1 0 1 0 1 0 1
Forbidden
1 1 0 1 1 1
(NOT USED)
1 Forbidd
1 1
USED)
Table 8: Truth Table of Gated SR latch Table 9: Function Table of Gated SR latch
Characteristic table:
Inputs Output
Qn 𝑺 𝑹 Qn+1
0 0 0 0
0 0 1 0
Success Bridge Page 30
0 1 0 1
0 1 1 X
1 0 0 1
1 0 1 0
1 1 0 1
1 1 1 X
K-map simplification
Equation (8) is called characteristic equations, which is the Boolean equation or algebraic
description of the next state of a flip-flop in terms of present inputs and previous outputs.
Excitation table:
Inputs Outputs
Qn Qn+1 𝑺 𝑹
0 0 0 X
0 1 1 0
1 0 0 1
1 1 X 0
4. Gated D Latch
All input combinations of the above latches are not recommended, in gated latch, only
specific input combinations are considered. In particular, the non-control inputs S and R are
Table 12: Truth Table of Gated D latch Table 13: Function Table of Gated D latch
Characteristic table:
Inputs Output
Qn D Qn+1
0 0 0
0 1 1
1 0 0
1 1 1
𝑄𝑛+1 = 𝐷 − − − (9)
Equation (9) is called characteristic equations, which is the Boolean equation or algebraic
description of the next state of a flip-flop in terms of present inputs and previous outputs.
Excitation table:
Inputs Outputs
Qn Qn+1 𝑫
0 0 0
0 1 1
1 0 0
1 1 1
Success Bridge Page 33
Table 15: Excitation Table of Gated D latch
Latch Flip-Flop
The enable input is not a clock The enable input is a clock
Sensitive to the level Sensitive to the edge
Level triggered Pulse and Edge triggered
Immediate output response Output change occurs in accordance with
within the propagation delays changes in a control line.
Table 16: Difference between Latch and Flip-Flop Clock
signal or clock pulse:
Clock pulse is a continuous, precisely spaced changes in amplitude (voltage) levels. It decides
the time of the input applied to the system. Basically clock pulses are in the form of square wave
with 50% duty cycle. Figure () shows the 50% duty cycle clock pulse, which is used to
synchronize the operations of sequential digital circuits.
Duty cycle of clock pulse is the ratio of ON time to total time. In the figure () ON time and OFF
time are mentioned for reference.
For further analysis, ideal clocks are considered for simplifying the analysis.
Figure (16) shows the timing diagram of SR latch. Timing diagram is a graph that depicts the
input and output transitions of a flip-flop or a latch as a function of time.
II.3. Flip-Flops
Latches have a property called transparency, means the output change occurs
immediately when the input change occurs. In certain applications, this is an undesirable
property. Hence it is necessary to synchronize the change in output with control line. The
device/element which has a property of synchronizing output change in accordance with the
control line is called flip-flop. Classification of Flip-flops
The behavior of flip-flops dependent upon the rising and falling edges of the clock signal as
well as the period of time in which the control signal is high.
The behavior of the flip-flop is dependent on either rising edge or positive edge of the control
signal, is called edge triggered flip-flops.
Success Bridge Page 37
Examples: Positive edge and negative edge triggered
In this section pulse triggered master slave SR flip- flops are discussed.
The operation of the pulse triggered Master-Slave SR flip flop is explained as follows. The
first SR latch shown in figure (17) is called Master latch and the second latch is called Slave
latch. The slave latch is driven by master latch. Master latch gets enabled at rising edge of the
clock pulse and active for entire ON period of the clock pulse. QM and QM’ are the outputs of
the master latch. The slave latch will enable at the falling edge of the clock pulse because of the
NOT gate.
Figure shows the status of master and slave latches with practical clock pulse.
Master latch is active from time t2 to t3, at the same time slave is disabled. Slave latch is
active before t1 and after t4, hence, if either master latch or slave latch is active at a time, not
both simultaneously.
Case (i): If clock =0, the master latch is disabled and any changes on S and R are neglected.
At the same time slave latch is enabled because of NOT gate and slave output is same as that of
the master latch, since outputs (QM and QM’) of master latch serves as inputs (SS and RS) to the
slave latch. Case (ii) If clock signal rises to high, i.e., at the rising edge of the clock pulse, slave
latch is disabled and master latch enabled at time t2. During the ON period (from t2 to t3), the
master latch responds to the inputs on S and R lines, meanwhile slave latch is disabled and any
change on the master latch are not reflected in slave latch, hence the output is same as the
previous state.
Case (iii) If clock signal reduces to zero, i.e., at the falling edge of the clock pulse, the slave
latch is enabled and master latch is disabled. The output of the slave latch is the same as the state
of master latch as mentioned in case (i).
Table (17), summarized the functionality of master slave SR flip-flop.
1 0 0 𝑄𝑁 ̅𝑄̅𝑁̅
1 0 1 0 1
1 1 0 1 0
1 1 1 X X
0 X X 𝑄𝑁 ̅𝑄̅𝑁̅
Timing Diagram
The analysis of flip-flops is easy with timing diagrams, the timing diagram for the random
sequence of S and R inputs is shown in figure ().
Example-1
The master slave JK flip-flop is converted invalid state of SR flip-flop to toggle condition.
This operation is discussed as follows.
If the slave latch is in reset state, and logic-1 on the J-input line during the ON period of the
clock signal causes, master latch to set, then, the lave latch sets when the clock signal returns to
zero.
This behavior is called 1’s catching.
NOTE: Once the master latch is reset by logic-1 signal on K input line, a subsequent logic -1
signal on the J input line during the same period in which c=1 does not change its state until C
returns to zero, due to feedback. The feedback signal from slave latch Q’=0, keeps the output
J-input NAND gate at logic-0.
• If Clk=0, the output of the flip-flop is same as that of the previous state, irrespective of
the levels of input D.
• If Clk=1, the data at the input line will be transferred to the output, i.e., Q=D.
Function Table
Table (19) summarizes the functionality of master slave SR D-flip flop
0 X 𝑄𝑁 ̅𝑄̅𝑁̅
1 1 1 0
Function table:
The functionality of the T flip-flop is summarized in the table (20).
Function table
Inputs Outputs
𝐃 𝐂𝐥𝐤 𝐐𝐧+𝟏 ̅𝐐̅𝐧̅+̅𝟏̅
0 ↓ 0 1 Set
1 ↓ 1 0 Reset
X 0 𝑄𝑛 ̅𝑄̅𝑛̅ Previous state
X 1 𝑄𝑛 ̅𝑄̅𝑛̅ Previous state
Asynchronous Inputs
All information input lines of flip flops are synchronous inputs, to have more flexibility, two
additional inputs have been introduced to set and reset forcibly. These input lines are called
asynchronous inputs denoted as PR’ and CLR’, that is these input line do not depend on the
control/clock signal.
Figure (30) shows the positive edge triggered D flip-flop with asynchronous inputs.
Figure 30: Logic diagram of edge triggered D flip-flop with asynchronous inputs
Inputs Outputs
̅
̅𝐏𝐑̅̅ 𝐂𝐋𝐑̅̅ 𝐃 𝐂𝐥𝐤 𝐐𝐧+𝟏 ̅𝐐̅𝐧̅+̅𝟏̅
0 1 X X 1 0 Initial state forced to set.
1 0 X X 0 1 Initial state forced to reset
0 0 X X 1 1 Invalid
1 1 0 ↑ 0 1 Set
1 1 1 ↑ 1 0 Reset
1 1 X 0 𝑄𝑛 ̅𝑄̅𝑛̅ Previous state
1 1 X 1 𝑄𝑛 ̅𝑄̅𝑛̅ Previous state
Table 23: Function Table of Positive edge triggered D flip-flop with asynchronous inputs
Logic symbol
III. Registers
A single flip-flop is able to store single bit information either 0 or 1, but to store more
than one bit information, a group of flip-flops need to be connected. A group of flip-flops is
called a register. If a register contains n flip-flops, it is able to stor n bit information.
Registers can be used to generate the specified sequence and can also be used to shift the
content of flip-flop position wise, based on this the applications of registers are classified into
two categories.
1. Shift registers and
2. Counters
1. Shift registers
A shift register is an entity of flip-flops, which are capable of shifting the state of flip-flop
positionwise in one direction or two directions.
Example: To store 4-bit data 1001, four flip-flops are used.
At the every rising edge of the clock pulse, the contents of flip-flops will be shifted towards
the succeeding stages of the flip-flops position wise.
Truth table
Truth table
Truth table
Truth table
Parallel Data : D=1111
Clk Q0 Q1 Q2 Q3
0 0 0 0 0
1 1 1 1 1
Parallel d
Loa
2 0 1 1
3 0 0 1 1
4 0 0 0 1
Timing diagram
NOTE:
• A single circuit which performs all the shift register operations in single direction
shown in figure (45).
̅
• 𝑆ℎ𝑖𝑓𝑡/̅𝐿𝑜𝑎𝑑̅̅ = 0(𝑃𝑎𝑟𝑎𝑙𝑙𝑒𝑙 − 𝑖𝑛)
̅
• 𝑆ℎ𝑖𝑓𝑡/̅𝐿𝑜𝑎𝑑̅̅ = 1(𝑆𝑒𝑟𝑖𝑎𝑙 − 𝑖𝑛)
S1 S0 Register
Operation
0 0 No Change
(Memory)
0 1 Shift left
1 0 Shift right
1 1 Parallel loading
Logic Diagram
NOTE: Students are asked to write the detailed working principle of all the shift registers
(Explanation for all shift registers are omitted in this notes and asked to explain).
IV. Counters
Registers can also be used to generate the specified sequence, counting the binary values
either incrementally or in decrement is an example of sequence. Hence, counter is a sequential
circuit, which counts the pulses either in ascending or descending order. n-bit counter will be
designed using n-flip-flops.
Counters are classified into two types based on the application of clock signal.
The output of the previous state flip serves as a clock input to the next state flip-flop is called
asynchronous counters.
Figure (50) shows that, the clock input for the second flip-flop will be supplied from the
output of first flip-flop.
Similarly, counters can be designed using any type of flip-flops, depending on the counting
sequence, counters are further classified into three types.
1. Up-counter and
Counts the clock pulse incrementally.
2. Down-counter
Counts the clock pulse in decrement order.
3. Ring counter
Outputs the specified sequence in circular/ring format.
Output 𝑄̅ of previous order flip-flop serves clock signal for the next order flip-flops, and
clock pulse applied to all the flip-flops is not simultaneous, hence called as asynchronous
counter. T inputs of all flip-flops are connected to logic-1, which acts as a toggle device. Output
of the last stage flip-flop is MSB and the output of first stage flip-flop is LSB.
For every rising edge of the clock pulse the content of first stage(Q0) T-flip-flop will toggles,
for every falling edge of the Q0 the content of second stage(Q1) T-flip-flop will toggles, this
process continues until the last stage flip-flop.
Assume, initially, the contents of all the four T flip-flops are zero. At the rising edge of the
clock pulse Q0 becomes ‘1’ and the remaining flip-flop outputs remains zero. The later stage
flip-flops output change occurs at the next falling edge of the previous stage flip-flop outputs,
shown in the timing diagram figure (52).
Change in the state of flip-flops occurs through the outputs of the previous stage flip-flops,
that is the effect of count pulse must ripple through the counter. Hence the name ripple counter.
Asynchronous Down-Counter (Binary Ripple counter)
Figure (53) shows the logic diagram of 4-bit down counter using positive edge triggered T
flipflops. Each positive transition of clock makes the flip-flop to toggle. Logic Diagram
Output 𝑄̅ of previous order flip-flop serves clock signal for the next order flip-flops, and
clock pulse applied to all the flip-flops is not simultaneous, hence called as asynchronous
counter. T inputs of all flip-flops are connected to logic-1, which acts as a toggle device. Output
̅𝑄̅3̅ of the last stage flip-flop is MSB and the output ̅𝑄0̅ ̅ of first stage flip-flop is LSB.
For every rising edge of the clock pulse the content of first stage(̅𝑄̅0̅) T-flip-flop will toggles,
for every falling edge of the Q0 the content of second stage(Q1) T-flip-flop will toggles, this
process continues until the last stage flip-flop.
Assume, initially, the contents of all the four T flip-flops are zero, hence complement of the
outputs is 1’s. At the rising edge of the clock pulse ̅𝑄̅0̅ becomes ‘0’ and the remaining flip-flop
complement outputs remains 1. The later stage flip-flops output change occurs at the next falling
edge of the previous stage flip-flop outputs, shown in the timing diagram figure (54).
Change in the state of flip-flops occurs through the outputs of the previous stage flip-flops,
that is the effect of count pulse must ripple through the counter. Hence the name ripple counter
V. Miscellaneous Concepts
Flip-flops conversion
1. SR to D flip-flop
E
x
ci
ta
ti
o
n
e
q
u
at
io
n
s
𝑆
=
̅𝑄̅𝑛̅
Ex 𝐽
cit 𝑎𝑛
ati 𝑑
on 𝑅
ta =
bl 𝑄𝑛
e 𝐾
Qn J K Qn+1 S R
0 0 0 0 0 X
0 0 1 0 0 X
0 1 0 1 1 0
0 1 1 1 1 0
Success Bridge Page 65
1 0 0 1 X 0
1 0 1 0 0 1 Excitation equations
1 1 0 1 X 0 ̅
1 1 1 0 0 1
3.
SR
to T
flip-f
lop
Exc Logi
itati c
on Diag
tabl ram
e
Qn T Qn+1 S R
0 0 0 0 X
0 1 1 1 0
1 0 1 X 0
1 1 0 0 1
Excitation equations
𝑆 = 𝑇̅𝑄̅𝑛̅ 𝑎𝑛𝑑 𝑅 = 𝑇𝑄𝑛
7. D
to
JK
flip-f
lop
Exc Exci
itati tatio
on n
tabl equ
e atio
n
Excitation equations
𝐽=
𝑇
𝑎𝑛𝑑
𝐾=
𝑇
6. D
to T
flip-f
lop
Exc Logi
itati c
Success Bridge Page 68
on diag
tabl ram
e
Qn J K Qn+1 D
0 0 0 0 0
0 0 1 0 0
0 1 0 1 1
0 1 1 1 1
1 0 0 1 1
1 0 1 0 0
1 1 0 1 1
1 1 1 0 0
𝐷 = 𝑄𝑛𝐾̅ + ̅𝑄𝑛̅ ̅𝐽
Logic diagram
8. T to D flip-flop
Excitation table Logic diagram
Qn D Qn+1 T
0 0 0 0
0 1 1 1
1 0 1 1
1 1 0 0
Excitation equation
𝑇 = 𝑄𝑛 ⊕ 𝐷
9. T-JK Flip-flop
Excitation table Excitation equation
******
Counters are classified into two types based on the application of clock signal.
Figure (49) shows the two-bit counter, the clock signal for the two flip-flops are supplied
simultaneously. ̅𝐶𝐿𝑅̅̅̅ is an asynchronous input, logic-0 to this pin sets the initial value of all the
flip-flop to zero.
The output of the previous state flip serves as a clock input to the next state flip-flop is called
asynchronous counters.
Figure (50) shows that, the clock input for the second flip-flop will be supplied from the
output of first flip-flop.
Similarly, counters can be designed using any type of flip-flops, depending on the counting
sequence, counters are further classified into three types.
4. Up-counter and
Counts the clock pulse incrementally.
5. Down-counter
Counts the clock pulse in decrement order.
6. Ring counter
Outputs the specified sequence in circular/ring format.
Output 𝑄̅ of previous order flip-flop serves clock signal for the next order flip-flops, and
clock pulse applied to all the flip-flops is not simultaneous, hence called as asynchronous
counter. T inputs of all flip-flops are connected to logic-1, which acts as a toggle device. Output
of the last stage flip-flop is MSB and the output of first stage flip-flop is LSB.
For every rising edge of the clock pulse the content of first stage(Q0) T-flip-flop will toggles,
for every falling edge of the Q0 the content of second stage(Q1) T-flip-flop will toggles, this
process continues until the last stage flip-flop.
Assume, initially, the contents of all the four T flip-flops are zero. At the rising edge of the
clock pulse Q0 becomes ‘1’ and the remaining flip-flop outputs remains zero. The later stage
flip-flops output change occurs at the next falling edge of the previous stage flip-flop outputs,
shown in the timing diagram figure (52).
Change in the state of flip-flops occurs through the outputs of the previous stage flip-flops,
that is the effect of count pulse must ripple through the counter. Hence the name ripple counter.
Asynchronous Down-Counter (Binary Ripple counter)
Figure (53) shows the logic diagram of 4-bit down counter using positive edge triggered T
flipflops. Each positive transition of clock makes the flip-flop to toggle. Logic Diagram
Output 𝑄̅ of previous order flip-flop serves clock signal for the next order flip-flops, and
clock pulse applied to all the flip-flops is not simultaneous, hence called as asynchronous
counter. T inputs of all flip-flops are connected to logic-1, which acts as a toggle device. Output
̅𝑄̅3̅ of the last stage flip-flop is MSB and the output ̅𝑄0̅ ̅ of first stage flip-flop is LSB.
For every rising edge of the clock pulse the content of first stage(̅𝑄̅0̅) T-flip-flop will toggles,
for every falling edge of the Q0 the content of second stage(Q1) T-flip-flop will toggles, this
process continues until the last stage flip-flop.
Assume, initially, the contents of all the four T flip-flops are zero, hence complement of the
outputs is 1’s. At the rising edge of the clock pulse ̅𝑄̅0̅ becomes ‘0’ and the remaining flip-flop
complement outputs remains 1. The later stage flip-flops output change occurs at the next falling
edge of the previous stage flip-flop outputs, shown in the timing diagram figure (54).
Change in the state of flip-flops occurs through the outputs of the previous stage flip-flops,
that is the effect of count pulse must ripple through the counter. Hence the name ripple counter
State diagram.
A graphical representation of the behavior of counters or any sequential circuits is called state
diagram. State diagrams helps for the design of counters easily, which shows the transition from
present states to the next states. Procedure to draw the state diagram.
• Each state is represented by a circle, and the present state should be mentioned inside the
circle.
• Use arrow associated lines to show the transition from present state to the next state.
NOTE: if the present state and next state is same, then connect the arrow associated line
to the same state.
Example: Two bit up-counter, four states counting from 00 to 11.
In the following section, the design of two-bit synchronous counter is discussed using T
flipflop.
1. No. of flip-flops is required =2, two-bit counter – sequence is 00, 01, 10 and 11.
2. State diagram
5. K-map simplification
𝑇1 = 𝑄0
𝑇0 = 1
6. Logic diagram
7. Verification
Success Bridge Page 76
Function table
Clock Outputs
Pulse Q1 Q0
0 0 0
1 0 1
2 1 0
3 1 1
4 0 0
Timing diagram
States Excitations
+
Q Q T
0 0 0
0 1 1
1 0 1
1 1 0
4. Excitation table of complete circuit
Present states Next states Excitations
b. NOTE: 4-bit synchronous counter variation (design using only two input AND gates)
Initially, the contents of flip-flops (Q0Q1Q2Q3) are assumed as (1000), at every rising edge of
the clock pulse, the content of previous stage flip-flop will be shifted to the next stage flip-flop.
The ring counter generates the four sequence and the sequence repeats after every four clock
pulses, hence the mod of this counter is four.
Timing diagram
Figure shows the timing diagram of 4-bit ring counter.
Truth Table:
Clk Q0 Q1 Q2 Q3
0 0 0 0 0
1 1 0 0 0
2 1 1 0 0
3 1 1 1 0
4 1 1 1 1
5 0 1 1 1
6 0 0 1 1
7 0 0 0 1
8 0 0 0 0
Timing diagram
Figure shows the timing diagram of Johnson counter.
NOTE: State machines, state table and state diagram concepts need to be added