DCD All Notes
DCD All Notes
CHAPTER-1
Number Systems and Codes
2.1 Motivation:
This chapter provides a review of the different number system formats used in digital world and
the conversions between these number systems. It also focuses on the basic arithmetic in binary
form. It also includes the different codes present in digital world. The main motivation of this
chapter is to deliver the knowledge, motivate and train students in basics of Digital Logic Design.
1.2. Syllabus: -
Sr. No Topic Fine Detailing No of Week Self
Hours Study
1.5. Objectives:
• To list the different number systems
• To calculate ones and twos complement of a givne number
• To convert a particular given number into a different number system format
• To calculate excess 3 code for a given binary number
1
Digital Circuit Design
1.8.1 Introduction:
The decimal number system is fine for calculations done by humans, but it is not the easiest system
for a computer to use. A digital computer contains elements that can be in either of two states: on
or off, magnetized or not magnetized, and so on. For such devices, calculations are most
conveniently done using binary numbers. In this chapter we learn what binary numbers are and how
to convert between binary and decimal numbers. Binary numbers are useful in a computer, where
each binary digit (bit) can be represented by one state of a “binary switch” that is either on or off.
However, binary numbers are hard to read, partly because of their great length. To represent a nine-
digit Social Security number, for example, requires a binary number 29 bits long. So, in addition to
binary numbers, we also study other ways in which numbers can be represented. Hexadecimal,
octal, and binary-coded decimal systems allow us to express binary numbers more compactly, and
they make the transfer of data between computers and people much easier. Here we learn how to
convert numbers between each of these systems, and between decimal and binary as well.
Binary Numbers - A binary number is a sequence of the digits 0 and 1, such as 1101001 The number
shown has no fractional part and so is called a binary integer. A binary number having a fractional
part contains a binary point (also called a radix point), as in the number 1001.01
Base or Radix - The base of a number system (also called the radix) is equal to the number of digits
used in the system.
Example 1:
2
Digital Circuit Design
Hexadecimal Numbers Hexadecimal numbers (or hex for short) are obtained by grouping the bits in
a binary number into sets of four and representing each such set by a single number or letter. A hex
number one-fourth the length of the binary number is thus obtained.
Base 16
Since a 4-bit group of binary digits can have a value between 0 and 15, we need 16 symbols to
represent all of these values. The base of hexadecimal numbers is thus 16. We use the digits from 0
to 9 and the capital letters A to F, as shown in Table 1.
0 0000 0 0
1 0001 1 1
2 0010 2 2
3 0011 3 3
4 0100 4 4
5 0101 5 5
6 0110 6 6
7 0111 7 7
8 1000 8 10
9 1001 9 11
10 1010 A 12
11 1011 B 13
12 1100 C 14
13 1101 D 15
14 1110 E 16
15 1111 F 17
1.8.1.3 The Octal Number System
The octal number system uses eight digits, 0 to 7, and hence has a base of eight. A comparison of the
decimal, binary, hex, and octal digits is given in Table 1.
3
Digital Circuit Design
1.8.2 Number System Conversion
binary number: 1 1 1 0 0 1
power of 2: 25 24 23 22 21 20
1001012 = 3710:
Exponents 25 24 23 22 21 20
Place Values 32 16 8 4 2 1
Bits 1 0 0 1 0 1
Value 32 + 4 + 1 = 37
100011102 = 14210:
Exponents 27 26 25 24 23 22 21 20
Place Values 128 64 32 16 8 4 2 1
Bits 1 0 0 0 1 1 1 0
Value 128 + 8 + 4 + 2 = 142
1111010002 = 48810:
Exponents 28 27 26 25 24 23 22 21 20
Place Values 256 128 64 32 16 8 4 2 1
Bits 1 1 1 1 0 1 0 0 0
Value 256 + 128 + 64 + 32 + 8 = 488
101101012 = 18110:
Exponents 27 26 25 24 23 22 21 20
Place Values 128 64 32 16 8 4 2 1
Bits 1 0 1 1 0 1 0 1
Value 128 + 32 + 16 + 4 + 1 = 181
1.8.2.2. Binary To Hex Conversions
4
Digital Circuit Design
Conversion between hex and binary is easy. Simply substitute four-bit groups for the hex digit of the
same value. Specifically:
Hex Digit: 0 1 2 3 4 5 6 7
Bit Group: 0000 0001 0010 0011 0100 0101 0110 0111
Hex Digit: 8 9 a b c d e f
Bit Group: 1000 1001 1010 1011 1100 1101 1110 1111
For conversion from hex to binary, simply string together the bits for each hex digit. For instance,
0x509d7a is binary 10100001001110101111010.
Hex Number: 5 0 9 d 7 a
Binary Number: 0101 0000 1001 1101 0111 1010
To convert the other way, break the binary number into groups of four, and then replace each one
with its hex digit. Group the digits starting from the right. If you don't have a complete group of four
when you reach the left, pad with zero bits on the left to fill the last group. For instance, binary
111011011111110001 is 0x3b7f1:
Because this conversion is so easy, the easiest way to convert between binary and decimal is usually
to go through hex. It generally requires fewer operations, and hex numbers are easier to work with
because they are shorter Also, it's easier to remember where you are when scanning a hex number,
since the digits differ more.
An easy way to convert from binary to octal is to group binary digits into sets of three, starting with
the least significant (rightmost) digits.
5
Digital Circuit Design
5a816 = 144810:
2c0316 = 1126710:
16
Exponent: 163 162 161 0
9516 = 14910:
b1716 = 283910:
16
Exponent: 162 161 0
Converting from hexadecimal to binary is as easy as converting from binary to hexadecimal. Simply
look up each hexadecimal digit to obtain the equivalent group of four binary digits.
Hexadecimal: 0 1 2 3 4 5 6 7
Binary: 0000 0001 0010 0011 0100 0101 0110 0111
Hexadecimal: 8 9 A B C D E F
Binary: 1000 1001 1010 1011 1100 1101 1110 1111
Hexadecimal = A 2 D E
Binary = 1010 0010 1101 1110 = 1010001011011110 binary
6
Digital Circuit Design
When converting from hexadecimal to octal, it is often easier to first convert the hexadecimal
number into binary and then from binary into octal. For example, to convert A2DE hex into octal:
Add leading zeros or remove leading zeros to group into sets of three binary digits.
Converting from octal to binary is as easy as converting from binary to octal. Simply look up each
octal digit to obtain the equivalent group of three binary digits.
Octal: 0 1 2 3 4 5 6 7
Binary: 000 001 010 011 100 101 110 111
Octal = 3 4 5
Binary = 011 100 101 = 011100101 binary
When converting from octal to hexadecimal, it is often easier to first convert the octal number into
binary and then from binary into hexadecimal. For example, to convert 345 octal into hex:
Drop any leading zeros or pad with leading zeros to get groups of four binary digits (bits):
Binary 011100101 = 1110 0101
7
Digital Circuit Design
Therefore, through a two-step conversion process, octal 345 equals binary 011100101 equals
hexadecimal E5.
8
Digital Circuit Design
Binary to decimal Add the weighted value to the decimal Add the weighted value to the
number ( base 2) where place holder is decimal number ( base 2) where
0 to n fractional placeholder is 2-1, 2-
2
………
2 2 , 2 1 ,2 0
Binary to octal Create a group of 3 bits ,add trailing Create a group of 3 bits and add
bits to the left with 0, and assign the trailing bits to the right with
corresponding value 0,assign the corresponding value
Binary to hexadecimal Create a group of 4 bits ,add trailing Create a group of 4bits and add
bits to the left with 0 trailing bits to the right with 0
Octal and hexadecimal to Write binary equivalent of each digit Write binary equivalent of each
binary towards left. (For octal form group digit after decimal point towards
of3bits and for hexadecimal in 4bits) right
Octal to hexadecimal First convert octal to binary then Same as for integers
binary to hexadecimal
Hexadecimal to octal First convert hexadecimal to binary Same as for integers
then binary to octal
and
When we converted the digits in the decimal number 17, we used the same 4- bit binary equivalents
as in Table 2. The bits have the place values 8, 4, 2, and 1, and BCD numbers written in this manner
are said to be in 8421 code. The 8421 code and its decimal equivalents are listed in Table 3
9
Digital Circuit Design
Other BCD codes are in use which represent each decimal digit by a 6-bit binary number or an 8-bit
binary number, and other 4-bit codes in which the place values are other than 8421. Some of these
are shown in Table 3. Each is used in the same way as shown for the 8421 code.
10
Digital Circuit Design
In addition to the binary, hexadecimal, octal, and BCD codes we have discussed, many other codes
are used in the computer industry. Numbers can be represented by the excess-3 code or the Gray
code. There are error-detecting and parity checking codes. Other codes are used to represent letters
of the alphabet and special symbols, as well as numbers. Some of these are Morse code, the
American Standard Code for Information Interchange or ASCII (pronounced “as-key”) code, the
Extended Binary-Coded-Decimal Interchange Code or EBCDIC (pronounced “eb-si-dik”) code, and the
Hollerith code used for punched cards.
As the binary system has base r = 2. So the two types of complements for the binary system are 2's
The 1's complement of a number is found by changing all 1's to 0's and all 0's to 1's. This is called as
11
Digital Circuit Design
Two’s complement allows us to represent signed negative values in binary, so here is an introductory
demonstration on how to convert a negative decimal value to its negative equivalent in binary using
two’s complement.
Step 1: Convert 65d to binary. Ignore the sign for now. Use the absolute value. The absolute value of
-65d is 65d.
65d --> 01000001b
Step 3: Convert 10111110b to its two’s complement by adding 1 to the one’s complement.
10111110
+ 1
---------
10111111 <--- Two's complement
In the coding, when numbers, letters or words are represented by a specific group of symbols, it is
said that the number, letter or word is being encoded. The group of symbols is called as a code. The
digital data is represented, stored and transmitted as group of binary bits. This group is also called
as binary code. The binary code is represented by the number as well as alphanumeric letter.
• Binary codes make the analysis and designing of digital circuits if we use the binary codes.
12
Digital Circuit Design
• Weighted Codes
• Non-Weighted Codes
• Alphanumeric Codes
Weighted binary codes are those binary codes which obey the positional weight principle. Each
position of the number represents a specific weight. Several systems of the codes are used to
express the decimal digits 0 through 9. In these codes each decimal digit is represented by a group
of four bits.
In this type of binary codes, the positional weights are not assigned. The examples of non-weighted
Excess-3 code
The Excess-3 code is also called as XS-3 code. It is non-weighted code used to express decimal
numbers. The Excess-3 code words are derived from the 8421 BCD code words adding (0011)2 or
(3)10 to each code word in 8421. The excess-3 codes are obtained as follows −
Example
13
Digital Circuit Design
Gray Code
It is the non-weighted code and it is not arithmetic codes. That means there are no specific weights
assigned to the bit position. It has a very special feature that, only one bit will change each time the
decimal number is incremented as shown in fig. As only one bit changes at a time, the gray code is
called as a unit distance code. The gray code is a cyclic code. Gray code cannot be used for
arithmetic operation.
• A shaft position encoder produces a code word which represents the angular position of the
shaft.
14
Digital Circuit Design
Let Gray Code be g3 g2 g1 g0. Then the respective Binary Code can be obtained as follows:
i.e. b3 = g3
b2 = b3 ⊕ g2
b1 = b2 ⊕ g1
b0 = b1 ⊕ g0
Example:
b3 = g3 = 1
b2 = b3 ⊕ g2 = 1 ⊕ 0 = 1
b1 = b2 ⊕ g1 = 1 ⊕ 0 = 1
b0 = b1 ⊕ g0 =1 ⊕ 1 = 0
Let Binary code be b3 b2 b1 b0. Then the respective Gray Code can be obtained is as follows
15
Digital Circuit Design
i.e. g3 = b3
g2 = b3 ⊕ b2
g1 = b2 ⊕ b1
g0 = b1 ⊕ b0
Example:
g3 = b3 = 1
g2 = b3 ⊕ b2 = 1 ⊕ 1 = 0
g1 = b2 ⊕ b1 = 1 ⊕ 1 = 0
g0 = b1 ⊕ b0 =1 ⊕ 0 = 1
Richard Hamming found a beautiful binary code that will correct any single error and will detect any
double error (two separate errors). The Hamming code has been used for computer RAM, and is a
good choice for randomly occurring errors. (If errors come in bursts, there are other good codes.)
Unlike most other error-correcting codes, this one is simple to understand.
The code uses extra redundant bits to check for errors, and performs the checks with special check
equations. A parity check equation of a sequence of bits just adds the bits of the sequence and
insists that the sum be even (for even parity) or odd (for odd parity). This section uses even parity.
Alternatively, one says that the sum is taken modulo 2 (divide by 2 and take the remainder), or one
says that the sum is taken over the integers mod 2, Z2.
A simple parity check will detect if there has been an error in one bit position, since even parity will
change to odd parity. (Any odd number of errors will show up as if there were just 1 error, and any
even number of errors will look the same as no error.)
One has to force even parity by adding an extra parity bit and setting it either to 1 or to 0 to make
the overall parity come out even. It is important to realize that the extra parity check bit participates
in the check and is itself checked for errors, along with the other bits.
The Hamming code uses parity checks over a portion of the positions in a block. Suppose there are
bits in consecutive positions from 1 to n-1. The positions whose position number is a power of 2 are
16
Digital Circuit Design
used as check bits, whose value must be determined from the data bits. Thus the check bits are in
positions 1, 2, 4, 8, 16, ..., up to the largest power of 2 that is less than or equal to the largest bit
position. The remaining positions are reserved for data bits.
1. Define Bit.
2. What do you mean by BCD.
3. How to obtain Excess 3 Code from BCD code?
4. List the different number systems.
5. List the different binary weighted codes.
1.10 ShortQuestions
1. Convert a binary number (1001011) to a decimal number.
2. Convert a Hexadecimal number (F7#4) to octal number.
3. Find ones and twos complement of (1001011).
17
Digital Circuit Design
CHAPTER-2
Logic Gates and Boolean Algebra
2.1 Motivation:
This chapter teaches the basic design techniques for logic circuits. It emphasizes the synthesis of
circuits and explains how circuits are implemented using logical gates. The main motivation of
this chapter is to deliver the knowledge, motivate and train students in basics of Digital Logic
Design.
2.2. Syllabus: -
Sr. No Topic Fine Detailing No of Week Self
Hours Study
2.5. Objectives:
• To understand basic terminology, types of logic gates (AND, OR, NOT, NAND, NOR,
XOR,XNOR)
• To understand the basic operations used in computers and other digital systems
• To introduce the students basic rules of Boolean algebra, De Morgan’s laws
• To study universality of NAND and NOR gates
• To study Karnaugh maps for circuit minimization
POS-Product of Sum
1
Digital Circuit Design
De Morgan's Laws: These laws are very useful in simplifying Boolean expressions. According to
De Morgan's theorem:
2.8.1 Introduction:
Electrical circuits designed to represent logical expressions are popularly known as logic circuits.
Such circuits are extensively used in industrial processes, household appliances, computers,
communication devices, traffic signals and microprocessors to make important logical decisions.
Logic circuits are usually represented by logic operations involving boolean variables.
There are three basic logic operations as listed below:
- OR operation
2
Digital Circuit Design
- AND operation
- NOT operation
Logic Gates: logic gates are the basic building blocks of any digital system.it is an electronic
circuit having one or more than one inputs and only one output. The relationship between
the input and the output is based on a certain logic .based on this logic the gates are named
as NOT gate, AND gate, OR, NAND, NOR etc. AND , OR and NOR GATE are considered to be
the basic gate. Truth Tables are used to help show the function of a logic gate.
Digital systems are said to be constructed by using logic gates. These gates are the AND, OR,
NOT, NAND, NOR, EXOR and EXNOR gates. The basic operations are described below with the
aid of Truth Tables
1] AND gate:
The AND gate is an electronic circuit that gives a high output (1) only if all its inputs are high. A
dot (.) is used to show the AND operation i.e. A.B. Bear in mind that this dot is sometimes
omitted i.e. AB
Note: The • sign can be omitted when indicating an AND operation. Thus, C=A•B and C=AB
mean the same operation.
2] OR gate:
The OR gate is an electronic circuit that gives a high output (1) if one or more of its inputs are
high. A plus (+) is used to show the OR operation.
A+Ā = 1
A+A = A
0+A = A
1+A = 1
(A+B)+C=A+(B+C)=A+B+C
3] NOT gate :
The NOT gate is an electronic circuit that produces an inverted version of the input at its output.
It is also known as an inverter. If the input variable is A, the inverted output is known as NOT A.
This is also shown as A', or A with a bar over the top, as shown at the outputs. The diagrams
below show two ways that the NAND logic gate can be configured to produce a NOT gate
It can also be done using NAND logic gates in the same way.
4] NAND gate:
This is a NOT-AND gate which is equal to an AND gate followed by a NOT gate. The outputs of
all NAND gates are high if any of the inputs are low. The symbol is an AND gate with a small
circle on the output. The small circle represents inversion.
5] NOR gate:
4
Digital Circuit Design
NOT-OR gate which is equal to an OR gate followed by a NOT gate. The outputs of all NOR gates
are low if any of the inputs are high. The symbol is an OR gate with a small circle on the output.
The small circle represents inversion
6] EXOR gate:
The 'Exclusive-OR' gate is a circuit which will give a high output if either, but not both, of its two
inputs are high. An encircled plus sign ( ) is used to show the EOR operation.
7] EXNOR gate:
The 'Exclusive-NOR' gate circuit does the opposite to the EOR gate. It will give a low output if
either, but not both, of its two inputs are high. The symbol is an EXOR gate with a small circle on
the output. The small circle represents inversion.
The NAND and NOR gates are called universal functions since with either one the AND and OR
functions and NOT can be generated.
NOT
5
Digital Circuit Design
OR The following statements are called DeMorgan's Theorems and can be easily verified and
extended for more than two variables.
In general:
Thus :
Now it is easy to see that , which can be checked from the truth table easily.
The resulting realization of OR gate is shown in fig.
AND gate
X-OR gate
Clearly, this can be implemented using AND, NOT and OR gates, and hence can be implemented
using universal gates.
X-NOR gate
6
Digital Circuit Design
Again, this can be implemented using AND, NOT and OR gates, and hence can be implemented
using universal gates, i.e., NAND or NOR gates.
Truth Table
Input A Output Q
0 1
1 0
OR
The OR gate is simply one NOR gate followed by a second whose inputs are joined.
Output= NOT[NOT(A+B)+NOT(A+B)]
Desired Gate NOR Construction
Truth Table
Input A Input B Output Q
0 0 0
0 1 1
1 0 1
1 1 1
7
Digital Circuit Design
AND
An AND gate gives a 1 output when both inputs are 1; a NOR gate gives a 1 output only when
both inputs are 0. Therefore, an AND gate is made by inverting the inputs of a NOR gate.
Desired Gate NOR Construction
Truth Table
Input A Input B Output Q
0 0 0
0 1 0
1 0 0
1 1 1
NAND
A NAND gate is made using an AND gate in series with a NOT gate:
Desired Gate NOR Construction
Truth Table
Input A Input B Output Q
0 0 1
0 1 1
1 0 1
1 1 0
XOR
An XOR gate is made by connecting the output of 3 NOR gates (connected as an AND gate) and
the output of a NOR gate to the respective inputs of a NOR gate. This expresses the logical
formula (A AND B) NOR (A NOR B). This construction entails a propagation delay three times
that of a single NOR gate.
8
Digital Circuit Design
Truth Table
Input A Input B Output Q
0 0 0
0 1 1
1 0 1
1 1 0
XNOR
An XNOR gate can be constructed from four NOR gates implementing the expression "(A NOR N)
NOR (B NOR N) where N = A NOR B".This construction has a propagation delay three times that
of a single NOR gate, and uses more gates.
Desired XNOR Gate NOR Construction
Truth Table
Input A Input B Output Q
0 0 1
0 1 0
1 0 0
1 1 1
9
Digital Circuit Design
As can be seen, the number of simple gates needed to implement an expression is equal to the
number of operations in the Boolean expression. We could use the rules of Boolean Algebra or
Karnaugh Maps to simplify a given Boolean expression. This would allow the given expression to
be implemented using less number of gates.
Basic Laws of Boolean Algebra:
Some of the basic rules of Boolean algebra that may be used to simplify the Boolean expressions
are shown below.
These rules may be proved using the truth tables. Essentially, we consider all combinations of
inputs and show that in all cases the LHS expression and RHS expression lead to the same result.
Such a method of proving logi cal equations is known as proof by perfect induction.
De Morgan's Laws:
10
Digital Circuit Design
These laws are very useful in simplifying Boolean expressions. According to De Morgan's
theorem:
Notice that the De Morgan's Laws give the link between the OR operation and the AND
operation. Application of De Morgan's theorem makes it easy to design logic circuits using NAND
and NOR logic gates which we will soon
see.
Because of the above relationships, any logical function can be implemented by using only
1)AND and NOT gatesor 2)OR and NOT gates.
Thus an OR gate can be implemented with AND and NOT gates as shown below
11
Digital Circuit Design
Sum-of-Products Implementation:
As you might suspect, a Sum-Of-Products Boolean expression is literally a set of Boolean terms
added (summed) together, each term being a multiplicative (product) combination of Boolean
variables.
(Sum-of-products-expression) = (term) + (term) ... + (term)
Product terms that include all of the input variables (or their inverses) are called minterms. In a
sum-of-products expression, we form a product of all the input variables (or their inverses) for
each row of the truth table for which the result is logic 1. The output is the logical “sum” of
these minterms
Sum-Of-Products expressions are easy to generate from truth tables as shown in the example
below, by determining which rows of the table have an output of 1, writing one product term
12
Digital Circuit Design
for each row, and finally summing all the product terms. This creates a Boolean expression
representing the truth table as a whole.
Sum-Of-Products expressions lend themselves well to implementation as a set of AND gates
(products) feeding into a single OR gate (sum).
Example : Obtain W from the truth table in the Sum Of Products (SOP) form. Draw the logical
circuit to implement it.
Using this method, the resulting Boolean expression and its circuit implementation are shown
below.
Product-of-Sums Implementation:
An alternative to generating a Sum-Of-Products expression to account for all the "high" (1)
output conditions in the truth table is to generate a Product-Of-Sums, or POS, expression, to
account for all the "low" (0) output conditions instead. POS Boolean expressions can be
generated from truth tables quite easily, by determining which rows of the table have an output
of 0, writing one sum term for each row, and finally multiplying all the sum terms. This creates a
13
Digital Circuit Design
Boolean expression representing the truth table as a whole. These “sum” terms that include all
of the input variables (or their inverses) are called maxterms. For POS implementation, the
output variable is the logical product of maxterms.
Product-Of-Sums expressions lend themselves well to implementation as a set of OR gates
(sums) feeding into a single AND gate (product).
Example: Find Z in terms of A, B and C in product-of-sum (POS) form from the following truth
table.
.
To begin, we identify which rows in the last truth table column have "low" (0) outputs, and write
a Boolean sum term that would equal 0 for that row's input conditions. For instance, in the fifth
row of the truth table, where A=1,B=0, and C=0, the sum term would be (Ā + B + C), since that
term would have a value of 0 if and only if Ā =0,B=0, and C=0. Similarly, max terms for the 6th
and 7th row can be found. The completed Product-Of-Sums expression, of course, is the
multiplicative combination of these three sum terms
Whereas a Sum-Of-Products expression could be implemented in the form of a set of AND gates
with their outputs connecting to a single OR gate, a Product-Of-Sums expression can be
implemented as a set of OR gates feeding into a single AND gate.
14
Digital Circuit Design
easily. The simplified logical expression is then used so that minimum hardware is employed in
the implementation of logical circuits.
A Karnaugh map provides a pictorial method of grouping together expressions with common
factors and therefore eliminating unwanted variables. The values inside the squares are copied
from the output column of the truth table, therefore there is one square in the map for every
row in the truth table. Around the edge of the Karnaugh map are the values of the two input
variable, A is along the top and B is down the left hand side. The diagram below explains this.
Karnaugh maps: Complete Simplification Process
1. Draw out the pattern of output 1’s and 0’s in a matrix of input values
2. Construct the K map and place 1s and 0s in the squares according to the truth table.
3. Group the isolated 1s which are not adjacent to any other 1s. (single loops)
4. Group any pair which contains a 1 adjacent to only one other 1. (double loops)
5. Group any quad that contains one or more 1s that have not already been grouped, making
sure to use the minimum number of groups.
6. Group any pairs necessary to include any 1s that have not yet been grouped, making sure to
use the minimum number of groups.
7. Form the OR sum of all the terms generated by each group.
Compared to the algebraic method, the K-map process is a more orderly process requiring fewer
steps and always producing a minimum expression. It must be noted that the minimum
expression is generally NOT unique.
Boolean Expressions in Two Variables:
Consider the following truth table.
15
Digital Circuit Design
Its Karnaugh map is shown below. The two adjacent squares may be combined together as
shown by the loop
Referring to the map above, the two adjacent 1's are grouped together. Through inspection it
can be seen that variable A has its true and false form within the group. This eliminates variable
A leaving only variable B which only has its true form. The minimized answer therefore is Y = B.
It simply means that we are combining the two terms of the above expression Y as shown
below:
Figure below shows the Karnaugh map of the above truth table. The expression X may be
simplified by combining two adjacent squares as shown
16
Digital Circuit Design
The Karnaugh map of Y is shown below. In this case, we are able to combine four adjacent
squares. Note that
17
Digital Circuit Design
Karnaugh map of X is shown in Figure 1.35. As we could combine 4 adjacent squares as shown
below, the simplified expression should be independent of two variables. Adjacent squares in a
row suggest that the resultant expression should be independent of B. Similarly, adjacent
squares in a column suggest that it should also be independent of C. Hence, the simplified
expression of X is given by:
Solution: Karnaugh map of Y is shown below. There are four loops enclosing 4-adjacent squares.
First, consider the loop 1. The resulting expression for these squares should be independent of C
and D. Next, consider loop 2. The resulting expression of these squares should be independent
of B and D. Thirdly, consider loop 3. The resulting expression of these squares should be
independent of B and C. Finally, consider loop 4.
18
Digital Circuit Design
The resulting expression of these squares should be independent of A and B. Hence, we get
Note: Reductions could be done with Boolean algebra. However, the Karnaugh map is faster
and easier, especially if there are many logic reductions to do.
Elimination of the redundant group:
If all the 1’s in a group are already involved in some other groups then that group is called as a
redundant group.
A redundant group has to be eliminated ,because it increases the number of gates required.
combined
Now consider the following:
19
Digital Circuit Design
combined
This is because the FIRST RULE of the Tabular method for two terms to combine, and thus
eliminate one variable, is that they must differ in only one digit position.
Bear in mind that when two terms are combined, one of the combined terms has one digit more
at logic 1 than the other combined term. This indicates that the number of 1's in a term is
significant and is referred to as its index.
0000...................Index 0
0010, 1000.............Index 1
1010, 0011, 1001.......Index 2
1110, 1011.............Index 3
1111...................Index 4
The necessary condition for combining two terms is that the indices of the two terms must differ
by one logic variable which must also be the same.
Example 1:
To make things easier, change the function into binary notation with index value and decimal
value.
Tabulate the index groups in a colunm and insert the decimal value alongside.
From the first list, we combine terms that differ by 1 digit only from one index group to the next.
These terms from the first list are then seperated into groups in the second list. Note that the
20
Digital Circuit Design
ticks are just there to show that one term has been combined with another term. From the
second list we can see that the expression is now reduced to: Z = + + C+A
From the second list note that the term having an index of 0 can be combined with the terms of
index 1. Bear in mind that the dash indicates a missing variable and must line up in order to get
a third list. The final simplified expression is: Z =
Bear in mind that any unticked terms in any list must be included in the final expression (none
occured here except from the last list). Note that the only prime implicant here is Z = .
Note that the above solution can be derived algebracially. Attempt this in your notes.
Example 2:
The chart is used to remove redundant prime implicants. A grid is prepared having all the prime
implicants listed at the left and all the minterms of the function along the top. Each minterm
covered by a given prime implicant is marked in the appropriate position.
21
Digital Circuit Design
From the above chart, BD is an essential prime implicant. It is the only prime implicant that
covers the minterm decimal 15 and it also includes 5, 7 and 13. is also an essential prime
implicant. It is the only prime implicant that covers the minterm denoted by decimal 10 and it
also includes the terms 0, 2 and 8. The other minterms of the function are 1, 3 and 12. Minterm
1 is present in and D. Similarly for minterm 3. We can therefore use either of these prime
implicants for these minterms. Minterm 12 is present in A and AB , so again either can be
used.Thus, one minimal solution is: Z = + BD + +A
22
Digital Circuit Design
CHAPTER-3
Combinational Logic Circuits and Hazards
2.1 Motivation:
This chapter deals with combinational circuits. It also deals with combinational logic design using
MSI circuits, which is important for the design of digital digital systems considering the simplicity in
design, cost, space, power requirement and other factors.
3.2. Syllabus: -
Sr. No Topic Fine Detailing No of Week Self
Hours Study
3.5. Objectives:
• To list the different conmbinational circuits.
• To teach the working of combinational circuits and their applications.
DEMUX - Demultiplexer
1
Digital Circuit Design
3.8.1 Introduction:
Combinational logic circuits (circuits without a memory): Combinational switching networks whose
outputs depend only on the current inputs.
A combinational circuit consists of input variables, logic gates and output variables. The logic gates
accept signals from the input variables and generate output signals. This process transforms binary
information from the given input data to the required output data. Figure 3.1 shows the block
diagram of a combinational circuit. As shown in the figure the combinational circuit accepts n input
binary variables and generates m output variables depending on the logical combination of gates
2
Digital Circuit Design
One of the most common uses of combinational logic is in Multiplexer and De-multiplexer type
circuits. Here, multiple inputs or outputs are connected to a common signal line and logic gates
are used to decode an address to select a single data input or output switch. A multiplexer
consist of two separate components, a logic decoder and some solid state switches, but before
we can discuss multiplexers, decoders and de-multiplexers in more detail we first need to
understand how these devices use these "solid state switches" in their design
Half Adder
Half adder is a combinational logic circuit which is used to add two bits at a time and gives two
Outputs sum(s) and carry (c) Let A and B are two input variables.
Half adder is a logic circuit that finds the arithmetic sum of two binary digits at a time. Its logic
circuit is shown in Figure 3.3
3
Digital Circuit Design
Full Adder
When two binary numbers are added a carry may be generated onto the subsequent bit
positions. Hence, it is required to add three bits for the subsequent additions. A
combinational circuit that finds the arithmetic sum of three bits is called a Full adder. A Full
adder can be constructed using two half adders and an OR gate as shown in the Figure 3.5.
Thus a full-adder is a combinational circuit that performs the arithmetic sum of three input bits.
It consists of three inputs and two outputs. Two of the input variables denoted by A, B
represents the two significant bits to be added. The third input C represents the carry from the
lower significant position. The two outputs are denoted by SUM and CARRY. The Boolean
expressions for SUM and CARRY outputs are given below
Half Subtractor:
A Half subtractor is a combinational logic circuit which is used to find the difference between
two binary digits. Its logic circuit is shown in Figure 3.6
A half-subtractor has two inputs and two outputs. Let the input variables minuend and
subtrahend be designated as A and B respectively, and output functions be designated as D for
difference and B for borrow. The truth table of the functions is as follows
5
Digital Circuit Design
Full Subtractor:
A full subtractor Figure 3.8 is a combinational circuit that performs a subtraction between
two bits taking into account that a 1 may have been borrowed by a lower significant stage.
A combinational circuit of full-subtractor performs the operation of subtraction of three bits—
the minuend, subtrahend, and borrow generated from the subtraction operation of previous
significant digits and produces the outputs difference and borrow.
6
Digital Circuit Design
A B C D BOROUT
BORIN
0 0 0 0 0
0 0 1 1 1
0 1 0 1 0
0 1 1 0 0
1 0 0 1 1
1 0 1 0 1
1 1 0 0 0
1 1 1 1 1
The Boolean functions for the two outputs of the full subtractor are derived in the K-map
as shown below.
7
Digital Circuit Design
The Multiplexer:
A data selector, more commonly called a Multiplexer, shortened to "Mux" or "MPX", are
combinational logic switching devices that operate like a very fast acting multiple position rotary
switch. They connect or control, multiple input lines called "channels" consisting of either 2, 4, 8
or 16 individual inputs, one at a time to an output.
Then the job of a "multiplexer" is to allow multiple signals to share a single common output. For
example, a single 8-channel multiplexer would connect one of its eight inputs to the single data
output. Multiplexers are used as one method of reducing the number of logic gates required in a
circuit or when a single data line is required to carry two or more different digital signals.
Digital Multiplexers are constructed from individual analogue switches encased in a single IC
package as opposed to the "mechanical" type selectors such as normal conventional switches
and relays. Generally, multiplexers have an even number of data inputs, usually an even power
of two, n2 , a number of "control" inputs that correspond with the number of data inputs and
according to the binary condition of these control inputs, the appropriate data input is
connected directly to the output. An example of a Multiplexer configuration is shown below.
8
Digital Circuit Design
Here in this example the 4 input channels are switched to 2 individual output lines but larger
arrangements are also possible. This simple 4 to 2 configuration could be used for example, to
switch audio signals for stereo pre-amplifiers or mixers.
The Multiplexer is a very useful combinational device that has its uses in many different
applications such as signal routing, data communications and data bus control. When used with
a demultiplexer, parallel data can be transmitted in serial form via a single data link such as a
fibre-optic cable or telephone line. They can also be used to switch either analogue, digital or
video signals, with the switching current in analogue power circuits limited to below 10mA to
20mA per channel in order to reduce heat dissipation.
It is possible to make simple multiplexer circuits from standard AND and OR gates as we have
seen above, but commonly multiplexers/data selectors are available as standard I.C. packages
such as the common TTL 74LS151 8-input to 1 line multiplexer or the TTL 74LS153 Dual 4-input
to 1 line multiplexer. Multiplexer circuits with much higher number of inputs can be obtained by
cascading together two or more smaller devices.
Digital multiplexers are sometimes also referred to as "Data Selectors" as they select the data to
be sent to the output line and are commonly used in communications or high speed network
switching circuits such as LAN´s and Ethernet applications. Some multiplexer IC´s have a single
inverting buffer (NOT Gate) connected to the output to give a positive logic output (logic "1",
HIGH) on one terminal and a complimentary negative logic output (logic "0", LOW) on another
different terminal.
MUX IC:
9
Digital Circuit Design
A strobe control ‘ E’ ’ acts as an enable signal. The function table specifies the value of output ‘Y’
as function of the selection lines. Output ‘ Y’ ’ is the complement of ‘Y’. for proper operation, the
strobe input ‘ E’ ’ must be connected to ground.
.
Fig.3.14:MSI -IC-74151(8:1)MUX-Functional Table
Multiplexer is a combinational ckt. that is one of the most widely used in digital design. The
multiplexer is a data selector which gates one out of several i/ps to a single o/p. It has n data
i/ps & one o/p line & m select lines where 2m = n. Depending upon the digital code applied
at the select inputs one out of n data input is selected & transmitted to a single o/p channel.
Normally strobe(G) input is incorporated which is generally active low which enables the
multiplexer when it is LOW. Strobe i/p helps in cascading no. of ICs that are available such as
74157, 74158(Quad 2:1 mux), 74352, 74153 (dual 4:1 Mux.), 74151A, 74152 (8:1 Mux.),
74150 (16:1 Mux). IC 74151A is a 8 : 1 multiplexer which provides two complementary o/ps
Y & Y´. The o/p Y is same as the selected i/p & Y´ is its complement. Then any multiplexer
can be used to realize any m variable function. (2m= n, m is no. of select inputs).
The Demultiplexer:
The data distributor, known more commonly as a Demultiplexer or "Demux", is the exact
opposite of the Multiplexer. The demultiplexer takes one single input data line and then
10
Digital Circuit Design
switches it to any one of a number of individual output lines one at a time. The
demultiplexer converts a serial data signal at the input to a parallel data at its output lines
as shown below.
Fig.3.15: [a]1-to-4 Channel De-multiplexer[b] 4 Channel Demultiplexer using Logic Gate [c]
Demultiplexer Symbol
Standard Demultiplexer IC packages available are the TTL 74LS138 1 to 8-output demultiplexer,
the TTL 74LS139 Dual 1-to-4 output demultiplexer or the CMOS CD4514 1-to-16 output
demultiplexer. Another type of demultiplexer is the 24-pin, 74LS154 which is a 4-bit to 16-line
demultiplexer/decoder. Here the individual output positions are selected using a 4-bit binary
coded input. Like multiplexers, demultiplexers can also be cascaded together to form higher
order demultiplexers.
Unlike multiplexers which convert data from a single data line to multiple lines and
demultiplexers which convert multiple lines to a single data line, there are devices available
which convert data to and from multiple lines and in the next tutorial about combinational logic
devices, we will look at Encoders which convert multiple input lines into multiple output lines,
converting the data from one form to another.
Demultiplex means one into many. Input and many outputs. By applying control signals, we can
steer the input signal to one of the output lines. The block diagram of a simple is as shown below:
11
Digital Circuit Design
Functional Table:
Demux takes single i/p & distributes it over several o/ps. It has one data line, n o/p lines & m
select lines where 2 m = n. MSI ICs available in TTL family for demux. are 74138(3 line to 8
line decoder/demux.), 74139(dual 2 to 4 line decoder/driver.), 74154(4 to 16 line decoder/
demux), 74155(dual 2 to 4 line decoder) etc. IC 74155 is a dual 2 to 4 line decoder. It has
two sets of active low outputs1Y0 to 1Y3 & 2Y0 to 2Y3. A & B are the select terminals
common for both the demux. C1, C2 & G1, G2 are the data lines& strobe (enable) inputs for
the two demux. C1 is active high, C2,G1, G2 are active low. The two 2 line to 4 line demux.
can be combined to implement 3 line to 8 line demux.
12
Digital Circuit Design
Fig.3.18 : (a)Comparator using Ex-OR gate(b)7485 TTL 4-bit comparator Pin Diagram
The truth table :- The action of the entries A > B, A < B and A = B.
13
Digital Circuit Design
1. If it is wished that the exit A = B pass to state 1 each time the two binary numbers are
equal, it is enough to carry the entry A = B to state 1, the state of entries A < B and A > B
not having then importance.
2. If it is wished that the exit A > B also pass to state 1 if the two binary numbers are equal,
it is enough to carry the entry A > B to state 1 and to carry the entries A < B and A = B to
state 0.
3. In this configuration of the state of the entries A > B, A < B and A = B, exit A > B is with
state 1 when binary number A is higher than the binary number B or when these two
numbers are equal. It thus indicates if A > B.
4. In the same way, while carrying entry A < B with state 1 and entries A > B and A = B with
state 0, the exit A < B indicates binary number A is lower or equal to the binary number
B.
Decoders:
A decoder is a logic circuit that reads a binary value represented on a set of inputs and
activates one of the outputs that corresponds to the binary value. For N inputs there will be
2N outputs. Only one output can be active at any given time
Decoder vs. DEMUX
3-8 decoder: 3 data inputs, 8 outputs
1-8 DEMUX: 1 data input, 3 control inputs, 8 outputs
Add enable control bit to decoder:
e = 0: all outputs are 0
e = 1: behaves like regular decoder
14
Digital Circuit Design
Features:
1. Demultiplexing capability
2. Multiple input enable for easy expansion
3. Complies with JEDEC standard no. 7A
4. ideal for memory chip select decoding
5. Active LOW mutually exclusive outputs
6. ESD protection:
HBM EIA/JESD22-A114F exceeds 2000 V
MM EIA/JESD22-A115-A exceeds 200 V
7. Multiple package options
8. Specified from −40 C to +85 C and from −40 C to +125 C
Encoders:
An encoder is a logic circuit that produces a binary value output based upon the active input
(s). For 2N inputs there will be N outputs. A standard encoder circuit allows one input to be
active at a time. Priority encoders allow multiple inputs to be activated and will generate an
output code based upon the highest numbered input.
15
Digital Circuit Design
for example. Here, we could use an 8-to-3 Encoder. The 74HC148 encoder is one chip that will do
the trick
Fig.3.23:IC74148 as Encoder
Here, inputs 0-7 are the input signals -- again, these are Active-LOW. The chip encodes the input
into a 3digit output, A0 (1's bit), A1 (2's bit), and A3 (4's bit).
EI enables the inputs. When it is LOW, the chip works properly. When it's HIGH, all outputs
are set to HIGH regardless of the input. EO and GS are outputs that we can ignore for now.
The encoder and decoder chips allow us to maximize the use of inputs and outputs. Since
the RCX has only 3 of each, it's handy to be able to get more than 3 pieces of information
back and forth at any one time.
16
Digital Circuit Design
Q.1] What is the difference between Half Adder & A Full Adder? Implement Full Adder using Half
Adder
Q.2] Implement the following function Using 4:1MUX with active low strobe in put
[1]F(A,B,C,D)=∑(2,3,5,7,8,9,12,13,14,15) [2]implement Full Adder using two 4:1 MUX
Q.3] What is the difference between Half Subtractor &Full Subtractor? Implement Full Subtractor
using Half Subtractor
Q.4] Design the circuit for 4 bit combinational incrementer [circuit adds 4 one to 4 bit binary
number) using 4 Half Adders
Q.5] Design &Explain 8 bit binary Adder Using IC 7483
Q.6] Explain comparator chip IC7485 &working of IC 7485
Q.11] Explain the feature of IC 74138(1:8DE-MUX);Implement the full subtractor using 1:8
DEMUX
17
Unit III – Combinational Logic Circuits
✓ Standard Boolean representation: Sum of Product (SOP) &
Product of Sum (POS), Maxterm and Minterm , Conversion
between SOP and POS forms, realization using NAND/NOR gates.
Module-3 10/17/2024 1
Design of Gray to Binary Code Converter
Block Diagram:
G3 B3
G2 Gray to Binary B2 Binary
Gray
Inputs G1
Code B1
Outputs
converter B0
G0
Module-3 10/17/2024 2
Design of Gray to Binary Code Converter
Truth Table :
Gray Inputs Binary Outputs Gray Inputs Binary Outputs
G3 G2 G1 G0 B3 B2 B1 B0 G3 G2 G1 G0 B3 B2 B1 B0
0 0 0 0 0 0 0 0 1 0 0 0 1 1 0 0
0 0 0 1 0 0 0 1 1 0 0 1 1 1 0 1
0 0 1 0 0 0 1 1 1 0 1 0 1 1 1 1
0 0 1 1 0 0 1 0 1 0 1 1 1 1 1 0
0 1 0 0 0 1 1 0 1 1 0 0 1 0 1 0
0 1 0 1 0 1 1 1 1 1 0 1 1 0 1 1
0 1 1 0 0 1 0 1 1 1 1 0 1 0 0 1
0 1 1 1 0 1 0 0 1 1 1 1 1 0 0 0
9Module-3
/10/201 Amit Nevase
10/17/2024 137
8
Design of Gray to Binary Code Converter
K-map for B0: G1G0 G1G0 G1G0 G1G0 G1G0
G 3G 2 00 01 11 10
0 1 3 2
G3G2 00 0 1 0 1
4 5 7 6
GG23 01 1 0 1 0
12 13 15 14
G3G2 11 0 1 0 1
8 9 11 10
G3G2 10 1 0 1 0
Module-3 10/17/2024
Design of Gray to Binary Code Converter
K-map for B1: G1G0 G1G0 G1G0 G1G0 G1G0
G 3G 2 00 01 11 10
0 1 3 2
G3G2 00 0 0 1 1
4 5 7 6
GG23 01 1 1 0 0
12 13 15 14
G3G2 11 0 0 1 1
8 9 11 10
G3G2 10 1 1 0 0
B1 = G3G2G1 + G3G2G1 + G 3 G 2 G 1 + G 3 G 2 G 1
B1 = G 3 G 2 G1
Module-3 10/17/2024
Design of Gray to Binary Code Converter
K-map for B2: G1G0 G1G0 G1G0 G1G0 G1G0
G 3G 2 00 01 11 10
0 1 3 2
G3G2 00 0 0 0 0
4 5 7 6
GG23 01 1 1 1 1
12 13 15 14
G3G2 11 0 0 0 0
8 9 11 10
G3G2 10 1 1 1 1
B2 = G3G2 + G3G2
B1 = G 3 G 2
Module-3 10/17/2024
Design of Gray to Binary Code Converter
B3 = G3
Module-3 10/17/2024
Design of Gray to Binary Code Converter
Logic Diagram:
G3 G2 G1 G0
B3
B2 = G 3 G 2
B1 = G1 G2 G3
B0 = G0 G1 G2 G3
Module-3 10/17/2024
Unit III – Combinational Logic Circuits
✓ Standard Boolean representation: Sum of Product (SOP) &
Product of Sum (POS), Maxterm and Minterm , Conversion
between SOP and POS forms, realization using NAND/NOR gates.
Module-3 10/17/2024
Design of Binary to Gray Code Converter
Block Diagram:
B3 G3
B2 Binary to Gray G2
Binary Code Gray
Inputs B1 G1 Outputs
converter
B0 G0
Module-3 10/17/2024
Design of Binary to Gray Code Converter
Truth Table :
Binary Inputs Gray Outputs Binary Inputs Gray Outputs
B3 B2 B1 B0 G3 G2 G1 G0 B3 B2 B1 B0 G3 G2 G1 G0
0 0 0 0 0 0 0 0 1 0 0 0 1 1 0 0
0 0 0 1 0 0 0 1 1 0 0 1 1 1 0 1
0 0 1 0 0 0 1 1 1 0 1 0 1 1 1 1
0 0 1 1 0 0 1 0 1 0 1 1 1 1 1 0
0 1 0 0 0 1 1 0 1 1 0 0 1 0 1 0
0 1 0 1 0 1 1 1 1 1 0 1 1 0 1 1
0 1 1 0 0 1 0 1 1 1 1 0 1 0 0 1
0 /10/1201
9Module-3 1 1 0 1 0 Amit Nevas1e
010/17/2024 1 1 1 1 0 0 145 0
8
Design of Binary to Gray Code Converter
B1B0 B1B0
Module-3 10/17/2024
Design of Binary to Gray Code Converter
B2B1 B2B1
Module-3 10/17/2024
Design of Binary to Gray Code Converter
G2 = B3B2 + B3B2
4 5 7 6
B B23 01 1 1 1 1
12 13 15 14
B3B2 11 0 0 0 0 G2 = B3 B2
8 9 11 10
B3B2 10 1 1 1 1
B3B2 B3B2
Module-3 10/17/2024
Design of Binary to Gray Code Converter
B B23 01 0
4
0
5
0
7
0
6
G 3 = B3
12 13 15 14
B3B2 11 1 1 1 1
8 9 11 10
B3B2 10 1 1 1 1
B3
Module-3 10/17/2024
Design of Binary to Gray Code Converter
Logic Diagram:
B3 B2 B1 B0
G3
G 2 = B3 B 2
G1 = B2 B1
G0 = B1 B0
Module-3 10/17/2024
IC 7483 4 – Bit Binary Parallel Adder
IC 7483 Cin
C0
Carry
Carry
Input
Output
S3 S 2 S1 S0
Sum Output
Module-3 10/17/2024
Cascading of IC 7483
✓ If we want to add two 8 bit binary numbers using 4 bit binary parallel adder IC 7483,
then we have to cascade the two ICs in following way
C in C0
C0 IC 7483-II IC 7483-I C in
Carry Carry
Output Input
S7 S6 S5 S4 S3 S 2 S1 S0
Sum Output
Module-3 10/17/2024
Design of 1 Digit BCD Adder
Block Diagram: A BCD no. B BCD no.
C0 IC 7483-I
S 3 S 2 S1 S 0 C in
Logic
Circuit
IC 7483-II
C0 C in
Module-3
9/10/2018 10/17/2024
Amit Nevase S3 S 2 S1 S0 158
Design of 1 Digit BCD Adder
S3 S2 S1 S0 S3 S2 S1 S0
0 0 0 0 0 1 0 0 0 0
0 0 0 1 0 1 0 0 1 0
0 0 1 0 0 1 0 1 0 1
0 0 1 1 0 1 0 1 1 1
Sum is
0 1 0 0 0 1 1 0 0 1 invalid
BCD
0 1 0 1 0 1 1 0 1 1 Number
Y=1
0 1 1 0 0 1 1 1 0 1
0 1 1 1 0 1 1 1 1 1
Module-3 10/17/2024
Design of 1 Digit BCD Adder
S3S2 S1S3
Module-3 10/17/2024
Design of 1 Digit BCD Adder
A BCD no. B BCD no.
Combinational
Logic Circuit
C0 IC 7483-I
S 3 S 2 S1 S 0 C in
Y' Y
C0
IC 7483-II
Not used C in
S3 S 2 S1 S0
Carry output
Module-3
9/10/2018 10/17/2024
Amit Nevase 162
BCD Output Sum
4 Bit Binary Parallel Subtractor using IC 7483
Vcc +5V
C0
Carry IC 7483 Cin = 1
Output S3 S 2 S1 S0 It adds 1 to 1’s
complement of B
Difference Output
Module-3 10/17/2024
IC 7483 as Parallel Adder/Subtractor
B Binary number
B3 B2 B1 B0
A Binary number
M
A 3 A 2 A1 A 0 Mode
Select
C0
Carry IC 7483
C in
Output S3 S 2 S1 S0
Module-3 10/17/2024
Multiplexers
Module-3 10/17/2024
Necessity of Multiplexers
✓ In most of the electronic systems, the digital data is
available on more than one lines. It is necessary to route
this data over a single line.
✓ Under such circumstances we require a circuit which
select one of the many inputs at a time.
✓ This circuit is nothing but a multiplexer. Which has many
inputs, one output and some select lines.
✓ Multiplexer improves the reliability of the digital system
because it reduces the number of external wired
connections.
Module-3 10/17/2024
Advantages of Multiplexers
Module-3 10/17/2024
Applications of Multiplexers
✓In D to A converters.
D0 D0
D1 D1
Data D2 D2
Inputs D3 Y
D3
. n:1 .
. .
. Mux Output .
. . Output
. .
Dn-1 Dn-1
E
Enable Input
. . .. . . ..
Sm-1 S2 S1 s0 Sm-1 S2 S1 s0
Select Lines
Module-3 10/17/2024
Relation between Data Input Lines & Select Lines
that 2m=n.
Module-3 10/17/2024
Types of Multiplexers
✓2:1 Multiplexer
✓4:1 Multiplexer
✓8:1 Multiplexer
✓16:1 Multiplexer
✓32:1 Multiplexer
✓64:1 Multiplexer
and so on…………
Module-3 10/17/2024
2:1 Multiplexer
Data D0
Inputs 2:1 Y
D1 Block Diagram
Mux
Output
E
Enable Input
s
Select Lines
Enable i/p Select i/p Output
(E) (S) (Y)
0 X 0
Truth Table 1 0 D0
1 1 D1
Module-3 10/17/2024
Realization of 2:1 Mux using gates
S D1 D0
S
SD0
Y
Output
SD 1
E
Enable Input
Module-3 10/17/2024
4:1 Multiplexer
Output
Enable i/p Select i/p
D0
D1 E S1 S0 Y
Data
Y
Inputs D2 4:1
Mux 0 X X 0
D3 Output
D0
1 0 0
E
1 0 1 D1
Enable Input
S1 S0
1 1 0 D2
Select Lines
D3
1 1 1
Module-3 10/17/2024
Realization of 4:1 Mux using gates
S1 S0
S1S 0D0
D0
S1S 0 D 1
D1 Y
Output
D2
S1S 0D2
E
D3 S1S 0 D3 Enable Input
Module-3 10/17/2024
8:1 Multiplexer
Block Diagram
Truth Table
D0
Outp
D1 Enable
Select i/p ut
i/p
D2
D3 E S2 S1 S0 Y
Data
Y
Inputs D4 8:1 0 X X X 0
Mux Output 1 0 0 0 D0
D5
1 0 0 1 D1
D6
1 0 1 0 D2
D7
1 0 1 1 D3
1 1 0 0 D4
E
1 1 0 1 D5
Enable Input
1 1 1 0 D6
S2 S1 S0 1 1 1 1 D7
Module-3
9/10/2018 Select Lines 10/17/2024
Amit Nevase 211
16:1 Multiplexer
Block Diagram
D0
D1
D2
D3
D4
D5
Data D6 Y
Inputs D7 16:1
D8 Mux
D9 Output
D10
D11
D12
D13
D14
D15
E
Enable Input
S3 S2 S1 S0
Select Lines
Module-3
9/10/2018 10/17/2024
Amit Nevase 212
Enable Select Lines Output
16:1 Multiplexer
E S3 S2 S1 S0 Y
0 X X X X 0
1 0 0 0 0 D0
1 0 0 0 1 D1
1 0 0 1 0 D2
1 0 0 1 1 D3
1 0 1 0 0 D4
1 0 1 0 1 D5
Truth Table 1 0 1 1 0 D6
1 0 1 1 1 D7
1 1 0 0 0 D8
1 1 0 0 1 D9
1 1 0 1 0 D10
1 1 0 1 1 D11
1 1 1 0 0 D12
1 1 1 0 1 D13
1 1 1 1 0 D14
Module-3
9/10/2018 Amit Nevase
10/17/2024 213
1 1 1 1 1 D
Mux Tree
Module-3 10/17/2024
8:1 Multiplexer using 4:1 Multiplexer
D0
D1
Y1
D2 4:1
Mux
D3
S2 E S1 S0 Y
Select
Lines S1
S0 Output
S1 S0
D4
D5
4:1
D6 Mux
Y2
D7
E
Module-3 10/17/2024
8:1 Multiplexer using 4:1 Multiplexer
D0
D1
Y1
D2 4:1
Mux
D3
D0
E S1 S0 2:1 Y
D1
S1 Mux
S0 Output
E
S1 S0
D4
D5 S2
4:1
D6 Mux
Y2
D7
E
Module-3 10/17/2024
D0
4:1 Y1
16:1 Mux using 4:1 Mux
D1
D2 Mux
D3
S1 S0
S1
S0
D4 S1 S0
D5 4:1 Y2
D6 Mux
D7
D0
4:1 Y
D1
D2 Mux
D3 S S0 Output
D8 1
D9 4:1 Y3
D10 Mux
D11
S1 S0 S3 S2
D12 S1 S0
D13 4:1 Y4
D14 Mux
Module-3
9/10/2018 D15 10/17/2024
Amit Nevase 217
Thank You
Module-3 10/17/2024
Realization of Boolean expression using Mux
using Multiplexers.
Module-3 10/17/2024
Example 1
f ( A, B , C ) = m ( 0 , 3, 5, 6 )
+Vcc f ( A, B , C ) = m ( 0 , 3, 5, 6 )
D0
D1
D2
D3
Y
D4 8:1
Mux
Output
D5
D6
D7
E S2 S1 S0
A B C
Module-3 10/17/2024
Example 2
f ( A, B , C , D ) = m ( 0 , 2, 3, 6 , 8 , 9 , 1 2 , 14)
+Vcc
f ( A, B , C , D ) = m ( 0 , 2, 3, 6 , 8 , 9 , 1 2 , 1 4 )
D0
D1
D2
D3
D4
D5
D6 Y
D7 16:1
D8 Mux
D9 Output
D10
D11
D12
D13
D14
D15
S3 S2 S1 S0
E
A B C D
Module-3 10/17/2024
Unit III – Combinational Logic Circuits
Module-3 10/17/2024
De-multiplexer
Y0 Y0
Y1 Y1
Y2 Y2
Data Y3 Y3
Input 1:n . Data .
. .
De-mux .
Outputs Input .
Output
. .
. .
Yn-1 Yn-1
E
Enable
Input . . .. . . ..
Sm-1 S2 S1 s0 Sm-1 S2 S1 s0
Select Lines
Module-3 10/17/2024
Relation between Data Output Lines & Select Lines
that n=2m.
Module-3 10/17/2024
Types of De-multiplexers
✓1:2 De-multiplexer
✓1:4 De-multiplexer
✓1:8 De-multiplexer
✓1:16 De-multiplexer
✓1:32 De-multiplexer
✓1:64 De-multiplexer
and so on…………
Module-3 10/17/2024
1: 2 De-multiplexer
Y0
Data Din 1:2
Block Diagram
Input De-mux
Y1
E
Enable
Input S
Select Lines
E S Y0 Y1
Truth Table 0 X 0 0
1 0 Din 0
1 1 0 Din
Module-3 10/17/2024
1:2 De-mux using basic gates
E Din S
S
Y0
Y1
Module-3 10/17/2024
1: 4 De-multiplexer
Y0
Data Din 1:4 Y1
Block Diagram
Input De-mux Y2
Y3
E
Enable
Input Enable
S1 S0 Select i/p Outputs
Select Lines i/p
E S1 S0 Y0 Y1 Y2 Y3
0 X X 0 0 0 0
1 0 0 Din 0 0 0
1 1 0 0 0 Din 0
1 1 1 0 0 0 Din
Module-3 10/17/2024
1:4 De-mux using basic gates
E Din S 1 S0
S1 S0
Y0
Y1
Y2
Y3
Module-3 10/17/2024
1: 8 De-multiplexer
Block Diagram
Y0
Y1
Data Din Y2
1:8 Y3
Input Y4
De-mux
Y5
Y6
E Y7
Enable
Input
S2 S1 S0
Select Lines
Module-3 10/17/2024
1: 8 De-multiplexer
Truth Table
Enabl
Select i/p Outputs
e i/p
E S2 S1 S0 Y7 Y6 Y5 Y4 Y3 Y2 Y1 Y0
0 X X X 0 0 0 0 0 0 0 0
1 0 0 0 0 0 0 0 0 0 0 Din
1 0 0 1 0 0 0 0 0 0 Din 0
1 0 1 0 0 0 0 0 0 Din 0 0
1 0 1 1 0 0 0 0 Din 0 0 0
1 1 0 0 0 0 0 Din 0 0 0 0
1 1 0 1 0 0 Din 0 0 0 0 0
1 1 1 0 0 Din 0 0 0 0 0 0
1 9/10 /2011
Module-3 8 1 1 Din 010/17/2024
Amit N evase0 0 0 0 0 233
1: 16 De-multiplexer
Y0
Block Diagram
Y1
Y2
Y3
Y4
Y5
Y6
Din
Data Y7
Input Y8
1:16
Y9
De-mux
Y10
Y11
Y12
Y13
Y14
E Y15
Enable
Input
S3 S2 S1 S0
Module-3 10/17/2024
De-mux Tree
Module-3 10/17/2024
1:4 De-mux using 1:2 De-mux
Data Y0 Y0
1:2
Input Din De-mux
Y1 Y1
S1 E S0
Select
Lines
S0
S0
Y0 Y2
Din 1:2
De-mux
Y1 Y3
E
Module-3 10/17/2024
1:16 De-mux using 1:4 De- Y0
1:4 Y1
mux Din De-mux Y2
Y3
S1 S0
S1 S0 Y4
1:4 Y5
Din Y6
Data Y0 De-mux
Din 1:4 Y7
Input Y1
De-mux Y2
Y3
S1 S0
Y8
1:4 Y9
Din De-mux
Y10
S3 S2 S1 S0 Y11
S1 S0 Y12
Din 1:4 Y13
De-mux Y14 S1 S0
Module-3
9/10/2018 10/17/2024
Amit Nevase Y15 237
Decoder
decoder
Module-3 10/17/2024
2:4 Decoder
Y0
A
2:4 Y1
Inputs Block Diagram
B Decoder Y2
Y3
E Enable
Input Enable
Data Inputs Outputs
i/p
E A B Y0 Y1 Y2 Y3
0 X X 0 0 0 0
1 0 0 1 0 0 0
Truth Table
1 0 1 0 1 0 0
1 1 0 0 0 1 0
1 1 1 0 0 0 1
Module-3 10/17/2024
De-multiplexer as Decoder
decoder.
Module-3 10/17/2024
1:4 De-multiplexer as 2:4 Decoder
Vcc
Y0 Din Y0
A S1
Data Din 1:4 Y1
Inputs
1:4 Y1
Input De-mux Y2 De-mux Y2
B S0
Y3 Y3
E
Enable E Enable
Input S1 S0 Input
Select Lines
Module-3 10/17/2024
Realization of Boolean expression using De-mux
using de-multiplexers.
Module-3 10/17/2024
Example 1
f ( A, B , C ) = m ( 0 , 3, 5, 6 )
f ( A, B , C ) = m ( 0 , 3, 5, 6 )
+Vcc Y0
Y1
Data Y2
Din 1:8 Y3 Y
Input
De-mux Y4
Y5
Y6
E S2 S1 S0 Y7
Enable
Input
A B C
Module-3 10/17/2024
Example 2
f ( A, B , C , D ) = m ( 0 , 2, 3, 6 , 8 , 9 , 1 2 , 1 4 )
Module-3 10/17/2024
Example 2 continue…..
Y0
Y1
Y2
+Vcc Y3
Y4
Y5
Y6
Data 1:16 Y7 Y
Input De-mux Y8
Din
Y9
Y10
Y11
Y12
Y13
Y14
E S3 S2 S1 SY0 15
Enable
Input f ( A, B , C , D ) = m ( 0 , 2, 3, 6 , 8 , 9 , 1 2 , 1 4)
A B C D
Module-3 10/17/2024
References
✓ Digital Principles by Malvino
Leach
✓ Modern Digital Electronics
by R.P. Jain
✓ Digital Electronics, Principles
and Integrated Circuits by
Anil K. Maini
✓ Digital Techniques by A.
Anand Kumar
Module-3 10/17/2024
Online Tutorials
✓ http://nptel.ac.in/video.php
?subjectId=117106086
✓ http://www.electronics-
tutorials.ws/combination/co
mb_1.html
✓ http://www.electronics-
tutorials.ws/combination/co
mb_2.html
Module-3 10/17/2024
Thank You
Module-3 10/17/2024
Digital Circuit Design
CHAPTER 5
Sequential Logic Principles
5.1 Motivation: Students will be able to design most complex high-speed digital circuits using Flip-
Flops.
5.2. Syllabus: -
5.5. Objective :
• To understand design goals and tradeoffs in Latches and Flip-flops and how they are
measured.
• To be able to describe operation of a wide range of flips and recognize how the individual
transistors determine operation
1
Digital Circuit Design
Q- Previous State
Q+- Present State.
5.8. Introduction
These two types of memory elements form the basic building blocks of the latch and flip-flop
memory elements
1] In sequential logic, the outputs depend not only on the inputs, but also on the preceding
input values... it has memory.
One or more output signals are connected back to the inputs via storage elements. These
circuits are called multivibrator.
Bistable elements such as flip-flops are most common but monostable and astable circuits are
also used.
The bistable element can be either static or dynamic and is an essential library element called a
register.
If the gain of the inverter in the transient region is greater than 1, there are only two stable
operating points.
2
Digital Circuit Design
Storing a new value usually involves applying a trigger pulse for a duration equal to the
propagation delay through the two inverters. The trigger pulse takes either Vi1 or Vi2
temporarily out of the region where the gain, G, is less than 1 to the unstable region where
G > 1.
Sequential Action: Sequential action means (i) to remember what steps are to be done next,
and (ii) to recall which step has just been finished
3] Sequential Circuit:
Definition A sequential circuit is a circuit made up by combining logic gates such that the
required logic at the output(s) depends not only on the current input logic conditions but also
on the past inputs, outputs and sequences
Sequential circuit Consist of a combinational circuit to which storage elements are connected to
form a feedback path
! State: The state of the memory devices now, also called current state
! Next states and outputs are functions of inputs and present states of storage elements
Features: 1] Sequential circuit has a feedback of the output(s) from a stage to the input of
either that stage or any previous stage
2] An output depends on the current input state and past input state (thus past output state)
3] An output(s) can remain stable (constant) even after the input conditions change
4]An output(s) at each stage appears after a delay of few tens or hundred ns depending upon
the gate type or family of used to implement the circuit
5]A sequential circuit may have a clock (gate) input to control the instance or time interval in
which the output gets affected as per the inputs to the sequential circuit and in which the
output undergoes transition to next state
Clock Input: Input after which the state at output(s) of sequential circuit undergoes transition to
next state
Asynchronous input (Level clocking)—A time interval defined by clock input during which input
changes reflect on the output
Synchronous input — (i) Edge +ve or –ve defines the instance at which input affects the output
and transition is to next state (ii) Master slave —at +ve edge at master section of circuit, there is
transition at master’s output and at – ve edge, the slave output undergoes transition as per
master output.
Sequential Circuit State Table: Sequential circuit has a state table (like truth table in a
combinational circuit) Sequences are specified by a table called state table. State table gives the
past, current and future states at the output.
A sequential circuit consists of a feedback path, and employs some memory elements
▪ Latches and flip-flops differ in the method used for changing their state.
1] Asynchronous sequential circuit-Depends upon the input signals at any instant of time and
their change order, May have better performance but hard to design
2] Synchronous sequential circuit Defined from the knowledge of its signals at discrete instants
of time, Much easier to design (preferred design style), Synchronized by a periodic train of clock
pulses
4
Digital Circuit Design
5.8.2 Sequential Logic: Latches and Flip-Flops (Conversions, timing considerations and meta
stability are not expected)
Latches:
• The basic circuits from which all flip-flops are constructed &Useful for storing binary
information and for the design of asynchronous sequential circuits
5
Digital Circuit Design
• Not practical for use in synchronous sequential circuits Avoid to use latches as possible in
synchronous sequential circuits to avoid design problems
• A circuit with two cross-coupled NOR gates or two cross-coupled NAND gates
A] SR Latch using NOR gates The SR latches constructed with two cross-coupled NOR gates are
active-high
B] SR Latch with NAND Gates The SR latches constructed with two cross-coupled NAND gates
are active-low
6
Digital Circuit Design
SR Latch with Control Input: Add an additional control input to determine when the state of
the latch can be changed
3] The D input goes directly to the S input and its complement is applied to the R input
7
Digital Circuit Design
Fig.5.9: D- Latch
8
Digital Circuit Design
As well as the two logic states mentioned above logic level "1" and logic level "0", a third
element is introduced that separates sequential logic circuits from their combinational logic
counterparts, namely TIME. Sequential logic circuits that return back to their original state once
reset, i.e. circuits with loops or feedback paths are said to be "cyclic" in nature. We now know
that in sequential circuits changes occur only on the application of a clock signal making it
synchronous, otherwise the circuit is asynchronous and depends upon an external input. To
retain their current state, sequential circuits rely on feedback and this occurs when a fraction of
the output is fed back to the input and this is demonstrated as:
9
Digital Circuit Design
4] SR Flip-Flop:
The SR flip-flop, also known as a SR Latch, can be considered as one of the most basic sequential
logic circuit possible. This simple flip-flop is basically a one-bit memory bistable device that has
two inputs, one which will "SET" the device (meaning the output = "1"), and is labelled S and
another which will "RESET" the device (meaning the output = "0"), labelled R.
Then the SR description stands for "Set-Reset". The reset input resets the flip-flop back to its
original state with an output Q that will be either at a logic level "1" or logic "0" depending upon
this set/reset condition.
A basic NAND gate SR flip-flop circuit provides feedback from both of its outputs back to its
opposing inputs and is commonly used in memory circuits to store a single data bit. Then the SR
flip-flop actually has three inputs, Set, Reset and its current output Q relating to it's current
state or history. The term "Flip-flop" relates to the actual operation of the device, as it can be
"flipped" into one logic Set state or "flopped" back into the opposing logic Reset state.
10
Digital Circuit Design
both inputs to NAND gate X are at logic level "1", and therefore its output Q must be at logic
level "0".
Again NAND gate principals. If the reset input R changes state, and goes HIGH to logic "1" with S
remaining HIGH also at logic level "1", NAND gate Y inputs are now R = "1" and B = "0". Since
one of its inputs is still at logic level "0" the output at Q still remains HIGH at logic level "1" and
there is no change of state. Therefore, the flip-flop circuit is said to be "Latched" or "Set" with Q
= "1" and Q = "0".
Reset State
In this second stable state, Q is at logic level "0", (not Q = "0") its inverse output at Q is at logic
level "1", (Q = "1"), and is given by R = "1" and S = "0". As gate X has one of its inputs at logic "0"
its output Q must equal logic level "1" (again NAND gate principles). Output Q is fed back to
input "B", so both inputs to NAND gate Y are at logic "1", therefore, Q = "0".
If the set input, S now changes state to logic "1" with input R remaining at logic "1", output Q
still remains LOW at logic level "0" and there is no change of state. Therefore, the flip-flop
circuits "Reset" state has also been latched and we can define this "set/reset" action in the
following truth table.
Truth Table for this Set-Reset Function:
State S R Q Q Description
1 0 0 1 Set Q » 1
Set
1 1 0 1 no change
0 1 1 0 Reset Q » 0
Reset
1 1 1 0 no change
Invalid 0 0 1 1 Invalid Condition
It can be seen that when both inputs S = "1" and R = "1" the outputs Q and Q can be at either
logic level "1" or "0", depending upon the state of the inputs S or R BEFORE this input condition
existed. Therefore the condition of S = R = "1" does not change the state of the outputs Q and Q.
However, the input state of S = "0" and R = "0" is an undesirable or invalid condition and must
be avoided. The condition of S = R = "0" causes both outputs Q and Q to be HIGH together at
logic level "1" when we would normally want Q to be the inverse of Q. The result is that the flip-
flop looses control of Q and Q, and if the two inputs are now switched "HIGH" again after this
condition to logic "1", the flip-flop becomes unstable and switches to an unknown data state
based upon the unbalance as shown in the following switching diagram.
11
Digital Circuit Design
12
Digital Circuit Design
Edge-triggered flip-flops require a nice clean signal transition, and one practical use of this type
of set-reset circuit is as a latch used to help eliminate mechanical switch "bounce". As its name
implies, switch bounce occurs when the contacts of any mechanically operated switch, push-
button or keypad are operated and the internal switch contacts do not fully close cleanly, but
bounce together first before closing (or opening) when the switch is pressed.
This gives rise to a series of individual pulses which can be as long as tens of milliseconds that an
electronic system or circuit such as a digital counter may see as a series of logic pulses instead of
one long single pulse and behave incorrectly. For example, during this bounce period the output
voltage can fluctuate wildly and may register multiple input counts instead of one single count.
Then set-reset SR Flip-flops or Bistable Latch circuits can be used to eliminate this kind of
problem and this is demonstrated below.
Depending upon the current state of the output, if the set or reset buttons are depressed the
output will change over in the manner described above and any additional unwanted inputs
(bounces) from the mechanical action of the switch will have no effect on the output at Q.
When the other button is pressed, the very first contact will cause the latch to change state, but
any additional mechanical switch bounces will also have no effect. The SR flip-flop can then be
RESET automatically after a short period of time, for example 0.5 seconds, so as to register any
additional and intentional repeat inputs from the same switch contacts, such as multiple inputs
from a keyboards "RETURN" key.
Commonly available IC's specifically made to overcome the problem of switch bounce are the
MAX6816, single input, MAX6817, dual input and the MAX6818 octal input switch debouncer
13
Digital Circuit Design
IC's. These chips contain the necessary flip-flop circuitry to provide clean interfacing of
mechanical switches to digital systems.
Set-Reset bistable latches can also be used as Monostable (one-shot) pulse generators to
generate a single output pulse, either high or low, of some specified width or time period for
timing or control purposes. The 74LS279 is a Quad SR Bistable Latch IC, which contains four
individual NAND type bistable's within a single chip enabling switch debounce or
monostable/astable clock circuits to be easily constructed.
Fig.5.19.Gated SR Flip-flop
When the Enable input "EN" is at logic level "0", the outputs of the two AND gates are also at
logic level "0", (AND Gate principles) regardless of the condition of the two inputs S and R,
latching the two outputs Q and Q into their last known state. When the enable input "EN"
14
Digital Circuit Design
changes to logic level "1" the circuit responds as a normal SR bistable flip-flop with the two
ANDgates becoming transparent to the Set and Reset signals.
This additional enable input can also be connected to a clock timing signal (CLK) adding clock
synchronization to the flip-flop creating what is sometimes called a "Clocked SR Flip-flop". So a
Gated Bistable SR Flip-flop operates as a standard bistable latch but the outputs are only
activated when a logic "1" is applied to its EN input and deactivated by a logic "0".
In the next tutorial about Sequential Logic Circuits, we will look at another type of simple edge-
triggered flip-flop which is very similar to the RS flip-flop called a JK Flip-flop named after its
inventor, Jack Kilby. The JK flip-flop is the most widely used of all the flip-flop designs as it is
considered to be a universal device.
9] The JK Flip-flop:
From the previous tutorial we now know that the basic gated SR NAND flip-flop suffers from two
basic problems: number one, the S = 0 and R = 0 condition or S = R = 0 must always be avoided,
and number two, if S or R change state while the enable input is high the correct latching action
may not occur. Then to overcome these two fundamental design problems with the SR flip-flop,
the JK flip-Flop was developed.
This simple JK flip-Flop is the most widely used of all the flip-flop designs and is considered to be
a universal flip-flop circuit. The sequential operation of the JK flip-flop is exactly the same as for
the previous SR flip-flop with the same "Set" and "Reset" inputs. The difference this time is that
the JK flip-flop has no invalid or forbidden input states of the SR Latch (when S and R are both 1).
The JK flip-flop is basically a gated SR flip-flop with the addition of a clock input circuitry that
prevents the illegal or invalid output condition that can occur when both inputs S and R are
equal to logic level "1". Due to this additional clocked input, a JK flip-flop has four possible input
combinations, "logic 1", "logic 0", "no change" and "toggle". The symbol for a JK flip-flop is
similar to that of an SR Bistable Latch as seen in the previous tutorial except for the addition of
a clock input.
The Basic JK Flip-flop
15
Digital Circuit Design
Input Output
Description
J K Q Q
0 0 0 0 Memory
same as no change
0 0 0 1
for the
SR Latch 0 1 1 0
Reset Q » 0
0 1 0 1
1 0 0 1
Set Q » 1
1 0 1 0
toggle 1 1 0 1
Toggle
action 1 1 1 0
Then the JK flip-flop is basically an SR flip-flop with feedback which enables only one of its two
input terminals, either SET or RESET to be active at any one time thereby eliminating the invalid
condition seen previously in the SR flip-flop circuit. Also when both the J and the K inputs are at
logic level "1" at the same time, and the clock input is pulsed either "HIGH", the circuit will
"toggle" from its SET state to a RESET state, or visa-versa. This results in the JK flip-flop acting
more like a T-type toggle flip-flop when both terminals are "HIGH".
16
Digital Circuit Design
Although this circuit is an improvement on the clocked SR flip-flop it still suffers from timing
problems called "race" if the output Q changes state before the timing pulse of the clock input
has time to go "OFF". To avoid this the timing pulse period ( T ) must be kept as short as possible
(high frequency). As this is sometimes not possible with modern TTL IC's the much improved
Master-Slave JK Flip-flop was developed.
The master-slave flip-flop eliminates all the timing problems by using two SR flip-flops
connected together in a series configuration. One flip-flop acts as the "Master" circuit, which
triggers on the leading edge of the clock pulse while the other acts as the "Slave" circuit, which
triggers on the falling edge of the clock pulse. This results in the two sections, the master section
and the slave section being enabled during opposite half-cycles of the clock signal.
The 74LS73 is a Dual JK flip-flop IC, which contains two individual JK type bistable's within a
single chip enabling single or master-slave toggle flip-flops to be made. Other JK flip-flop IC's
include the 74LS107 Dual JK flip-flop with clear, the 74LS109 Dual positive-edge triggered JK flip-
flop and the 74LS112 Dual negative-edge triggered flip-flop with both preset and clear inputs.
Dual JK Flip-flop 74LS73
17
Digital Circuit Design
The input signals J and K are connected to the gated "master" SR flip-flop which "locks" the
input condition while the clock (Clk) input is "HIGH" at logic level "1". As the clock input of the
"slave" flip-flop is the inverse (complement) of the "master" clock input, the "slave" SR flip-flop
does not toggle. The outputs from the "master" flip-flop are only "seen" by the gated "slave"
flip-flop when the clock input goes "LOW" to logic level "0".
When the clock is "LOW", the outputs from the "master" flip-flop are latched and any additional
changes to its inputs are ignored. The gated "slave" flip-flop now responds to the state of its
inputs passed over by the "master" section. Then on the "Low-to-High" transition of the clock
pulse the inputs of the "master" flip-flop are fed through to the gated inputs of the "slave" flip-
flop and on the "High-to-Low" transition the same inputs are reflected on the output of the
"slave" making this type of flip-flop edge or pulse-triggered.
Then, the circuit accepts input data when the clock signal is "HIGH", and passes the data to the
output on the falling-edge of the clock signal. In other words, the Master-Slave JK Flip-flop is a
"Synchronous" device as it only passes data with the timing of the clock signal.
One of the main disadvantages of the basic SR NAND Gate bistable circuit is that the
indeterminate input condition of "SET" = logic "0" and "RESET" = logic "0" is forbidden. This state
will force both outputs to be at logic "1", over-riding the feedback latching action and whichever
input goes to logic level "1" first will lose control, while the other input still at logic "0" controls
the resulting state of the latch.
But in order to prevent this from happening an inverter can be connected between the "SET"
and the "RESET" inputs to produce another type of flip-flop circuit called a Data Latch, Delay
flip-flop, D-type Bistable or simply a D-type flip-flop as it is more generally called.
The D flip-flop is by far the most important of the clocked flip-flops as it ensures that ensures
that inputs S and R are never equal to one at the same time. D-type flip-flops are constructed
from a gated SR flip-flop with an inverter added between the S and the R inputs to allow for a
single D (data) input. This single data input D is used in place of the "set" signal, and the inverter
is used to generate the complementary "reset" input thereby making a level-sensitive D-type
flip-flop from a level-sensitive RS-latch as now S = D and R = not D as shown.
D flip-flop Circuit
18
Digital Circuit Design
We remember that a simple SR flip-flop requires two inputs, one to "SET" the output and one to
"RESET" the output. By connecting an inverter (NOT gate) to the SR flip-flop we can "SET" and
"RESET" the flip-flop using just one input as now the two input signals are complements of each
other. This complement avoids the ambiguity inherent in the SR latch when both inputs are
LOW, since that state is no longer possible.
Thus the single input is called the "DATA" input. If this data input is HIGH the flip-flop would be
"SET" and when it is LOW the flip-flop would be "RESET". However, this would be rather
pointless since the flip-flop's output would always change on every data input. To avoid this an
additional input called the "CLOCK" or "ENABLE" input is used to isolate the data input from the
flip-flop after the desired data has been stored. The effect is that D is only copied to the output
Q when the clock is active. This then forms the basis of a D flip-flop.
The D flip-flop will store and output whatever logic level is applied to its data terminal so long as
the clock input is HIGH. Once the clock input goes LOW the "set" and "reset" inputs of the flip-
flop are both held at logic level "1" so it will not change state and store whatever data was
present on its output before the clock transition occurred. In other words the output is
"latched" at either logic "0" or logic "1".
Truth Table for the D Flip-flop
Clk D Q Q Description
Memory
↓»0 X Q Q
no change
↑»1 0 0 1 Reset Q » 0
↑»1 1 1 0 Set Q » 1
Note: ↓ and ↑ indicates direction of clock pulse as it is assumed D flip-flops are edge triggered
The Master-Slave JK Flip-flop
The basic D flip-flop can be improved further by adding a second SR flip-flop to its output that is
activated on the complementary clock signal to produce a "Master-Slave D flip-flop". On the
leading edge of the clock signal (LOW-to-HIGH) the first stage, the "master" latches the input
condition at D, while the output stage is deactivated.
On the trailing edge of the clock signal (HIGH-to-LOW) the second "slave" stage is now activated,
latching on to the output from the first master circuit. Then the output stage appears to be
triggered on the negative edge of the clock pulse. "Master-Slave D flip-flops" can be constructed
by the cascading together of two latches with opposite clock phases as shown.
Master-Slave D flip-flop Circuit
19
Digital Circuit Design
We can see from above that on the leading edge of the clock pulse the master flip-flop will be
loading data from the data D input, therefore the master is "ON". With the trailing edge of the
clock pulse the slave flip-flop is loading data, i.e. the slave is "ON". Then there will always be one
flip-flop "ON" and the other "OFF" but never both the master and slave "ON" at the same time.
Therefore, the output Q acquires the value of D, only when one complete pulse, i.e. 0-1-0 is
applied to the clock input.
There are many different D flip-flop IC's available in both TTL and CMOS packages with the more
common being the 74LS74 which is a Dual D flip-flop IC, which contains two individual D type
bistable's within a single chip enabling single or master-slave toggle flip-flops to be made. Other
D flip-flop IC's include the 74LS174 HEX D flip-flop with direct clear input, the 74LS175 Quad D
flip-flop with complementary outputs and the 74LS273 Octal D flip-flop containing eight D flip-
flops with a clear input in one single package.
20
Digital Circuit Design
Divide-by-2 Counter
21
Digital Circuit Design
The eight individual data latches or bistables of the 74LS373 are "transparent" D-type flip-flops,
meaning that when the clock (CLK) input is HIGH at logic level "1", (but can also be active low)
the outputs at Q follows the data D inputs. In this configuration the latch is said to be "open"
and the path from D input to Q output appears to be "transparent" as the data flows through it
unimpeded, hence the name transparent latch. When the clock signal is LOW at logic level "0",
the latch "closes" and the output at Q is latched at the last value of the data that was present
before the clock signal changed and no longer changes in response to D.
D flip-flop Summary:
The data or D flip-flop can be built from a pair of back-to-back latches by connecting an inverter
between the S and the R inputs to allow for a single D (data) input. The basic D-type flip-flop
circuit can be improved further by adding a second SR flip-flop to its output that is activated on
the complementary clock signal to produce a "Master-Slave D flip-flop".
The difference between a D-type latch and a D-type flip-flop is that a latch does not have a clock
-signal to change state whereas a flip-flop always does. The D flip-flop is an edge triggered
device which transfers input data to Q on clock rising or falling edge. Data Latches are level
sensitive devices such as the data latch and the transparent latch.
In the next tutorial about Sequential Logic Circuits, we will look at connecting together data
latches to produce another type of sequential logic circuit called a Shift Register that are used to
convert parallel data into serial data and vice versa.
22
Digital Circuit Design
5.9 Questions:
5.9.1 Objective Questions:
Que.1] Explain the difference between the combinational circuit and sequential circuits ?List the
features of Sequential circuit over combinational circuit
Que.2] Explain single bit NOR cell and its uses in clocked JK Flip flop
Que.5] Draw circuit of JK using NAND ,explain wave forms of various modes of latch
Que.6] Explain the TRUTH table of positive edge triggered JKFF & characteristics of JK Flip flop
Que.7] Explan the necessity of Master Slave Flip Flop? Explain the working ,using NAND gates
Que.8] what is flip flop?show how to construct SET-RESET Flip Flop from NOT gate ?Can Flip
Flop be used as memory ?if so how many Bits can be stored by RS-Flip Flop?
Que.1] How basic NOR or NAND gate could be used to construct a Set –Reset Flip –Flop?
Explain the working of circuit with the help of TRUTH Table of NOR or NAND gate ?Can Flip –
Flop constructed using OR or AND gate ?How /why?
Que.2]What is clock RS flip Flop ? show that the states of the flip flop changes only when the
clock pulse arrives &thus explain the working of clocked RS flip flop ,what modification required
so that the flip flop can respond only in the absence of clock pulse?
Que.3] Show how the Rs flip flop can be converted to a JK flip flop show the TRUTH table
&Explain each line in detail
Que.4] What is RACE around condition? Explain how RACE around condition can be avoided in
Master Slave Flip Flop?
Que.5] What is Edge Triggered Flip flop ?Show the logic symbol of positive Edge triggered and
Negative Edge triggered flip flop .Why edge triggered flip flops are preferred in digital systems
Que.1] What is a Latch? Show how a D type flip flop can be constructed ?Explain its working?
How D flip flop can be converted to a T flip flop .can JK FF can be converted to a D type Flip Flop.
23
Digital Circuit Design
Que.2] Show the circuit of Master Slave Flip –flop and Explain its working? Explain RACE –around
condition is avoided in a Master Slave flip flop
Que.3] Give the Description of data latch ,What are the uses of latch ?Explain 4 bit latch using
IC7475
24
Digital Circuit Design
CHAPTER 6
Counters and Registers
6.1 Motivation: Students will be able to design most complex digital circuits using counters.
6.2. Syllabus: -
6.5. Objective :
1
Digital Circuit Design
2] Synchronous sequential circuit Defined from the knowledge of its signals at discrete instants
of time, Much easier to design (preferred design style), Synchronized by a periodic train of clock
pulses
6.8. Introduction
Counters: Asynchronous, Synchronous Counters, Up Down Counters, Mod
Counters, Ring Counters Shift Registers, Universal Shift Register
Frequency Division:
One main use of a D flip-flop is as a Frequency Divider. If the Q output on a D-type flip-flop is
connected directly to the D input giving the device closed loop "feedback", successive clock
pulses will make the bistable "toggle" once every two clock cycles.
In the counters tutorials we saw how the Data Latch can be used as a "Binary Divider", or a
"Frequency Divider" to produce a "divide-by-2" counter circuit, that is, the output has half the
frequency of the clock pulses. By placing a feedback loop around the D flip-flop another type of
flip-flop circuit can be constructed called a T-type flip-flop or more commonly a T-type bistable,
that can be used as a divide-by-two circuit in binary counters as shown below.
Divide-by-2 Counter
2
Digital Circuit Design
The Shift Register is another type of sequential logic circuit that is used for the storage or
transfer of data in the form of binary numbers and then "shifts" the data out once every clock
cycle, hence the name "shift register". It basically consists of several single bit "D-Type Data
Latches", one for each bit (0 or 1) connected together in a serial or daisy-chain arrangement so
that the output from one data latch becomes the input of the next latch and so on.
The data bits may be fed in or out of the register serially, i.e. one after the other from either the
left or the right direction, or in parallel, i.e. all together. The number of individual data latches
required to make up a single Shift Register is determined by the number of bits to be stored
with the most common being 8-bits (one byte) wide, i.e. eight individual data latches.
The Shift Register is used for data storage or data movement and are used in calculators or
computers to store data such as two binary numbers before they are added together, or to
convert the data from either a serial to parallel or parallel to serial format. The individual data
latches that make up a single shift register are all driven by a common clock ( Clk ) signal making
them synchronous devices.
Shift register IC's are generally provided with a clear or reset connection so that they can be
"SET" or "RESET" as required. Generally, shift registers operate in one of four different modes
with the basic movement of data through a shift register being:
• Serial-in to Parallel-out (SIPO) - the register is loaded with serial data, one bit at a
time, with the stored data being available in parallel form.
• Serial-in to Serial-out (SISO) - the data is shifted serially "IN" and "OUT" of the register,
one bit at a time in either a left or right direction under clock control.
• Parallel-in to Serial-out (PISO) - the parallel data is loaded into the register
simultaneously and is shifted out of the register serially one bit at a time under clock
control.
• Parallel-in to Parallel-out (PIPO) - the parallel data is loaded simultaneously into the
register, and transferred together to their respective outputs by the same clock pulse.
The effect of data movement from left to right through a shift register can be presented
graphically as:
3
Digital Circuit Design
The operation is as follows. Lets assume that all the flip-flops ( FFA to FFD ) have just been RESET
( CLEAR input ) and that all the outputs QA to QD are at logic level "0" i.e, no parallel data output.
If a logic "1" is connected to the DATA input pin of FFA then on the first clock pulse the output of
FFA and therefore the resulting QA will be set HIGH to logic "1" with all the other outputs still
remaining LOW at logic "0". Assume now that the DATA input pin of FFA has returned LOW
again to logic "0" giving us one data pulse or 0-1-0.
The second clock pulse will change the output of FFA to logic "0" and the output of FFB and Q B
HIGH to logic "1" as its input D has the logic "1" level on it from Q A. The logic "1" has now moved
or been "shifted" one place along the register to the right as it is now at Q A. When the third
clock pulse arrives this logic "1" value moves to the output of FFC ( QC ) and so on until the
arrival of the fifth clock pulse which sets all the outputs Q A to QD back again to logic level "0"
because the input to FFA has remained constant at logic level "0".
The effect of each clock pulse is to shift the data contents of each stage one place to the right,
and this is shown in the following table until the complete data value of 0-0-0-1 is stored in the
register. This data value can now be read directly from the outputs of Q A to QD. Then the data
has been converted from a serial data input signal to a parallel data output. The truth table and
following waveforms show the propagation of the logic "1" through the register from left to
right as follows.
4
Digital Circuit Design
Note that after the fourth clock pulse has ended the 4-bits of data ( 0-0-0-1 ) are stored in the
register and will remain there provided clocking of the register has stopped. In practice the
input data to the register may consist of various combinations of logic "1" and "0". Commonly
available SIPO IC's include the standard 8-bit 74LS164 or the 74LS594.
The SISO shift register is one of the simplest of the four configurations as it has only three
connections, the serial input (SI) which determines what enters the left hand flip-flop, the serial
output (SO) which is taken from the output of the right hand flip-flop and the sequencing clock
signal (Clk). The logic circuit diagram below shows a generalized serial-in serial-out shift register.
5
Digital Circuit Design
You may think what's the point of a SISO shift register if the output data is exactly the same as
the input data. Well this type of Shift Register also acts as a temporary storage device or as a
time delay device for the data, with the amount of time delay being controlled by the number of
stages in the register, 4, 8, 16 etc or by varying the application of the clock pulses. Commonly
available IC's include the 74HC595 8-bit Serial-in/Serial-out Shift Register all with 3-state
outputs.
As this type of shift register converts parallel data, such as an 8-bit data word into serial format,
it can be used to multiplex many different input lines into a single serial DATA stream which can
be sent directly to a computer or transmitted over a communications line. Commonly available
IC's include the 74HC166 8-bit Parallel-in/Serial-out Shift Registers.
6
Digital Circuit Design
The PIPO shift register is the simplest of the four configurations as it has only three connections,
the parallel input (PI) which determines what enters the flip-flop, the parallel output (PO) and
the sequencing clock signal (Clk).
Similar to the Serial-in to Serial-out shift register, this type of register also acts as a temporary
storage device or as a time delay device, with the amount of time delay being varied by the
frequency of the clock pulses. Also, in this type of register there are no interconnections
between the individual flip-flops since no serial shifting of the data is required.
7
Digital Circuit Design
Universal shift registers are very useful digital devices. They can be configured to respond to
operations that require some form of temporary memory, delay information such as the SISO or
PIPO configuration modes or transfer data from one point to another in either a serial or parallel
format. Universal shift registers are frequently used in arithmetic operations to shift data to the
left or right for multiplication or division.
o A simple Shift Register can be made using only D-type flip-Flops, one flip-Flop for each data
bit.
o The output from each flip-Flop is connected to the D input of the flip-flop at its right.
o Shift registers hold the data in their memory which is moved or "shifted" to their required
positions on each clock pulse.
o Each clock pulse shifts the contents of the register one bit position to either the left or the
right.
o The data bits can be loaded one bit at a time in a series input (SI) configuration or be loaded
simultaneously in a parallel configuration (PI).
o Data may be removed from the register one bit at a time for a series output (SO) or removed
all at the same time from a parallel output (PO).
o One application of shift registers is converting between serial and parallel data.
o Shift registers are identified as SIPO, SISO, PISO, PIPO, and universal shift registers.
The Ring Counter:
In the previous Shift Register tutorial we saw that if we apply a serial data signal to the input of
a serial-in to serial-out shift register, the same sequence of data will exit from the last flip-flip in
the register chain after a preset number of clock cycles thereby acting as a sort of time delay
circuit to the original signal.
But what if we were to connect the output of this shift register back to its input so that the
output from the last flip-flop, QD becomes the input of the first flip-flop, DA. We would then
have a closed loop circuit that "recirculates" the DATA around a continuous loop for every state
of its sequence, and this is the principal operation of a Ring Counter. Then by looping the output
back to the input, we can convert a standard shift register into a ring counter. Consider the
circuit below.
4-bit Ring Counter
8
Digital Circuit Design
The synchronous Ring Counter example above, is preset so that exactly one data bit in the
register is set to logic "1" with all the other bits reset to "0". To achieve this, a "CLEAR" signal
is firstly applied to all the flip-flops together in order to "RESET" their outputs to a logic "0"
level and then a "PRESET" pulse is applied to the input of the first flip-flop ( FFA ) before the
clock pulses are applied. This then places a single logic "1" value into the circuit of the ring
counter.
So on each successive clock pulse, the counter circulates the same data bit between the four
flip-flops over and over again around the "ring" every fourth clock cycle. But in order to cycle
the data correctly around the counter we must first "load" the counter with a suitable data
pattern as all logic "0's" or all logic "1's" outputted at each clock cycle would make the ring
counter invalid.
This type of data movement is called "rotation", and like the previous shift register, the
effect of the movement of the data bit from left to right through a ring counter can be
presented graphically as follows along with its timing diagram:
Since the ring counter example shown above has four distinct states, it is also known as a
"modulo-4" or "mod-4" counter with each flip-flop output having a frequency value equal to
one-fourth or a quarter (1/4) that of the main clock frequency.
9
Digital Circuit Design
The "MODULO" or "MODULUS" of a counter is the number of states the counter counts or
sequences through before repeating itself and a ring counter can be made to output any
modulo number. A "mod-n" ring counter will require "n" number of flip-flops connected
together to circulate a single data bit providing "n" different output states.
For example, a mod-8 ring counter requires eight flip-flops and a mod-16 ring counter would
require sixteen flip-flops. However, as in our example above, only four of the possible sixteen
states are used, making ring counters very inefficient in terms of their output state usage.
This inversion of Q before it is fed back to input D causes the counter to "count" in a
different way. Instead of counting through a fixed set of patterns like the normal ring
counter such as for a 4-bit counter, "0001"(1), "0010"(2), "0100"(4), "1000"(8) and repeat,
the Johnson counter counts up and then down as the initial logic "1" passes through it to the
right replacing the preceding logic "0".
A 4-bit Johnson ring counter passes blocks of four logic "0" and then four logic "1" thereby
producing an 8-bit pattern. As the inverted output Q is connected to the input D this 8-bit
pattern continually repeats. For example, "1000", "1100", "1110", "1111", "0111", "0011",
"0001", "0000" and this is demonstrated in the following table below.
As well as counting or rotating data around a continuous loop, ring counters can also be
used to detect or recognise various patterns or number values within a set of data. By
connecting simple logic gates such as the AND or the OR gates to the outputs of the flip-
10
Digital Circuit Design
flops the circuit can be made to detect a set number or value. Standard 2, 3 or 4-stage
Johnson ring counters can also be used to divide the frequency of the clock signal by varying
their feedback connections and divide-by-3 or divide-by-5 outputs are also available
Truth Table for a 4-bit Johnson Ring Counter
Clock Pulse No FFA FFB FFC FFD
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
.
A 3-stage Johnson Ring Counter can also be used as a 3-phase, 120 degree phase shift square
wave generator by connecting to the data outputs at A, B and NOT-B. The standard 5-stage
Johnson counter such as the commonly available CD4017 is generally used as a synchronous
decade counter/divider circuit. The smaller 2-stage circuit is also called a "Quadrature"
(sine/cosine) Oscillator/Generator and is used to produce four individual outputs that are each
"phase shifted" by 90 degrees with respect to each other, and this is shown below.
2-bit Quadrature Generator
11
Digital Circuit Design
Output A B C D
QA+QB 1 0 0 0
QA+QB 0 1 0 0
QA+QB 0 0 1 0
QA+QB 0 0 0 1
2-bit Quadrature Oscillator, Count
Sequence
As the four outputs, A to D are phase shifted by 90 degrees with regards to each other, they
can be used with additional circuitry, to drive a 2-phase full-step stepper motor for position
control or the ability to rotate a motor to a particular location as shown below.
The speed of rotation of the Stepper Motor will depend mainly upon the clock frequency
and additional circuitry would be require to drive the "power" requirements of the motor.
As this section is only intended to give the reader a basic understanding of Johnson Ring
Counters and its applications, other good websites explain in more detail the types and
drive requirements of stepper motors.
Johnson Ring Counters are available in standard TTL or CMOS IC form, such as the CD4017
5-Stage, decade Johnson ring counter with 10 active HIGH decoded outputs or the CD4022
4-stage, divide-by-8 Johnson counter with 8 active HIGH decoded outputs.
12
Digital Circuit Design
This example is taken from T. L. Floyd, Digital Fundamentals, Fourth Edition, Macmillan
Publishing, 1990, p.395.
Example: A counter is first described by a state diagram, which is shows the sequence of
states through which the counter advances when it is clocked. Figure 2.40 shows a state
diagram of a 3-bit binary counter.
The circuit has no inputs other than the clock pulse and no outputs other than its internal
state (outputs are taken off each flip-flop in the counter). The next state of the counter
depends entirely on its present state, and the state transition occurs every time the clock
pulse occurs. Figure 2.41 shows the sequences of count after each clock pulse.
Once the sequential circuit is defined by the state diagram, the next step is to obtain the
next-state table, which is derived from the state diagram in Figure 2.40 and is shown in
Table1.
13
Digital Circuit Design
0 0 0 0 0 1
0 0 1 0 1 0
0 1 0 0 1 1
0 1 1 1 0 0
1 0 0 1 0 1
1 0 1 1 1 0
1 1 0 1 1 1
1 1 1 0 0 0
Since there are eight states, the number of flip-flops required would be three. Now we want
to implement the counter design using JK flip-flops.
Next step is to develop an excitation table from the state table, which is shown in Table2.
0 0 0 0 0 1 0X 0X 1X
0 0 1 0 1 0 0X 1X X1
0 1 0 0 1 1 0X X0 1X
0 1 1 1 0 0 1X X1 X1
1 0 0 1 0 1 X0 0X 1X
1 0 1 1 1 0 X0 1X X1
1 1 0 1 1 1 X0 X0 1X
1 1 1 0 0 0 X1 X1 X1
S
14
Digital Circuit Design
Fig.6.15 Kmap
Now transfer the JK states of the flip-flop inputs from the excitation table to Karnaugh maps
to derive a simplified Boolean expression for each flip-flop input. This is shown in Figure 2.41
The 1s in the Karnaugh maps of Figure 2.41 are grouped with "don't cares" and the following
expressions for the J and K inputs of each flip-flop are obtained:
J0 = K0 = 1
J1 = K1 = Q0
J2 = K2 = Q1*Q0
The final step is to implement the combinational logic from the equations and connect the
flip-flops to form the sequential circuit. The complete logic of a 3-bit binary counter is shown
in Figure 2.42.
Example Design a counter specified by the state diagram in using T flip-flops. The state diagram
is shown here again in Figure 6.17.
15
Digital Circuit Design
Now derive the excitation table from the state table, which is shown in Table 3.
0 0 0 0 0 1 0 0 1
0 0 1 0 1 0 0 1 1
0 1 0 0 1 1 0 0 1
0 1 1 1 0 0 1 1 1
1 0 0 1 0 1 0 0 1
1 0 1 1 1 0 0 1 1
1 1 0 1 1 1 0 0 1
1 1 1 0 0 0 1 1 1
Next step is to transfer the flip-flop input functions to Karnaugh maps to derive a simplified
Boolean expressions, which is shown in Figure 2.44.
Fig.6.18 K-Maps
16
Digital Circuit Design
T0 = 1; T1 = Q0; T2 = Q1*Q0
Finally, draw the logic diagram of the circuit from the expressions obtained. The complete logic
diagram of the counter is shown in Figure 6.19.
Que.1] With neat diagram explain the 4 bit Parallel in Parallel out (PIPO) register draw timing
diagram and wave form and its Truth Table
Que.2] With neat diagram explain the 4 bit Serial in Serial out (SISO) register draw timing
diagram and wave form and its Truth Table
Que.3] Define bi-directional Shift register ?Draw the 3 bit bi-Directional shift Register using D-
type Flip Flop
Que1] Design 4 bit Twisted Ring counter (Johnson’s counter)using Flip Flop of your choice
Que.3] With neat diagram explain the 4 bit serial in parallel out (SIPO) register draw timing
diagram and wave form and its Truth Table
Que.4] With neat diagram explain the 4 bit Parallel in Serial out (PISO) register draw timing
diagram and wave form and its Truth Table
17
Digital Circuit Design
Que.1] What do mean by Universal Shift Register ?List one of IC used shift register give pin
configuration with specifications
Que.5] Design 4 bit ripple counter using T flip-flop with suitable circuit diagram and timing
diagram
Que.6] What are the application of counters ?state the procedure to design MOD counter from
N bit ripple counter
Table Q.1
00 00 01 0 0
01 00 10 0 0
10 11 10 0 0
11 00 01 0 1
Q9 Design the sequential circuit in question1, using T flip-flops.
Q10. Design a mod-5 counter which has the following binary sequence: 0, 1, 2, 3, 4. Use JK flip-
flops.
Q11. Design a counter that has the following repeated binary sequence: 0, 1, 2, 3, 4, 5, 6, 7. Use
RS flip-flops.
Q12. Design a counter with the following binary sequence: 1, 2, 5, 7 and repeat. Use JK flip-
flops.
Q13. Design a counter with the following repeated binary sequence: 0, 4, 2, 1, 6. Use T flip-flops.
Q14. Design a counter that counts in the sequence 0, 1, 3, 6, 10, 15, using four a) D, b) SR, c) JK
and d) T flip-flops.
18