7.CS6201 - DPSD
7.CS6201 - DPSD
7.CS6201 - DPSD
By
MS.G.MANJULA
ASSISTANT PROFESSOR
DEPARTMENT OF ELECTRONICS AND COMMUNICATION ENGINEERING
SASURIE COLLEGE OF ENGINEERING
VIJAYAMANGALAM 638 056
QUALITY CERTIFICATE
: I Year CSE
being prepared by me and it meets the knowledge requirement of the university curriculum.
Signature of HD
Name:
SEAL
CONTENTS
UNIT 1 -BOOLEAN ALGEBRA AND LOGIC GATES
1.1
Review of Number Systems
Decimal number system
Binary number system
Octal number system
Hexadecimal number system
1.2
Arithmetic operations
Binary Addition
Binary Subtraction
Binary Multiplication
Binary Division
1.3
Binary Codes
BCD Code
Other decimal codes
Gray code
Error-detecting code
ASCII character code
1.4
Boolean algebra and theorems
Two valued Boolean algebra
Basic theorems
Operator Precedence
Minimization of Boolean expression
Canonical form
Sum of product form
Product of sum form
Converting expressions in Standard SOP or POS forms
1.5
Implementation of Boolean function using logic gates
Universal gates
1.6 Karnaugh map minimization
One variable, Two- variable, Three variable and Four- variable k-maps
Five and Six variable maps
1.7
Tabular method or Quine-McClusky method of minimization of
logic functions
1.8
Question bank
1.9
Glossary
1.10 References
2
2
3
3
3
7
7
8
8
9
10
10
11
12
12
13
14
14
15
15
16
16
17
17
17
18
23
27
29
33
33
43
45
45
41
41
43
43
43
44
49
50
54
54
57
58
59
62
64
65
67
68
68
69
69
70
72
77
78
79
80
81
82
83
84
84
85
86
86
87
90
91
91
102
106
110
114
114
116
117
121
121
122
122
126
129
133
135
135
137
138
140
142
145
145
146
146
148
150
152
CS6201
LTPC
30 0 3
CS6201
PRE-REQUISITE DISCUSSION
Basically there are two types of signals in electronics,
i)
Analog
ii)
Digital
Digital systems:
Advantages
The usual advantages of digital circuits when compared to analog circuits are:
Digital systems interface well with computers and are easy to control with software. New features
can often be added to a digital system without changing hardware. Often this can be done outside of the
factory by updating the product's software. So, the product's design errors can be corrected after the
product is in a customer's hands.
Information storage can be easier in digital systems than in analog ones. The noise-immunity of digital
systems permits data to be stored and retrieved without degradation. In an analog system, noise from
aging and wear degrade the information stored. In a digital system, as long as the total noise is below a
certain level, the information can be recovered perfectly.
Robustness
One of the primary advantages of digital electronics is its robustness. Digital electronics are robust
because if the noise is less than the noise margin then the system performs as if there were no noise at all.
Therefore, digital signals can be regenerated to achieve lossless data transmission, within certain limits.
Analog signal transmission and processing, by contrast, always introduces noise.
Disadvantages
In some cases, digital circuits use more energy than analog circuits to accomplish the same tasks, thus
producing more heat as well. In portable or battery-powered systems this can limit use of digital systems.
For example, battery-powered cellular telephones often use a low-power analog front-end to amplify and
tune in the radio signals from the base station. However, a base station has grid power and can use
power-hungry, but very flexible software radios. Such base stations can be easily reprogrammed to
process the signals used in new cellular standards.
Digital circuits are sometimes more expensive, especially in small quantities.The sensed world is analog,
and signals from this world are analog quantities.
For example, light, temperature, sound, electrical conductivity, electric and magnetic fields are analog.
Most useful digital systems must translate from continuous analog signals to discrete digital signals. This
causes quantization errors.
Quantization error can be reduced if the system stores enough digital data to represent the signal to the
desired degree of fidelity. The Nyquist-Shannon sampling theorem provides an important guideline as to
how much digital data is needed to accurately portray a given analog signal.
SCE
DEPT OF ECE
CS6201
1.1
Many number systems are in use in digital technology. The most common are the decimal, binary, octal,
and hexadecimal systems. The decimal system is clearly the most familiar to us because it is tools that we
use every day.
Types of Number Systems are
1.1.1
1.1.2
1.1.3
1.1.4
BINARY
0000
0001
0010
0011
0100
0101
0110
0111
1000
1001
1010
1011
1100
1101
1110
1111
OCTAL
0
1
2
3
4
5
6
7
10
11
12
13
14
15
16
17
HEXADECIMAL
0
1
2
3
4
5
6
7
8
9
A
B
C
D
E
F
SCE
DEPT OF ECE
CS6201
Decimal system: Decimal system is composed of 10 numerals or symbols. These 10 symbols are 0, 1, 2,
3, 4, 5, 6, 7, 8, 9. Using these symbols as digits of a number, we can express any quantity. The decimal
system is also called the base-10 system because it has 10 digits. Even though the decimal system has
only 10 symbols, any number of any magnitude can be expressed by using our system of positional
weighting.
103
=1000
102
=100
101
=10
100
=1
Most Significant
Digit
Example:
10-1
=0.1
10-2
=0.0
1
Decimal
point
10-3
=0.001
Least Significant
Digit
Binary System: In the binary system, there are only two symbols or possible digit values, 0 and 1. This
base-2 system can be used to represent any quantity that can be represented in decimal or other base
system.
23
=8
Most
Significant
Digit
22
=4
21
=2
20
=1
Binary
point
2-1
=0.5
2-2
=0.25
2-3
=0.125
Least
Significant
Digit
In digital systems the information that is being processed is usually presented in binary form. Binary
quantities can be represented by any device that has only two operating states or possible conditions.
E.g.. A switch is only open or closed. We arbitrarily (as we define them) let an open switch represent
binary 0 and a closed switch represent binary 1. Thus we can represent any binary number by using series
of switches.
Binary 1: Any voltage between 2V to 5V
Binary 0: Any voltage between 0V to 0.8V
Not used: Voltage between 0.8V to 2V in 5 Volt CMOS and TTL Logic, this may cause error in a digital
circuit. Today's digital circuits works at 1.8 volts, so this statement may not hold true for all logic
circuits.
Octal System: The octal number system has a base of eight, meaning that it has eight possible digits:
0,1,2,3,4,5,6,7.
83
=512
Most Significant
Digit
82
=64
81
=8
80
=1
.
Octal
point
8-1
=1/8
8-2
=1/64
8-3
=1/512
Least
Significant
Digit
Hexadecimal System: The hexadecimal system uses base 16. Thus, it has 16 possible digit symbols. It
uses the digits 0 through 9 plus the letters A, B, C, D, E, and F as the 16 digit symbols.
SCE
DEPT OF ECE
CS6201
163
=4096
Most
Significant
Digit
Code Conversion
161
=16
160
=1
.
Hexadeci
mal point
16-1
=1/16
16-2
=1/256
16-3
=1/4096
Least
Significant
Digit
Converting from one code form to another code form is called code conversion, like converting from
binary to decimal or converting from hexadecimal to decimal.
Binary-To-Decimal Conversion: Any binary number can be converted to its decimal equivalent
simply by summing together the weights of the various positions in the binary number which contain a 1.
Binary
110112
=24+23+01+21+20
Result
Decimal
=16+8+0+2+1
2710
Repeat Division
Reverse of Binary-To-Decimal Method
Decimal
4510
Binary
=32 + 0 + 8 + 4 +0 + 1
=25+0+23+22+0+20
Result
=1011012
Remainder
= 12+ remainder of 1
= 6 + remainder of 0
= 3 + remainder of 0
= 1 + remainder of 1
= 0 + remainder of 1
2510
Binary
1 (Least Significant Bit)
0
0
1
1 (Most Significant Bit)
= 110012
Binary to octal
SCE
DEPT OF ECE
CS6201
Octal to Binary
Decimal to octal
Division
177/8
22/ 8
2/8
Result
Binary
Result
= 22+ remainder of 1
= 2 + remainder of 6
= 0 + remainder of 2
17710
Binary
1 (Least Significant Bit)
6
2 (Most Significant Bit)
= 2618
= 0101100012
Octal to Decimal
Decimal to Hexadecimal
SCE
Division
Result
Hexadecimal
378/16
= 23+ remainder of 10
23/16
= 1 + remainder of 7
DEPT OF ECE
CS6201
= 0 + remainder of 1
Result
37810
= 17A16
Binary
Binary-To-Hexadecimal:
Hexadecimal to binary
Octal to Hexadecimal
Octal
= 2650
= 010 110 101 000
(Binary)
Result
Hexadecimal
= 0101 1010 1000 (Binary)
=(5A8)16
Hexadecimal to octal
Hexadecimal
(5A8)16
Result
Octal
= 0101 1010 1000 (Binary)
= 010 110 101 000 (Binary)
= 2 6 5 0 (Octal)
1s and 2s complement
Complements are used in digital computers to simplify the subtraction operation and for logical
manipulation. There are TWO types of complements for each base-r system: the radix complement and
the diminished radix complement. The first is referred to as the r's complement and the second as the (r 1)'s complement, when the value of the base r is substituted in the name. The two types are referred to as
SCE
DEPT OF ECE
CS6201
the 2's complement and 1's complement for binary numbers and the 10s complement and 9's
complement for decimal numbers.
The 1s complement of a binary number is the number that results when we change all 1s
to zeros and the zeros to ones.
The 2s complement is the binary number that results when we add 1 to the 1s complement.
It is used to represent negative numbers.
2s complement=1s complement+1
Example 1)
Sol:
Example 2)
Sol:
1s complement
0111
1.2
ARITHMETIC OPERATIONS
Ref: 1) John F. Wakerly, Digital Design Principles and Practices, Fourth Edition, Pearson Education,
2007. Pg.No:35-44.
2) Morris Mano M. and Michael D. Ciletti, Digital Design, IV Edition, Pearson Education, 2008.
Pg.No:9-14.
Binary Equivalents
1 Nybble (or nibble) = 4 bits 1 Byte = 2 nibbles = 8 bits
1 Kilobyte (KB) = 1024 bytes
1 Megabyte (MB) = 1024 kilobytes = 1,048,576 bytes
1 Gigabyte (GB) = 1024 megabytes = 1,073,741,824 bytes
Binary Addition
SCE
DEPT OF ECE
CS6201
0
0
0
0
1
0
1
1
0
1
1
0
0
0
Note: The rules of binary addition (without carries) are the same as the truths of the XOR gate.
Binary Subtraction
0-0=0
0 - 1 = 1, and borrow 1 from the next more significant bit
1-0=1
1-1=0
Example
00100101 - 00010001= 00010100
0 0
+ 0 0
1
0
0
1
0
0
1
0
0 1
0 1
0 0
0 0
0
0
0
0
1
0
0
0
1
0
0
1
0
1
1
0
0
0 0
0 1
0
1
0
0
0
1
0
1
0
0
0
0
0
0
1
0
1
Binary Multiplication
0x0=0
0x1=0
1x0=0
1 x 1 = 1, and no carry or borrow bits
Example
00101001
00000110 =
11110110
0 1 1 1 1 0 1 1
0
Note: The rules of binary multiplication are the same as the truths of the AND gate.
SCE
DEPT OF ECE
CS6201
Binary Division
Binary division is the repeated process of subtraction, just as in decimal division.
SCE
DEPT OF ECE
CS6201
1.6
BINARY CODES
Ref: 1) A.P Godse & D.A Godse Digital Electronics, Technical publications, Pune, Revised third
edition, 2008. Pg.No:31-57.
2) Morris Mano M. and Michael D. Ciletti, Digital Design, IV Edition, Pearson Education,
2008.Pg.No:17-24
3) John F. Wakerly, Digital Design Principles and Practices, Fourth Edition, Pearson Education,2007.
Pg.No:44-60.
Binary codes are codes which are represented in binary system with modification from the original
ones. There are two types of binary codes: Weighted codes and Non-Weighted codes. BCD and the 2421
code are examples of weighted codes. In a weighted code, each bit position is assigned a weighting factor
in such a way that each digit ca n be evaluated by adding the weight of all the 1s in the coded
combination.
The BCD (Binary Coded Decimal) is a straight assignment of the binary equivalent. It is possible to
assign weights to the binary bits according to their positions. The weights in the BCD code are 8,4,2,1.
Example: The bit assignment 1001, can be seen by its weights to represent the decimal 9
because 1x8+0x4+0x2+1x1 = 9
Weighted Code
8421 code
Most common
Default
The corresponding decimal digit is determined by adding the weights associated with the 1s in the
code group.
62310 = 0110 0010 0011
2421, 5421,7536, etc codes
The weights associated with the bits in each code group are given by the name of the code
Nonweighted Codes
2-out-of-5
Non Weighted codes are codes that are not positionally weighted. That is, each position within the
binary number is not assigned a fixed value.
Actually weighted 74210 except for the digit 0
Used by the post office for scanning bar codes for zip codes
Has error detection properties
2421 code
This is a weighted code; its weights are 2, 4, 2 and 1. A decimal number is represented in 4-bit
form and the total four bits weight is 2 + 4 + 2 + 1 = 9. Hence the 2421 code represents the decimal
numbers from 0 to 9.
SCE
10
DEPT OF ECE
CS6201
5211 code
This is a weighted code; its weights are 5, 2, 1 and 1. A decimal number is represented in 4-bit
form and the total four bits weight is 5 + 2 + 1 + 1 = 9. Hence the 5211 code represents the decimal
numbers from 0 to 9.
Reflective code
A code is said to be reflective when code for 9 is complement for the code for 0, and so is for 8 and 1
codes, 7 and 2, 6 and 3, 5 and 4. Codes 2421, 5211, and excess-3 are reflective, whereas the 8421 code
is not.
Sequential code
A code is said to be sequential when two subsequent codes, seen as numbers in binary representation,
differ by one. This greatly aids mathematical manipulation of data. The 8421 and Excess-3 codes are
sequential, whereas the 2421 and 5211 codes are not.
Excess-3 code
Excess-3 is a non weighted code used to express decimal numbers. The code derives its name from
the fact that each binary code is the corresponding 8421 code plus 0011(3).
Example: 1000 of 8421 = 1011 in Excess-3
Gray code
The gray code belongs to a class of codes called minimum change codes, in which only one bit in
the code changes when moving from one code to the next. The Gray code is non-weighted code, as the
position of bit does not contain any weight. In digital Gray code has got a special place.
SCE
Decimal
Number
Binary Code
Gray Code
0
1
2
0000
0001
0010
0000
0001
0011
0011
0010
4
5
6
7
8
9
10
11
0100
0101
0110
0111
1000
1001
1010
1011
0110
0111
0101
0100
1100
1101
1111
1110
11
DEPT OF ECE
CS6201
1100
1101
1110
1111
1010
1011
1001
1000
The gray code is a reflective digital code which has the special property that any two subsequent numbers
codes differ by only one bit. This is also called a unit-distance code.
Important when an analog quantity must be converted to a digital representation. Only one bit changes
between two successive integers which are being coded.
When data is transmitted from one point to another, like in wireless transmission, or it is just stored,
like in hard disks and memories, there are chances that data may get corrupted. To detect these data
errors, we use special codes, which are error detection codes.
Error-correcting codes not only detect errors, but also correct them. This is used normally in Satellite
communication, where turn-around delay is very high as is the probability of data getting corrupt.
Hamming codes
Hamming code adds a minimum number of bits to the data transmitted in a noisy channel, to be able to
correct every possible one-bit error. It can detect (not correct) two-bit errors and cannot distinguish
between 1-bit and 2-bits inconsistencies. It can't - in general - detect 3(or more)-bits errors.
Parity codes
A parity bit is an extra bit included with a message to make the total number of 1s either even or odd. In
parity codes, every data byte, or nibble (according to how user wants to use it) is checked if they have
even number of ones or even number of zeros. Based on this information an additional bit is appended
to the original data. Thus if we consider 8-bit data, adding the parity bit will make it 9 bit long.
At the receiver side, once again parity is calculated and matched with the received parity (bit 9), and if
they match, data is ok, otherwise data is corrupt.
Two types of parity
-Even parity: Checks if there is an even number of ones; if so, parity bit is zero. When the number of
ones is odd then parity bit is set to 1.
-Odd Parity: Checks if there is an odd number of ones; if so, parity bit is zero. When the number of
ones is even then parity bit is set to 1.
SCE
Alphanumeric codes
12
DEPT OF ECE
CS6201
The binary codes that can be used to represent all the letters of the alphabet, numbers and
mathematical symbols, punctuation marks, are known as alphanumeric codes or character codes. These
codes enable us to interface the input-output devices like the keyboard, printers, video displays with the
computer.
ASCII codes
Codes to handle alphabetic and numeric information, special symbols, punctuation marks, and control
characters.
ASCII (American Standard Code for Information Interchange) is the best known.
Unicode a 16-bit coding system provides for foreign languages, mathematical symbols, geometrical
shapes, dingbats, etc. It has become a world standard alphanumeric code for microcomputers and
computers. It is a 7-bit code representing 27 = 128 different characters. These characters represent 26
upper case letters (A to Z), 26 lowercase letters (a to z), 10 numbers (0 to 9), 33 special characters and
symbols and 33 control characters.
EBCDIC codes
EBCDIC stands for Extended Binary Coded Decimal Interchange. It is mainly used with large computer
systems like mainframes. EBCDIC is an 8-bit code and thus accommodates up to 256 characters. An
EBCDIC code is divided into two portions: 4 zone bits (on the left) and 4 numeric bits (on the right).
Example 1: Give the binary, BCD, Excess-3, gray code representations of numbers: 5,8,14.
Decimal Number
Binary code
BCD code
Excess-3 code
Gray code
0101
0101
1000
0111
1000
1000
1011
1100
14
1110
0001 0100
0100 0111
1001
SCE
13
DEPT OF ECE
CS6201
1.7
Ref: 1) A.P Godse & D.A Godse Digital Electronics, Technical publications, Pune, Revised third
edition, 2008. Pg.No:2.1-2.10
2) Morris Mano M. and Michael D. Ciletti, Digital Design, IV Edition, Pearson Education,
2008.Pg.No:36-44.
In 1854, George Boole developed an algebraic system now called Boolean algebra. In 1938, C. E.
Shannon introduced a two-valued Boolean algebra called switching algebra that represented the
properties of bistable electrical switching circuits.
Boolean algebra is an algebraic structure defined by a set of elements B, together with two binary
operators. + and -, provided that the following (Huntington) postulates are satisfied;
Principle of Duality
It states that every algebraic expression is deducible from the postulates of Boolean algebra, and it
remains valid if the operators & identity elements are interchanged. If the inputs of a NOR gate are
inverted we get a AND equivalent circuit. Similarly when the inputs of a NAND gate are inverted, we get
a OR equivalent circuit.
1. Interchanging the OR and AND operations of the expression.
2. Interchanging the 0 and 1 elements of the expression.
3. Not changing the form of the variables.
Theorems of Boolean algebra:
The theorems of Boolean algebra can be used to simplify many a complex Boolean expression and also to
transform the given expression into a more useful and meaningful equivalent expression. The theorems are
presented as pairs, with the two theorems in a given pair being the dual of each other. These theorems can
be very easily verified by the method of perfect induction. According to this method, the validity of the
expression is tested for all possible combinations of values of the variables involved. Also, since the
validity of the theorem is based on its being true for all possible combinations of values of variables, there
is no reason why a variable cannot be replaced with its complement, or vice versa, without disturbing the
validity. Another important point is that, if a given expression is valid, its dual will also be valid.
T1: Commutative Law
(a)
A+B=B+A
(b)
AB=BA
T2: Associative Law
(a) (A + B) + C = A + (B + C)
SCE
14
DEPT OF ECE
CS6201
(b) (A B) C = A (B C)
T3: Distributive Law
(a) A (B + C) = A B + A C
(b) A + (B C) = (A + B) (A + C)
T4: Identity Law
(a)
A+A=A
(b)
AA=A
T5: Negation Law
=
and (
) =
T6: Redundancy
(a)
A+AB=A
(b)
A (A + B) = A
(a) + = +
(b) A. ( +
= .
= .
+
It states that the Complement of the product of variables is equal to the sum of complements
of each individual variable. Boolean expression for this theorem is
= +
Order of Precedence
NOT operations have the highest precedence, followed by AND operations, followed by OR operations.
Brackets can be used as with other forms of algebra.
e.g.
X.Y + Z and X.(Y + Z) are not the same function.
Truth Tables
SCE
15
DEPT OF ECE
CS6201
Truth tables are a means of representing the results of a logic function using a table. They are constructed
by defining all possible combinations of the inputs to a function, and then calculating the output for each
combination in turn.
X
0
0
1
1
AND
Y
0
1
0
1
F(X,Y)
0
0
0
1
NOT
X
0
1
OR
X
0
0
1
1
F(X)
1
0
Y
0
1
0
1
F(X,Y)
0
1
1
1
A minterm is the product of N distinct literals where each literal occurs exactly once.
A maxterm is the sum of N distinct literals where each literal occurs exactly once.
For a two-variable expression, the minterms and maxterms are as follows
X
Minterm
Maxterm
0
0
1
1
0
1
0
1
X'.Y'
X'.Y
X.Y'
X.Y
X+Y
X+Y'
X'+Y
X'+Y'
SCE
Minterm
Maxterm
X'.Y'.Z'
X+Y+Z
16
DEPT OF ECE
CS6201
0
1
1
0
0
1
1
1
0
1
0
1
0
1
X'.Y'.Z
X'.Y.Z'
X'.Y.Z
X.Y'.Z'
X.Y'.Z
X.Y.Z'
X.Y.Z
X+Y+Z'
X+Y'+Z
X+Y'+Z'
X'+Y+Z
X'+Y+Z'
X'+Y'+Z
X'+Y'+Z'
This allows us to represent expressions in either Sum of Products or Product of Sums forms
Sum Of Products (SOP): F(X, Y, ...) = Sum (ak.mk), where ak is 0 or 1 and mk is a minterm.
To derive the Sum of Products form from a truth table, OR together all of the minterms which give a
value of 1.Consider the truth table as example,
X
0
0
1
1
Y
0
1
0
1
F
0
0
1
1
Minterm
X'.Y'
X'Y
X.Y'
X.Y
Y
0
1
0
1
F
1
0
1
1
Maxterm
X+Y
X+Y'
X'+Y
X'+Y'
Conversion between POS and SOP: Conversion between the two forms is done by application of
DeMorgans Laws.
SCE
17
DEPT OF ECE
CS6201
Truth Table
X
0
0
1
1
SCE
18
Y
0
1
0
1
F(X,Y)
0
0
0
1
DEPT OF ECE
CS6201
Two input AND gate using "diode-resistor" logic is shown in figure below, where X, Y are inputs and F
is the output.
If X = 0 and Y = 0, then both diodes D1 and D2 are forward biased and thus both diodes conduct
and pull F low.
If X = 0 and Y = 1, D2 is reverse biased, thus does not conduct. But D1 is forward biased, thus
conducts and thus pulls F low.
If X = 1 and Y = 0, D1 is reverse biased, thus does not conduct. But D2 is forward biased, thus
conducts and thus pulls F low.
If X = 1 and Y = 1, then both diodes D1 and D2 are reverse biased and thus both the diodes are in
cut-off and thus there is no drop in voltage at F. Thus F is HIGH.
OR Gate
The OR gate performs logical addition, commonly known as OR function. The OR gate has two or more
inputs and single output. The output of OR gate is HIGH only when any one of its inputs are HIGH (i.e.
even if one input is HIGH, Output will be HIGH).
If X and Y are two inputs, then output F can be represented mathematically as F = X+Y. Here plus sign
(+) denotes the OR operation. Truth table and symbol of the OR gate is shown in the figure below.
Symbol
Truth Table
X
0
0
1
1
Y
0
1
0
1
F(X,Y)
0
1
1
1
Two input OR gate using "diode-resistor" logic is shown in figure below, where X, Y are inputs and F is
the output.
SCE
19
DEPT OF ECE
CS6201
If X = 0 and Y = 0, then both diodes D1 and D2 are reverse biased and thus both the diodes are in
cut-off and thus F is low.
If X = 0 and Y = 1, D1 is reverse biased, thus does not conduct. But D2 is forward biased, thus
conducts and thus pulling F to HIGH.
If X = 1 and Y = 0, D2 is reverse biased, thus does not conduct. But D1 is forward biased, thus
conducts and thus pulling F to HIGH.
If X = 1 and Y = 1, then both diodes D1 and D2 are forward biased and thus both the diodes
conduct and thus F is HIGH.
NOT Gate
The NOT gate performs the basic logical function called inversion or complementation. NOT gate is also
called inverter. The purpose of this gate is to convert one logic level into the opposite logic level. It has
one input and one output. When a HIGH level is applied to an inverter, a LOW level appears on its
output and vice versa.
Symbol
Truth Table
X
0
1
F(X)
1
0
If X is the input, then output F can be represented mathematically as F = X', Here apostrophe (') denotes
the NOT (inversion) operation. There are a couple of other ways to represent inversion, F= !X, here !
represents inversion. Truth table and NOT gate symbol is shown in the figure below.
NOT gate using "transistor-resistor" logic is shown in the figure below, where X is the input and F is the
output.
SCE
20
DEPT OF ECE
CS6201
When X = 1, The transistor input pin 1 is HIGH, this produces the forward bias across the emitter base
junction and so the transistor conducts. As the collector current flows, the voltage drop across RL
increases and hence F is LOW.
When X = 0, the transistor input pin 2 is LOW: this produces no bias voltage across the transistor base
emitter junction. Thus Voltage at F is HIGH.
BUF Gate
Buffer or BUF is also a gate with the exception that it does not perform any logical operation on its input.
Buffers just pass input to output. Buffers are used to increase the drive strength or sometime just to
introduce delay. We will look at this in detail later.
If X is the input, then output F can be represented mathematically as F = X. Truth table and symbol of
the Buffer gate is shown in the figure below.
Symbol
Truth Table
X
0
1
F(X)
0
1
NAND Gate
NAND gate is a cascade of AND gate and NOT gate, as shown in the figure below. It has two or more
inputs and only one output. The output of NAND gate is HIGH when any one of its input is LOW (i.e.
even if one input is LOW, Output will be HIGH).
If X and Y are two inputs, then output F can be represented mathematically as F = (X.Y)', Here dot (.)
denotes the AND operation and (') denotes inversion. Truth table and symbol of the N AND gate is
shown in the figure below.
SCE
21
DEPT OF ECE
CS6201
Symbol
X
0
0
1
1
Y
0
1
0
1
F(X,Y)
1
1
1
0
NOR Gate
NOR gate is a cascade of OR gate and NOT gate, as shown in the figure below. It has two or more inputs
and only one output. The output of NOR gate is HIGH when any all its inputs are LOW (i.e. even if one
input is HIGH, output will be LOW).
Truth Table
Symbol
X
Y
F(X,Y)
0
0
1
0
1
0
1
0
0
1
1
0
XOR Gate
An Exclusive-OR (XOR) gate is gate with two or three or more inputs and one output. The output of a
two-input XOR gate assumes a HIGH state if one and only one input assumes a HIGH state. This is
equivalent to saying that the output is HIGH if either input X or input Y is HIGH exclusively, and LOW
when both are 1 or 0 simultaneously.
If X and Y are two inputs, then output F can be represented mathematically as F = X Y, Here
denotes the XOR operation. X Y and is equivalent to X.Y' + X'.Y. Truth table and symbol of the XOR
gate is shown in the figure below.
Truth Table
Symbol
X
0
0
1
1
Y
0
1
0
1
F(X,Y)
0
1
1
0
XNOR Gate
An Exclusive-NOR (XNOR) gate is gate with two or three or more inputs and one output. The output of
a two-input XNOR gate assumes a HIGH state if all the inputs assumes same state. This is equivalent to
SCE
22
DEPT OF ECE
CS6201
saying that the output is HIGH if both input X and input Y is HIGH exclusively or same as input X and
input Y is LOW exclusively, and LOW when both are not same.
If X and Y are two inputs, then output F can be represented mathematically as F = X Y, Here
denotes the XNOR operation. X
Y and is equivalent to X.Y + X'.Y'. Truth table and symbol of the
XNOR gate is shown in the figure below.
Symbol
X
0
0
1
1
Truth Table
Y
F(X,Y)
0
1
1
0
0
0
1
1
Universal Gates
Universal gates are the ones which can be used for implementing any gate like AND, OR and NOT, or
any combination of these basic gates; NAND and NOR gates are universal gates. But there are some
rules that need to be followed when implementing NAND or NOR based gates.
1.6
Ref: 1) A.P Godse & D.A Godse Digital Electronics, Technical publications, Pune, Revised third
edition, 2008. Pg.No:3.78
2) Morris Mano M. and Michael D. Ciletti, Digital Design, IV Edition, Pearson Education,
2008.Pg.No:89.
Any logic function can be implemented using NAND gates. To achieve this, first the logic function has to
be written in Sum of Product (SOP) form. Once logic function is converted to SOP, then is very easy to
implement using NAND gate. In other words any logic circuit with AND gates in first level and OR gates
in second level can be converted into a NAND-NAND gate circuit.
Consider the following SOP expression
F = W.X.Y + X.Y.Z + Y.Z.W
The above expression can be implemented with three AND gates in first stage and one OR gate in second
stage as shown in figure.
SCE
23
DEPT OF ECE
CS6201
If bubbles are introduced at AND gates output and OR gates inputs (the same for NOR gates), the above
circuit becomes as shown in figure.
Now replace OR gate with input bubble with the NAND gate. Now we have circuit which is fully
implemented with just NAND gates.
SCE
24
DEPT OF ECE
CS6201
Input
(X.X)'
Output
= X'
Rule
Idempotent
Output
= ((XY)')'
= (XY)
Rule
Idempotent
Involution
Input
((XX)'(YY)'
)'
Output
= (X'Y')'
Rule
Idempotent
= X''+Y''
= X+Y
DeMorgan
Involution
Output
=(X'Y')'
Rule
Idempotent
=X''+Y''
=X+Y
=(X+Y)'
DeMorgan
Involution
Idempotent
Any logic function can be implemented using NOR gates. To achieve this, first the logic function has to
be written in Product of Sum (POS) form. Once it is converted to POS, then it's very easy to implement
using NOR gate. In other words any logic circuit with OR gates in first level and AND gates in second
level can be converted into a NOR-NOR gate circuit.
Consider the following POS expression
F = (X+Y) . (Y+Z)
SCE
25
DEPT OF ECE
CS6201
The above expression can be implemented with three OR gates in first stage and one AND gate in second
stage as shown in figure.
If bubble are introduced at the output of the OR gates and the inputs of AND gate, the above circuit
becomes as shown in figure.
Now replace AND gate with input bubble with the NOR gate. Now we have circuit which is fully
implemented with just NOR gates.
Output
Rule
(X+X)'
= X'
Idempotent
Output
Rule
((X+X)'+(Y+Y)
')'
=(X'+Y')
'
= X''.Y''
Idempotent
= (X.Y)
Involution
SCE
DeMorgan
26
DEPT OF ECE
CS6201
Output
= ((X+Y)')'
= X+Y
Rule
Idempotent
Involution
Output
= ((X+Y)')'
= X+Y
= (X+Y)'
Rule
Idempotent
Involution
Idempotent
Minimization Technique
The primary objective of all simplification procedures is to obtain an expression that has the minimum
number of terms. Obtaining an expression with the minimum number of literals is usually the secondary
objective. If there is more than one possible solution with the same number of terms, the one having the
minimum number of literals is the choice.
There are several methods for simplification of Boolean logic expressions. The process is usually called
logic minimization and the goal is to form a result which is efficient. Two methods we will discuss are
algebraic minimization and Karnaugh maps. For very complicated problems the former method can be
done using special software analysis programs. Karnaugh maps are also limited to problems with up to 4
binary inputs. The QuineMcCluskey tabular method is used for more than 4 binary inputs.
1.6
KARNAUGH MAPS
Ref: 1) A.P Godse & D.A Godse Digital Electronics, Technical publications, Pune, Revised third
edition, 2008. Pg.No:2.25-2.70
2) Morris Mano M. and Michael D. Ciletti, Digital Design, IV Edition, Pearson Education, 2008.
Pg.No:70.
Maurice Karnaugh, a telecommunications engineer, developed the Karnaugh map at Bell Labs in 1953
while designing digital logic based telephone switching circuits. Karnaugh maps reduce logic functions
more quickly and easily compared to Boolean algebra.
SCE
27
DEPT OF ECE
CS6201
A Karnaugh map provides a pictorial method of grouping together expressions with common factors and
therefore eliminating unwanted variables. The Karnaugh map can also be described as a special
arrangement of a truth table.
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:
The values around the edge of the map can be thought of as coordinates. So as an example, the square on
the top right hand corner of the map in the above diagram has coordinates A=1 and B=0. This square
corresponds to the row in the truth table where A=1 and B=0 and F=1. Note that the value in the F
column represents a particular function to which the Karnaugh map corresponds.
SCE
28
DEPT OF ECE
CS6201
Grouping/Circling K-maps
The power of K-maps is in minimizing the terms, K-maps can be minimized with the help of grouping
the terms to form single terms. When forming groups of squares, observe/consider the following:
Every square containing 1 must be considered at least once.
A square containing 1 can be included in as many groups as desired.
A group must be as large as possible.
If a square containing 1 cannot be placed in a group, then leave it out to include in final expression.
The number of squares in a group must be equal to 2 .i.e. 2,4,8,.
The map is considered to be folded or spherical, therefore squares at the end of a row or column are
treated as adjacent squares.
The simplified logic expression obtained from a K-map is not always unique. Groupings can be made
in different ways.
Before drawing a K-map the logic expression must be in canonical form.
SCE
29
DEPT OF ECE
CS6201
Example (1)- X'Y+XY: In this example we have the equation as input, and we have one output function.
Draw the k-map for function F with marking 1 for X'Y and XY position. Now combine two 1's as shown
in figure to form the single term. As you can see X and X' get canceled and only Y remains
F=Y
Example (2)- X'Y+XY+XY' :In this example we have the equation as input, and we have one output
function. Draw the k-map for function F with marking 1 for X'Y, XY and XY position. Now combine
two 1's as shown in figure to form the two single terms.
F=X+Y
SCE
30
DEPT OF ECE
CS6201
3-Variable K-Map
There are 8 minterms for 3 variables (X, Y, Z). Therefore, there are 8 cells in a 3-variable K-map. One
important thing to note is that K-maps follow the gray code sequence, not the binary one. Each cell in a
3-variable K-map has 3 adjacent neighbours. In general, each cell in an n-variable K-map has n adjacent
neighbours.
(1,3,4,5,6,7)
SCE
31
DEPT OF ECE
CS6201
4-Variable K-Map: There are 16 cells in a 4-variable (W, X, Y, Z); K-map as shown in the figure below
SCE
32
DEPT OF ECE
CS6201
5-Variable K-Map: There are 32 cells in a 5-variable (V, W, X, Y, Z); K-map as shown in the figure
below.
1.7
Ref: John F. Wakerly, Digital Design Principles and Practices, Fourth Edition, Pearson Education,2007.
Pg.No:264.
The tabular method which is also known as the Quine-McCluskey method is particularly useful when
minimising functions having a large number of variables, e.g. The six-variable functions. Computer
programs have been developed employing this algorithm. The method reduces a function in standard sum
of products form to a set of prime implicants from which as many variables are eliminated as possible.
These prime implicants are then examined to see if some are redundant.
The tabular method makes repeated use of the law A + = 1. Note that Binary notation is used for the
function, although decimal notation is also used for the functions. As usual a variable in true form is
denoted by 1, in inverted form by 0, and the abscence of a variable by a dash ( - ).
Rules of Tabular Method
1. The Boolean expression to be simplified is expanded if it is not in expanded form.
2. Different terms in the expression are divided into groups depending upon the number of 1s they
have.
3. The terms of the first group are successively matched with those in the next adjacent higher order
group to look for any possible matching and consequent reduction. The terms are considered
matched when all literals except for one match. The pairs of matched terms are replaced with a
single term where the position of the unmatched literals is replaced with a dash (). These new
terms formed as a result of the matching process find a place in the second table. The terms in the
first table that do not find a match are called the prime implicants and are marked with an asterisk
(). The matched terms are ticked (_).
4. Terms in the second group are compared with those in the third group to look for a possible match.
SCE
33
DEPT OF ECE
CS6201
Again, terms in the second group that do not find a match become the prime implicants.
5. The process continues until we reach the last group. This completes the first round of matching.
The terms resulting from the matching in the first round are recorded in the second table.
6. The next step is to perform matching operations in the second table. While comparing the terms
for a match, it is important that a dash () is also treated like any other literal, that is, the dash
signs also need to match. The process continues on to the third table, the fourth tables and so on
until the terms become irreducible any further.
7. An optimum selection of prime implicants to account for all the original terms constitutes the
terms for the minimized expression. Although optional (also called do t care) ter s are
considered for matching, they do not have to be accounted for once prime implicants have been
identified.
Example 1: Let us consider an example. Consider the following sum-of-products expression:
SCE
34
DEPT OF ECE
CS6201
The second round of matching begins with the table shown on the previous page. Each term in the first
group is compared with every term in the second group. For instance, the first term in the first group
001 matches with the second term in the second group 011 to yield 0 1, which is recorded in the
table shown below. The process continues until all terms have been compared for a possible match. Since
this new table has only one group, the terms contained therein are all prime implicants.
In the present example, the terms in the first and second tables have all found a match. But that is not
always the case.
The next table is what is known as the prime implicant table. The prime implicant table contains all the
original terms in different columns and all the prime implicants recorded in different rows as shown below:
Each prime implicant is identified by a letter. Each prime implicant is then examined one by one and the
terms it can account for are ticked as shown. The next step is to write a product-of-sums expression using
the prime implicants to account for all the terms. In the present illustration, it is given as follows.
Obvious simplification reduces this expression to PQRS which can be interpreted to mean that all prime
implicants, that is, P, Q, R and S, are needed to account for all the original terms.
Therefore, the minimized expression =
Example 2:
The procedure is similar to that described for the case of simplification of sum-of-products expressions.
The resulting tables leading to identification of prime implicants are as follows:
SCE
35
DEPT OF ECE
CS6201
The prime implicant table is constructed after all prime implicants have been identified to look for the
optimum set of prime implicants needed to account for all the original terms. The prime implicant table
shows that both the prime implicants are the essential ones:
SCE
36
DEPT OF ECE
CS6201
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.
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:
SCE
37
DEPT OF ECE
CS6201
1.8
38
DEPT OF ECE
CS6201
3.
4.
5.
6.
Reduce the following function using k-map technique
f(A,B,C,D)= _ M(0, 3, 4, 7, 8, 10, 12, 14)+d (2, 6)
7.
8.
SCE
39
DEPT OF ECE
CS6201
1.9
GLOSSARY TERMS
1. BCD- Binary Coded Decimal- Ways to encode the first 10 symbols of the decimal number system.
2. Excess-3 code- Excess-3 is a non weighted code used to express decimal numbers. The code derives
its name from the fact that each binary code is the corresponding 8421 code plus 0011(3).
3. Gray code- Unit-Distance Codes- Only one bit changes between successive values.
4. Boolean algebra- Boolean algebra is an algebraic structure defined by a set of elements B, together
with two binary operators. + and -.
5. Minterm -A minterm is the product of N distinct literals where each literal occurs exactly once.
6. Maxterm-A maxterm is the sum of N distinct literals where each literal occurs exactly once.
7. Logic gate- Logic gates are the basic elements that make up a digital system. The electronic gate is a
circuit that is able to operate on a number of binary inputs in order to perform a particular logical
function.
8. Universal gates -Universal gates are the ones which can be used for implementing any gate like
AND, OR and NOT, or any combination of these basic gates; NAND and NOR gates are universal gates.
9. Kamaugh map- K-maps are the convenient tool for representing switching functions of up to six
variables. An n-variable K-map has 2n cells with each cell corresponding to a row of an n-variable truth.
10. 1s complement-The 1s complement of a binary number is the number that results when we change
all 1s to zeros and the zeros to ones.
1.10
REFERENCES
1
2
Morris Mano M. and Michael D. Ciletti, Digital Design, IV Edition, Pearson Education, 2008.
A.P Godse & D.A Godse Digital Electronics, Technical publications, Pune, Revised third
edition, 2008.
Charles H. Roth, Fundamentals of Logic Design, 5th Edition, Thomson Learning, 2003.
SCE
40
DEPT OF ECE
CS6201
PRE-REQUISITE DISCUSSION
The term combinational comes to us from mathematics. In mathematics a combination is an unordered
set, which is a formal way to say that nobody cares which order the items came in.
Logic circuits for digital systems may be combinational or sequential. A combinational circuit consists of
logic gates whose outputs at any time are determined from only the present combination of inputs. A
combinational circuit performs an operation that can be specified logically by a set of Boolean functions.
In contrast, sequential circuits employ storage elements in addition to logic gates. Their outputs are a
function of the inputs and the state of the storage elements.
2.1 COMBINATIONAL CIRCUITS
Ref: 1) A.P Godse & D.A Godse Digital Electronics, Technical publications, Pune, Revised third
edition, 2008. Pg.No:4.1
2) Morris Mano M. and Michael D. Ciletti, Digital Design, IV Edition, Pearson Education, 2008.
Pg.No:122.
A combinational circuit is one where the output at any time depends only on the present combination of
inputs at that point of time with total disregard to the past state of the inputs. The logic gate is the most
basic building block of combinational logic. The logical function performed by a combinational circuit is
fully defined by a set of Boolean expressions. The other category of logic circuits, called sequential logic
circuits, comprises both logic gates and memory elements such as flip-flops. Owing to the presence of
memory elements, the output in a sequential circuit depends upon not only the present but also the past
state of inputs.
A combinational circuit consists of input variables, logic gates, and output variables. Combinational logic
gates react to the values of the signals at their inputs and produce the value of the output signal,
transforming binary information from the given input data to a required output data.
COMBINATIONAL
CIRCUIT
n- Inputs
m- outputs
ANALYSIS PROCEDURE
Ref: 1) A.P Godse & D.A Godse Digital Electronics, Technical publications, Pune, Revised third
edition, 2008. Pg.No:4.2
SCE
41
DEPT OF ECE
CS6201
2) Morris Mano M. and Michael D. Ciletti, Digital Design, IV Edition, Pearson Education,
2008.Pg.No:123.
The analysis of a combinational circuit requires that we determine the function that the circuit
implements. The analysis can be performed manually by finding the Boolean functions or truth table or
by using a computer simulation program.
The first step in the analysis is to make that the given circuit is combinational or sequential. Once the
logic diagram is verified to be combinational, one can proceed to obtain the output Boolean functions or
the truth table.
To obtain the output Boolean functions from a logic diagram,
Label all gate outputs that are a function of input variables with arbitrary symbols or names. Determine
the Boolean functions for each gate output.
Label the gates that are a function of input variables and previously labeled gates with other arbitrary
symbols or names. Find the Boolean functions for these gates.
Repeat the process in step 2 until the outputs of the circuit are obtained.
By repeated substitution of previously defined functions, obtain the output Boolean functions in terms
of input variables.
&
=
= +
+ +
42
+
DEPT OF ECE
CS6201
To obtain the truth table directly from the logic diagram without going through the derivations of
Boolean functions,
Determine the number of input variables in the circuit. For n-inputs, form the 2n possible input
combinations and list the binary numbers from 0 to 2n-1 in a table.
Obtain the truth table for the outputs of those gates which are a function of the input variables
only.
Proceed to obtain the truth table for the outputs of those gates which are a function of previously
defined values until the columns for all outputs are determined.
2.3
DESIGN PROCEDURE
Ref: 1) A.P Godse & D.A Godse Digital Electronics, Technical publications, Pune, Revised third
edition, 2008. Pg.No:4.1
2) Morris Mano M. and Michael D. Ciletti, Digital Design, IV Edition, Pearson Education,
2008.Pg.No:126.
The design of combinational circuits starts from the specification of the design objective and culminates
in a logic circuit diagram or a set of Boolean functions from which the logic diagram can be obtained.
The procedure involved involves the following steps,
From the specifications of the circuit, determine the required number of inputs and outputs and
assign a symbol to each.
Derive the truth table that defines the required relationship between inputs and outputs.
Obtain the simplified Boolean functions for each output as a function of the input variables.
Draw the logic diagram and verify the correctness of the design.
2.4
Ref: 1) A.P Godse & D.A Godse Digital Electronics, Technical publications, Pune, Revised third
edition, 2008. Pg.No:4.3
2) Morris Mano M. and Michael D. Ciletti, Digital Design, IV Edition, Pearson Education, 2008.
Pg.No:130.
SCE
43
DEPT OF ECE
CS6201
Arithmetic circuits are the ones which perform arithmetic operations like addition, subtraction,
multiplication, division, parity calculation. Most of the time, designing these circuits is the same as
designing mux, encoders and decoders.
1.
Adders
Adders are the basic building blocks of all arithmetic circuits; adders add two binary numbers and
give out sum and carry as output. Basically we have two types of adders.
Half Adder.
Full Adder.
Half Adder
A half-adder is an arithmetic circuit block that can be used to add two bits. Such a circuit thus has two
inputs that represent the two bits to be added and two outputs, with one producing the SUM output and
the other producing the CARRY.
Adding two single-bit binary values X, Y produces a sum S bit and a carry out C-out bit. This operation
is called half addition and thus the circuit to realize it is called a half adder.
Symbol
Truth table
X
0
0
1
1
= +
=
Y
0
1
0
1
SUM
0
1
1
0
CARRY
0
0
0
1
SCE
44
DEPT OF ECE
CS6201
Full Adder
A full adder circuit is an arithmetic circuit block that can be used to add three bits to produce a SUM and
a CARRY output. Such a building block becomes a necessity when it comes to adding binary numbers
with a large number of bits. The full adder circuit overcomes the limitation of the half-adder, which can
be used to add two bits only.
Full adder takes a three-bits input. Adding two single-bit binary values X, Y with a carry input bit C-in
produces a sum bit S and a carry out C.
Truth Table
SCE
= +
=
0
0
0
0
1
1
1
1
0
0
1
1
0
0
1
1
0
1
0
1
0
1
0
1
SU
M
0
1
1
0
1
0
0
1
CARRY
0
0
0
1
0
1
1
1
=
45
+
DEPT OF ECE
CS6201
Circuit-CARRY
Circuit-CARRY
Full Adder using AND-OR
Circuit-SUM
SCE
46
DEPT OF ECE
CS6201
SCE
47
DEPT OF ECE
CS6201
Larger Adder
Example: 16-bit adder using 4 4-bit adders. Adds two 16-bit inputs X (bits X0 to X15), Y (bits Y0 to
Y15) producing a 16-bit Sum S (bits S0 to S15) and a carry out C16 from the most significant position.
Propagation delay for 16-bit adder = 4 x propagation delay of 4-bit adder
= 4 x 2 nD = 4 x 8D = 32 D or 32 gate delays
The delay generated by an N-bit adder is proportional to the length N of the two numbers X and Y that
are added because the carry signals have to propagate from one full-adder to the next. For large values of
N, the delay becomes unacceptably large so that a special solution needs to be adopted to accelerate the
calculation of the carry bits. This solution involves a "look-ahead carry generator" which is a block that
simultaneously calculates all the carry bits involved. Once these bits are available to the rest of the
circuit, each individual three-bit addition (Xi+Yi+carry-ini) is implemented by a simple 3-input XOR
gate. The design of the look-ahead carry generator involves two Boolean functions named Generate and
Propagate. For each input bits pair these functions are defined as: Gi = Xi . Yi & Pi = Xi + Yi
The carry bit c-out(i) generated when adding two bits Xi and Yi is '1' if the corresponding function Gi is
'1' or if the c-out(i-1)='1' and the function Pi = '1' simultaneously. In the first case, the carry bit is
activated by the local conditions (the values of Xi and Yi). In the second, the carry bit is received from
the less significant elementary addition and is propagated further to the more significant elementary
addition. Therefore, the carry_out bit corresponding to a pair of bits Xi and Yi is calculated according to
the equation:
carry_out(i) = Gi + Pi.carry_in(i-1)
For a four-bit adder the carry-outs are calculated as follows
carry_out0 = G0 + P0 . carry_in0
carry_out1 = G1 + P1 . carry_out0 = G1 + P1G0 + P1P0 . carry_in0
carry_out2 = G2 + P2G1 + P2P1G0 + P2P1P0 . carry_in0
carry_out3 = G3 + P3G2 + P3P2G1 + P3P2P1G0 + P3P2P1 . carry_in0
The set of equations above are implemented by the circuit below and a complete adder with a look-ahead
carry generator is next. The input signals need to propagate through a maximum of 4 logic gate in such
an adder as opposed to 8 and 12 logic gates in its counterparts illustrated earlier.
SCE
48
DEPT OF ECE
CS6201
Sums can be calculated from the following equations, where carry_out is taken from the carry calculated
in the above circuit.
sum_out0 = X 0 Y0 carry_out0
sum_out1 = X 1 Y1 carry_out1
sum_out2 = X 2 Y2 carry_out2
sum_out3 = X 3 Y3 carry_out3
BCD Adder
BCD addition is the same as binary addition with a bit of variation: whenever a sum is greater than 1001,
it is not a valid BCD number, so we add 0110 to it, to do the correction. This will produce a carry, which
is added to the next BCD position.
SCE
49
DEPT OF ECE
CS6201
Subtractor circuits take two binary numbers as input and subtract one binary number input from the other
binary number input. Similar to adders, it gives out two outputs, difference and borrow (carry-in the case
of Adder). The BORROW output here specifies whether a 1 has been borrowed to perform the
subtraction.
There are two types of subtractors,
Half Subtractor
The half-subtractor is a combinational circuit which is used to perform subtraction of two bits. It has two
inputs, X (minuend) and Y (subtrahend) and two outputs D (difference) and B (borrow). The logic
symbol and truth table are shown below.
Symbol
Truth table
X
0
0
1
1
Y
0
1
0
1
D
0
1
1
0
B
0
1
0
0
From the above table we can draw the K-map as shown below for "difference" and "borrow". The
Boolean expression for the difference and Borrow can be written.
From the equation we can draw the half-subtractor as shown in the figure below.
SCE
50
DEPT OF ECE
CS6201
Full Subtractor
A full subtractor is a combinational circuit that performs subtraction involving three bits, namely
minuend, subtrahend, and borrow-in. There are two outputs, namely the DIFFERENCE output D and the
BORROW output Bo. The BORROW output bit tells whether the minuend bit needs to borrow a 1
from the next possible higher minuend bit. The logic symbol and truth table are shown below.
Symbol
Truth table
X
0
0
0
0
1
1
1
1
Y
0
0
1
1
0
0
1
1
Bin
0
1
0
1
0
1
0
1
D
0
1
1
0
1
0
0
1
Bout
0
1
1
1
0
0
0
1
From the above expression, we can draw the circuit below. If you look carefully, you will see that a fullsubtractor circuit is more or less same as a full-adder with slight modification.
SCE
51
DEPT OF ECE
CS6201
Parallel binary subtractor can be implemented by cascading several full-subtractors. Implementation and
associated problems are those of a parallel binary adder, seen before in parallel binary adder section.
Below is the block level representation of a 4-bit parallel binary subtractor, which subtracts 4-bit
Y3Y2Y1Y0 from 4-bit X3X2X1X0. It has 4-bit difference output D3D2D1D0 with borrow output Bout.
A serial subtracter can be obtained by converting the serial adder using the 2's complement system. The
subtrahend is stored in the Y register and must be 2's complemented before it is added to the minuend
stored in the X register. The circuit for a 4-bit serial subtracter using full-adder is shown in the figure
below.
SCE
52
DEPT OF ECE
CS6201
Comparators
It is a combinational circuit that compares two numbers and determine their relative magnitude. The
output of comparator is usually 3 binary variables indicating:
A<B, A=B, A>B
1-bit comparator: Lets begin with 1 bit comparator and from the name we can easily make out that
this circuit would be used to compare 1 bit binary numbers.
A
A>B
A=B
A<B
For a 2-bit comparator we have four inputs A1A0 and B1B0 and three output E ( is 1 if two
numbers are equal) G (is 1 when A > B) and L (is 1 when A < B) If we use truth table and K-map
the result is
The comparison process of two positive numbers X and Y is performed in a bit-by-bit manner starting
with the most significant bit:
If the most significant bits are Xn='1' and Yn='0' then number X is larger than Y.
If Xn=Yn then no decision can be taken about X and Y based only on these two bits.
SCE
53
DEPT OF ECE
CS6201
If the most significant bits are equal then the result of the comparison is determined by the less
significant bits Xn-1 and Yn-1. If these bits are equal as well, the process continues with the next pair of
bits. If all bits are equal then the two numbers are equal.
4-bit comparator:
2.5
Truth Table
S. No B3
0
0
1
0
2
0
3
0
4
0
5
0
6
0
7
0
8
1
9
1
10
1
11
1
12
1
13
1
14
1
15
1
SCE
B2
0
0
0
0
1
1
1
1
0
0
0
0
1
1
1
1
B1
0
0
1
1
0
0
1
1
0
0
1
1
0
0
1
1
B0
0
1
0
1
0
1
0
1
0
1
0
1
0
1
0
1
54
G3
0
0
0
0
0
0
0
0
1
1
1
1
1
1
1
1
G2
0
0
0
0
1
1
1
1
1
1
1
1
0
0
0
0
G1
0
0
1
1
1
1
0
0
0
0
1
1
1
1
0
0
G0
0
1
1
0
0
1
1
0
0
1
1
0
0
1
1
0
DEPT OF ECE
CS6201
G3= B3
K-MAP FOR G2:
G2= B3 B2 + B3 B2= B3
B2
G1= B1 B2 + B1 B2= B1
SCE
55
B2
DEPT OF ECE
CS6201
G0= B1 B0 + B1 B0= B1
2.6
B0
DECODERS
Ref: 1) A.P Godse & D.A Godse Digital Electronics, Technical publications, Pune, Revised third
edition, 2008. Pg.No:4.53
2) Morris Mano M. and Michael D. Ciletti, Digital Design, IV Edition, Pearson Education, 2008.
Pg.No:146.
A decoder circuit can be used to implement AND-OR circuit SOP Boolean expression when decoder
active state output is 1 and inactive 0 .
Number of binary inputs = n
Number of binary outputs = 2n = Maximum number of minterms, where n is the number of literals in F
Its outputs reflect the Mini-terms with one term each at each of the output
SCE
56
DEPT OF ECE
CS6201
SCE
57
DEPT OF ECE
CS6201
ENCODERS
An encoder is a circuit that converts the binary information from one form to another. Gives a unique
combination of outputs according to the information at a unique input at one-line (or at multiple lines).
Action of a one active line input encoder is opposite of that of a one active line output decoder. An
encoder, which has multi-lines as the active inputs, is also called priority encoder. Encoder can be
differentiated from decoder by greater number of inputs than outputs compared to the decoder. The
priority encoder includes a priority function.
4to3 Priority Encoder-The truth table of a 4-input priority encoder is as shown below. The input D3 has
the highest priority, D2 has next highest priority, D0 has the lowest priority. This means output Y2 and
Y1 are 0 only when none of the inputs D1, D2, D3 are high and only D0 is high. A 4 to 3 encoder
consists of four inputs and three outputs, truth table and symbols of which is shown below.
Truth Table
D3
0
0
SCE
D2
0
0
D1
0
0
D0
0
1
58
Y2
0
0
Y1
0
0
Y0
0
1
DEPT OF ECE
CS6201
0
0
1
0
1
x
1
x
x
x
x
x
K-map
2.8
MULTIPLEXERS
Ref: 1) A.P Godse & D.A Godse Digital Electronics, Technical publications, Pune, Revised third
edition, 2008. Pg.No:4.36
2) Morris Mano M. and Michael D. Ciletti, Digital Design, IV Edition, Pearson Education, 2008.
Pg.No:152.
Many tasks in communications, control, and computer systems can be performed by combinational logic
circuits. When a circuit has been designed to perform some task in one application, it often finds use in a
different application as well.
SCE
59
DEPT OF ECE
CS6201
DIGITAL PRINCIPLES AND SYSTEM DESIGN
A multiplexer (MUX) is a digital switch which connects data from one of n sources to the output. A
number of select inputs determine which data source is connected to the output. The block diagram of
MUX with n data sources of b bits wide and s bits wide select line is shown in below figure.
Truth table
S
0
1
Y
A
B
60
DEPT OF ECE
CS6201
A
0
0
1
1
0
0
1
1
S
0
1
0
1
0
1
0
1
K-map
Y
0
0
1
0
0
1
1
1
Circuit
Truth table
S1
0
0
1
1
SCE
61
S0
0
1
0
1
Y
I0
I1
I2
I3
DEPT OF ECE
CS6201
2.9
DEMULTIPLEXERS
They are digital switches which connect data from one input source to one of n outputs. Usually
implemented by using n-to-2n binary decoders where the decoder enable line is used for data input of the
de-multiplexer.
The figure below shows a de-multiplexer block diagram which has got s-bits-wide select input, one bbits-wide data input and n b-bits-wide outputs.
SCE
62
DEPT OF ECE
CS6201
Truth table
S1
0
0
1
1
S0
0
1
0
1
F0
D
0
0
0
F1
0
D
0
0
F2
0
0
D
0
F3
0
0
0
D
SCE
63
DEPT OF ECE
CS6201
ABCD
Minterm
f(A, B, C, D)
0000
0001
0010
0011
0100
0101
0110
0111
1000
1001
1010
10
1011
11
1100
12
1101
13
1110
14
1111
15
f(A,B,C,D) = A + BD + BC;
SCE
f(A,B,C,D) = (A + B)(A + C + D)
64
DEPT OF ECE
CS6201
2.10
Ref: Morris Mano M. and Michael D. Ciletti, Digital Design, IV Edition, Pearson Education, 2008.
Pg.No:159.
In electronics, a hardware description language or HDL is any language from a class of computer
languages and/or programming languages for formal description of digital logic and electronic circuits.
HDLs are used to write executable specifications of some piece of hardware. A simulation program,
designed to implement the underlying semantics of the language statements, coupled with simulating the
progress of time, provides the hardware designer with the ability to model a piece of hardware before it is
created physically.
2.11
The Verilog HDL model of a combinational circuit can be described in any one of the following
modeling styles,
Gate level modeling-using instantiations of predefined and user defined primitive gates.
Dataflow modeling using continuous assignment with the keyword assign.
Behavioral modeling using procedural assignment statements with the keyword always.
Gate level modeling
In this type, a circuit is specified by its logic gates and their interconnections. Gate level modeling
provides a textual description of a schematic diagram. The verilog HDL includes 12 basic gates as
predefined primitives. They are and, nand, or, nor, xor, xnor, not & buf.
Dataflow modeling
SCE
65
DEPT OF ECE
CS6201
Dataflow modeling of combinational logic uses a number of operators that act on operands to produce
desired results. Verilog HDL provides about 30 different operators. Dataflow modeling uses continuous
assignments and the keyword assign. A continuous assignment is a statement that assigns a value to a
net. The data type family net is used to represent a physical connection between circuit elements.
Behavioral modeling
Behavioral modeling represents digital circuits at a functional and algorithmic level. It is used mostly to
describe sequential circuits, but can also be used to describe combinational circuits. Behavioral
descriptions use the keyword always, followed by an optional event control expression and a list of
procedural assignment statements.
SCE
66
DEPT OF ECE
CS6201
2.12
SCE
67
DEPT OF ECE
CS6201
PART-B
1. Design a combinational logic circuit to convert the Gray code into Binary code
2. Draw the truth table and logic diagram for full-Adder
3. Draw the truth table and logic diagram for full-Subtractor
4. Explain Binary parallel adder.
5. Design a combinational logic circuit to convert the BCD to Binary code
6. Explain about Encoder and Decoder?
7. Explain about 4 bit Magnitude comparator?
8. Design a circuit that converts 8421 BCD code to Excess-3 code.
9. Implement the switching function =
, , , , , ,
using an 8 input MUX.
10. Implement a full adder with two 4 1 multiplexers.
2.13
GLOSSARY TERMS
1.
Combinational logic-When logic gates are connected together to produce a specified output for
certain specified combinations of input variables, with no storage involved, the resulting circuit is called
combinational logic.
2.
Encoder-An encoder has 2n input lines and n output lines. In encoder the output lines generate the
binary code corresponding to the input value.
3.
Decoder- A decoder is a multiple - input multiple output logic circuit that converts coded inputs
into coded outputs where the input and output codes are different.
4.
Multiplexer- Multiplexer is a digital switch. It allows digital information from several sources to
be routed onto a single output line.
5.
Demultiplexer- It allows digital information from single input line to be routed onto a several
output line sources.
6.
Hardware description language (HDL)- hardware description language or HDL is any
language from a class of computer languages and/or programming languages for formal description of
digital logic and electronic circuits.
2.14
REFERENCES
4
Morris Mano M. and Michael D. Ciletti, Digital Design, IV Edition, Pearson Education, 2008.
5
A.P Godse & D.A Godse Digital Electronics, Technical publications, Pune, Revised third
edition, 2008.
6
Charles H. Roth, Fundamentals of Logic Design, 5th Edition, Thomson Learning, 2003.
SCE
68
DEPT OF ECE
CS6201
The memory elements are devices capable of storing binary info. The binary info stored in the memory
elements at any given time defines the state of the sequential circuit. The input and the present state of the
memory element determine the output. Memory elements next state is also a function of external inputs
and present state. A sequential circuit is specified by a time sequence of inputs, outputs, and internal
states.
There are two types of sequential circuits. Their classification depends on the timing of their signals:
This is a system whose outputs depend upon the order in which its input variables change and can be
affected at any instant of time. Gate-type asynchronous systems are basically combinational circuits with
feedback paths. Because of the feedback among logic gates, the system may, at times, become unstable.
Consequently they are not often used.
SCE
69
DEPT OF ECE
CS6201
A clock signal is a periodic square wave that indefinitely switches from 0 to 1 and from 1 to 0 at fixed
intervals. Clock cycle time or clock period: the time interval between two consecutive rising or falling
edges of the clock.
Clock Frequency = 1 / clock cycle time (measured in cycles per second or Hz)
Example: Clock cycle time = 10ns clock frequency = 100M
3.1
Ref: 1) A.P Godse & D.A Godse Digital Electronics, Technical publications, Pune, Revised third
edition, 2008. Pg.No:5.1
2) Morris Mano M. and Michael D. Ciletti, Digital Design, IV Edition, Pearson Education,
2008.Pg.No:182.
A sequential circuit is a combinational logic with some feedback to maintain its current value, like a
memory cell. To understand the basics let's consider the basic feedback logic circuit below, which is a
simple NOT gate whose output is connected to its input. The effect is that output oscillates between
HIGH and LOW (i.e. 1 and 0). Oscillation frequency depends on gate delay and wire delay. Assuming a
wire delay of 0 and a gate delay of 10ns, then oscillation frequency would be (on time + off time = 20ns)
50Mhz.
SCE
70
DEPT OF ECE
CS6201
The basic idea of having the feedback is to store the value or hold the value, but in the above circuit,
output keeps toggling. We can overcome this problem with the circuit below, which is basically
cascading two inverters, so that the feedback is in-phase, thus avoids toggling. The equivalent circuit is
the same as having a buffer with its output connected to its input.
The circuit below is the same as the inverters connected back to back with provision to set the state of
each gate (NOR is gate with both inputs shorted like a inverter). I am not going to explain the operation,
as it is clear from the truth table. S is called set and R is called Reset.
S
0
0
0
1
1
R
0
0
1
0
1
Q
0
1
X
X
X
Q+
0
1
0
1
0
There still seems to be some problem with the above configuration, we cannot control when the input
should be sampled, in other words there is no enable signal to control when the input is sampled.
Normally input enable signals can be of two types.
Level Sensitive or ( LATCH)
Edge Sensitive or (Flip-Flop)
Level Sensitive: The circuit below is a modification of the above one to have level sensitive enable
input. Enable, when LOW, masks the input S and R. When HIGH, presents S and R to the sequential
logic input (the above circuit two NOR Gates). Thus Enable, when HIGH, transfers input S and R to
the sequential cell transparently, so this kind of sequential circuits are called transparent Latch. The
memory element we get is an RS Latch with active high Enable.
Edge Sensitive: The circuit below is a cascade of two level sensitive memory elements, with a
phase shift in the enable input between first memory element and second memory element. The
first RS latch (i.e. the first memory element) will be enabled when CLK input is HIGH and the
second RS latch will be enabled when CLK is LOW. The net effect is input RS is moved to Q and
SCE
71
DEPT OF ECE
CS6201
Q' when CLK changes state from HIGH to LOW, this HIGH to LOW transition is called falling
edge. So the Edge Sensitive element we get is called negative edge RS flip-flop.
3.2
Ref: 1) A.P Godse & D.A Godse Digital Electronics, Technical publications, Pune, Revised third
edition, 2008. Pg.No:5.3
2) Morris Mano M. and Michael D. Ciletti, Digital Design, IV Edition, Pearson Education, 2008.
Pg.No:184.
There are two types of sequential circuits.
Asynchronous Circuits.
Synchronous Circuits.
Latches and Flip-flops are one and the same with a slight variation: Latches have level sensitive control
signal input and Flip-flops have edge sensitive control signal input. Flip-flops and latches which use this
control signals are called synchronous circuits. So if they don't use clock inputs, then they are called
asynchronous circuits.
RS Latch
RS latch have two inputs, S and R. S is called set and R is called reset. The S input is used to produce
HIGH on Q ( i.e. store binary 1 in flip-flop). The R input is used to produce LOW on Q (i.e. store binary 0
in flip-flop). Q' is Q complementary output, so it always holds the opposite value of Q. The output of the
S-R latch depends on current as well as previous inputs or state, and its state (value stored) can change as
soon as its inputs change. The circuit and the truth table of RS latch is shown below.
S
0
0
0
1
1
SCE
72
R
0
0
1
0
1
Q
0
1
X
X
X
Q+
0
1
0
1
0
DEPT OF ECE
CS6201
The operation has to be analyzed with the 4 inputs combinations together with the 2 possible previous
states.
When S = 0 and R = 0: If we assume Q = 1 and Q' = 0 as initial condition, then output Q after
input is applied would be Q = (R + Q')' = 1 and Q' = (S + Q)' = 0. Assuming Q = 0 and Q' = 1 as
initial condition, then output Q after the input applied would be Q = (R + Q')' = 0 and Q' = (S + Q)'
= 1. So it is clear that when both S and R inputs are LOW, the output is retained as before the
application of inputs. (i.e. there is no state change).
When S = 1 and R = 0: If we assume Q = 1 and Q' = 0 as initial condition, then output Q after
input is applied would be Q = (R + Q')' = 1 and Q' = (S + Q)' = 0. Assuming Q = 0 and Q' = 1 as
initial condition, then output Q after the input applied would be Q = (R + Q')' = 1 and Q' = (S + Q)'
= 0. So in simple words when S is HIGH and R is LOW, output Q is HIGH.
When S = 0 and R = 1: If we assume Q = 1 and Q' = 0 as initial condition, then output Q after
input is applied would be Q = (R + Q')' = 0 and Q' = (S + Q)' = 1. Assuming Q = 0 and Q' = 1 as
initial condition, then output Q after the input applied would be Q = (R + Q')' = 0 and Q' = (S + Q)'
= 1. So in simple words when S is LOW and R is HIGH, output Q is LOW.
When S = 1 and R =1 : No matter what state Q and Q' are in, application of 1 at input of NOR gate
always results in 0 at output of NOR gate, which results in both Q and Q' set to LOW (i.e. Q = Q').
LOW in both the outputs basically is wrong, so this case is invalid.
The waveform below shows the operation of NOR gates based RS Latch.
It is possible to construct the RS latch using NAND gates. The circuit and Truth table of RS latch using
NAND is shown below.
S
1
1
0
1
0
SCE
73
R
1
1
1
0
0
Q
0
1
X
X
X
Q+
0
1
0
1
1
DEPT OF ECE
CS6201
Setup and Hold Time -For synchronous flip-flops, we have special requirements for the inputs with
respect to clock signal input. They are,
Setup Time: Minimum time period during which data must be stable before the clock makes a
valid transition. For example, for a posedge triggered flip-flop, with a setup time of 2 ns, Input Data
(i.e. R and S in the case of RS flip-flop) should be stable for at least 2 ns before clock makes
transition from 0 to 1.
Hold Time: Minimum time period during which data must be stable after the clock has made a
valid transition. For example, for a posedge triggered flip-flop, with a hold time of 1 ns. Input Data
(i.e. R and S in the case of RS flip-flop) should be stable for at least 1 ns after clock has made
transition from 0 to 1.
If data makes transition within this setup window and before the hold window, then the flip-flop output is
not predictable, and flip-flop enters what is known as meta stable state. In this state flip-flop output
oscillates between 0 and 1. It takes some time for the flip-flop to settle down. The whole process is called
metastability.
The waveform below shows input S (R is not shown), and CLK and output Q (Q' is not shown) for a SR
posedge flip-flop.
SCE
74
DEPT OF ECE
CS6201
D Latch
The RS latch seen earlier contains ambiguous state; to eliminate this condition we can ensure that S and R
are never equal. This is done by connecting S and R together with an inverter. Thus we have D Latch: the
same as the RS latch, with the only difference that there is only one input, instead of two (R and S). This
input is called D or Data input. D latch is called D transparent latch for the reasons explained earlier.
Delay flip-flop or delay latch is another name used. Below is the truth table and circuit of D latch. In real
world designs (ASIC/FPGA Designs) only D latches/Flip-Flops are used.
D
1
0
Q
X
X
Q+
1
0
Below is the D latch waveform, which is similar to the RS latch one, but with R removed.
JK Latch
The ambiguous state output in the RS latch was eliminated in the D latch by joining the inputs with an
inverter. But the D latch has a single input. JK latch is similar to RS latch in that it has 2 inputs J and K as
shown figure below. The ambiguous state has been eliminated here: when both inputs are high, output
toggles. The only difference we see here is output feedback to inputs, which is not there in the RS latch
J
1
1
1
0
SCE
75
K
1
1
0
1
Q
0
1
1
0
DEPT OF ECE
CS6201
T Latch
When the two inputs of JK latch are shorted, a T Latch is formed. It is called T latch as, when input is held
HIGH, output toggles.
T
1
1
0
0
Q
0
1
1
0
Q+
1
0
1
0
In the figure above there are two latches, the first latch on the left is called master latch and the one on
the right is called slave latch. Master latch is positively clocked and slave latch is negatively clocked.
SCE
76
DEPT OF ECE
CS6201
3.3
Ref: Morris Mano M. and Michael D. Ciletti, Digital Design, IV Edition, Pearson Education, 2008.
Pg.No:225.
We saw in the combinational circuits section how to design a combinational circuit from the given
problem. We convert the problem into a truth table, then draw K-map for the truth table, and then finally
draw the gate level circuit for the problem. Similarly we have a flow for the sequential circuit design.
The steps are given below.
State Diagram -The state diagram is constructed using all the states of the sequential circuit in
question. It builds up the relationship between various states and also shows how inputs affect
the states.
Lets consider designing the 2 bit up counter (Binary counter is one which counts a binary
sequence) using the T flip-flop.
SCE
77
DEPT OF ECE
CS6201
State Table - The state table is the same as the excitation table of a flip-flop, i.e. what inputs
need to be applied to get the required output. In other words this table gives the inputs required
to produce the specific outputs.
Q1
0
0
1
1
Q0
0
1
0
1
Q1+
0
1
1
0
Q0+
1
0
1
0
T1
0
1
0
1
T0
1
1
1
1
K-map -The K-map is the same as the combinational circuits K-map. Only difference: we draw
K-map for the inputs i.e. T1 and T0 in the above table. From the table we deduct that we don't
need to draw K-map for T0, as it is high for all the state combinations. But for T1 we need to
draw the K-map as shown below, using SOP.
Circuit- There is nothing special in drawing the circuit, it is the same as any circuit drawing
from K-map output. Below is the circuit of 2-bit up counter using the T flip-flop.
3.4
SHIFT REGISTER
Ref: 1) A.P Godse & D.A Godse Digital Electronics, Technical publications, Pune, Revised third
edition, 2008. Pg.No:8.1
2) Morris Mano M. and Michael D. Ciletti, Digital Design, IV Edition, Pearson Education, 2008.
Pg.No:245.
Register:
A set of n flip-flops.
Each flip-flop stores one bit.
SCE
78
DEPT OF ECE
CS6201
SCE
79
DEPT OF ECE
CS6201
In order to get the data out of the register, they must be shifted out serially. This can be done
destructively or non-destructively. For destructive readout, the original data is lost and at the end of the
read cycle, all flip-flops are reset to zero.
FF0
0
FF1
0
FF2
0
FF3
0
1001
The data is loaded to the register when the control line is HIGH (ie WRITE). The data can be shifted out
of the register when the control line is LOW (ie READ).
Clear
1001
FF0
0
FF1
0
FF2
0
FF3
0
FF0
1
FF1
0
FF2
0
FF3
1
0000
FF0
1
FF1
0
FF2
0
FF3
1
1001
Write
Read
Serial-in, parallel-out
This configuration allows conversion from serial to parallel format. Data are input serially, as described
in the SISO section above. Once the data has been input, it may be either read off at each output
simultaneously, or it can be shifted out and replaced.
SCE
80
DEPT OF ECE
CS6201
In the table below, we can see how the four-bit binary number 1001 is shifted to the Q outputs of the
register.
Clear
1001
-
FF0
0
1
0
0
1
FF1
0
0
1
0
0
FF2
0
0
0
1
0
FF3
0
0
0
0
1
Parallel-in, serial-out
This configuration has the data input on lines D1 through D4 in parallel format. To write the data to the
register, the Write/Shift control line must be held LOW. To shift the data, the W/S control line is
brought HIGH and the registers are clocked. The arrangement now acts as a SISO shift register, with D1
as the Data Input. However, as long as the number of clock cycles is not more than the length of the
data-string, the Data Output, Q, will be the parallel data read off in order.
Example: A four-bit parallel in - serial out shift register is shown below. The circuit uses D flip -flops
and NAND gates for entering data (ie writing) to the register.
SCE
81
DEPT OF ECE
CS6201
D0, D1, D2 and D3 are the parallel inputs, where D0 is the most significant bit and D3 is the least
significant bit. To write data in, the mode control line is taken to LOW and the data is clocked in. The
data
can be shifted when the mode control line is HIGH as SHIFT is active high. The register performs right
shift operation on the application of a clock pulse, as shown in the table below.
Parallel-in, parallel-out
This configuration allows conversion from parallel to parallel format. Data input are in parallel, as
described in the PISO section above. Once the data has been input, it may be either read off at each
output simultaneously, or it can be shifted out and replaced.
Clear
Write
Shift
-
Q0
0
1
1
1
1
1
1
Q1
0
0
0
1
1
1
1
Q2
0
0
0
0
1
1
1
Q3
0
1
1
0
0
1
1
1
01
001
1001
The D's are the parallel inputs and the Q's are the parallel outputs. Once the register is clocked, all the
data at the D inputs appear at the corresponding Q outputs simultaneously
Universal shift register
A register capable of shifting in one direction only is a unidirectional shift register .One that can shift in
both directions is a bidirectional shift register. If the register has both shifts and parallel-loads, it is
referred as universal shift register. The circuit consists of four D flip-flops and four multiplexers. The
four multiplexers have two common selection inputs s1 and s0.
SCE
82
DEPT OF ECE
CS6201
Mode control
s1
s0
0
0
0
1
0
0
1
1
Register
Operation
No change
Shift right
Shift left
Parallel load
SCE
83
DEPT OF ECE
CS6201
2) Morris Mano M. and Michael D. Ciletti, Digital Design, IV Edition, Pearson Education, 2008.
Pg.No:253.
In digital logic and computing, a counter is a device which stores (and sometimes displays) the
number of times a particular event or process has occurred, often in relationship to a clock signal. In
practice, there are two types of counters:
up counters which increase (increment) in value
down counters which decrease (decrement) in value
Counters Types
In electronics, counters can be implemented quite easily using register-type circuits such as the flip-flop,
and a wide variety of designs exist,
Asynchronous (ripple) counters
Synchronous counters
Johnson counters
Decade counters
Up-Down counters
Ring counters
Each is useful for different applications. Usually, counter circuits are digital in nature, and count in
binary, or sometimes binary coded decimal. Many types of counter circuit are available as digital
building blocks, for example a number of chips in the 4000 series implement different counters.
Asynchronous (ripple) counters
The simplest counter circuit is a single D-type flip flop, with its D (data) input fed from its own inverted
output. This circuit can store one bit, and hence can count from zero to one before it overflows (starts
over from 0). This counter will increment once for every clock cycle and takes two clock cycles to
overflow, so every cycle it will alternate between a transition from 0 to 1 and a transition from 1 to 0.
Notice that this creates a new clock with a 50% duty cycle at exactly half the frequency of the input
clock. If this output is then used as the clock signal for a similarly arranged D flip flop (remembering to
invert the output to the input), you will get another 1 bit counter that counts half as fast. Putting them
together yields a two bit counter:
Synchronous counters
Where a stable count value is important across several bits, which is the case in most counter systems,
synchronous counters are used. These also use flip-flops, either the D-type or the more complex J-K
type, but here, each stage is clocked simultaneously by a common clock signal. Logic gates between
each stage of the circuit control data flow from stage to stage so that the desired count behavior is
realized. Synchronous counters can be designed to count up or down, or both according to a direction
input, and may be presetable via a set of parallel "jam" inputs. Most types of hardware-based counter are
of this type.
SCE
84
DEPT OF ECE
CS6201
A simple way of implementing the logic for each bit of an ascending counter (which is what is shown in
the image to the right) is for each bit to toggle when all of the less significant bits are at a logic high
state. For example, bit 1 toggles when bit 0 is logic high; bit 2 toggles when both bit 1 and bit 0 are logic
high; bit 3 toggles when bit 2, bit 1 and bit 0 are all high; and so on.
Johnson counters
A Johnson counter is a special case of shift register, where the output from the last stage is inverted and
fed back as input to the first stage. A pattern of bits equal in length to the shift register thus circulates
indefinitely. These counters are sometimes called "walking ring" counters, and find specialist
applications, including those similar to the decade counter, digital to analogue conversion, etc.
The apparent disadvantage of this counter is that the maximum available states are not fully utilized.
Only eight of the sixteen states are being used.
Decade counters
Decade counters are a kind of counter that counts in tens rather than having a binary representation.
Each output will go high in turn, starting over after ten outputs have occurred. This type of circuit finds
applications in multiplexers and demultiplexers, or wherever a scanning type of behaviour is useful.
Similar counters with different numbers of outputs are also common.
Up-Down Counters
It is a combination of up counter and down counter, counting in straight binary sequence. There is an updown selector. If this value is kept high, counter increments binary value and if the value is low, then
SCE
85
DEPT OF ECE
CS6201
counter starts decrementing the count. The Down counters are made by using the complemented output
to act as the clock for the next flip-flop in the case of Asynchronous counters. An Up counter is
constructed by linking the Q out of the J-K Flip flop and putting it into a Negative Edge Triggered Clock
input. A Down Counter is constructed by taking the Q output and putting it into a Positive Edge
Triggered input
Ring Counters
A ring counter is basically a circulating shift register in which the output of the most significant stage is
fed back to the input of the least significant stage. The following is a 4-bit ring counter constructed from
D flip-flops. The output of each stage is shifted into the next stage on the positive edge of a clock pulse.
If the CLEAR signal is high, all the flip -flops except the first one FF0 are reset to 0. FF0 is preset to 1
instead.
Since the count sequence has 4 distinct states, the counter can be considered as a mod-4 counter. Only 4
of the maximum 16 states are used, making ring counters very inefficient in terms of state usage. But the
major advantage of a ring counter over a binary counter is that it is self-decoding. No extra decoding
circuit is needed to determine what state the counter is in.
Applications of counters:
Watches
Clocks
Alarms
Web browser refresh
SCE
86
DEPT OF ECE
CS6201
3.7
SCE
87
DEPT OF ECE
CS6201
The time required to change the voltage level from 90% to 10% is known as fall time(tf).
12. Define skew and clock skew.
The phase shift between the rectangular clock waveforms is referred to as skew and the time
delay between the two clock pulses is called clock skew.
13. Define setup time.
The setup time is the minimum time required to maintain a constant voltage levels at the
excitation inputs of the flip-flop device prior to the triggering edge of the clock pulse in order for
the levels to be reliably clocked into the flip flop. It is denoted as setup.
14. Define hold time.
The hold time is the minimum time for which the voltage levels at the excitation inputs must
remain constant after the triggering edge of the clock pulse in order for the levels to be reliably
clocked into the flip flop. It is denoted as thold .
15. Define propagation delay.
A propagation delay is the time required to change the output after the application of the input.
16. Define registers.
A register is a group of flip-flops flip-flop can store one bit information. So an n-bit register has
a group of n flip-flops and is capable of storing any binary information/number containing n-bits.
17. Define shift registers.
The binary information in a register can be moved from stage to stage within the register or into
or out of the register upon application of clock pulses. This type of bit movement or shifting is
essential for certain arithmetic and logic operations used in microprocessors. This gives rise to
group of registers called shift registers.
18. What are the different types of shift type?
There are five types. They are,
Serial In Serial Out Shift Register
Serial In Parallel Out Shift Register
Parallel In Serial Out Shift Register
Parallel In Parallel Out Shift Register & Bidirectional Shift Register
19. Explain the flip-flop excitation tables for RS FF. RS flip-flop
In RS flip-flop there are four possible transitions from the present state to the next state.
They are
,0 0 transition: This can happen either when R=S=0 or when R=1 and S=0.
0 1 transition: This can happen only when S=1 and R=0.
1 0 transition: This can happen only when S=0 and R=1.
1 1 transition: This can happen either when S=1 and R=0 or S=0 and R=0.
SCE
88
DEPT OF ECE
CS6201
21. Give the comparison between combinational circuits and sequential circuits.
Combinational circuits
Memory unit is not required
Parallel adder is a combinational circuit.
Sequential circuits
Memory unity is required
Serial adder is a sequential circuit
27. The tpd for each flip-flop is 50 ns. Determine the maximum operating frequency for MOD 32 ripple counter
f max (ripple) = 5 x 50 ns = 4 MHZ
28. What are secondary variables?
Present state variables in asynchronous sequential circuits
29. What are excitation variables?
Next state variables in asynchronous sequential circuits
SCE
89
DEPT OF ECE
CS6201
PART B
1.
Design a counter with the following repeated binary sequence: 0,1, 2,3, 4, 5, 6. use JK Flip-flop.
2.
3.
The count has a repeated sequence of six states, with flip flops B and C repeating the binary
count 00, 01, 10 while flip flop A alternates between 0 and 1 every three counts. Design with JK flipflop.
4.
5.
Using D flip-flops, design a synchronous counter which counts in the sequence
000,001,010,011,100,101,110,111,000.
6.
7.
(i) Draw a 4-bit ripple counter with D flip-flops.
(ii) Write HDL code for the above circuit.
8.
Design a synchronous counter using JK flip-flops to count the following sequence:
1-3-15-5-8-2-0-12-6-9.
3.8
GLOSSARY TERMS
1.
Sequential circuit-In sequential circuits the output variables dependent not only on the present
input variables but they also depend up on the past history of these input variables.
2.
Counters- a Counter is a device which stores (and sometimes displays) the number of times a
particular event or process has occurred, often in relationship to a clock signal.
3.
State diagram- The state diagram is constructed using all the states of the sequential circuit in
question. It builds up the relationship between various states and also shows how inputs affect the
states.
4.
Flip-f1ops- The basic unit for storage is flip flop. A flip-flop maintains its output state either at
1 or 0 until directed by an input signal to change its state.
5.
Master-slave flip-flop -A master-slave flip-flop consists of two flip-flops where one circuit
serves as a master and the other as a slave.
6.
7.
Johnson counter- A Johnson counter is a special case of shift register, where the output from
the last stage is inverted and fed back as input to the first stage.
SCE
90
DEPT OF ECE
CS6201
8.
Register-A register is a group of flip-flops flip-flop can store one bit information.
9.
Shift registers- The binary information in a register can be moved from stage to stage within
the register or into or out of the register upon application of clock pulses.
10.
Universal shift register- If the register has both shifts and parallel-loads, it is referred as
universal shift register.
3.9
REFERENCES
1
Morris Mano M. and Michael D. Ciletti, Digital Design, IV Edition, Pearson Education, 2008.
2
A.P Godse & D.A Godse Digital Electronics, Technical publications, Pune, Revised third
edition, 2008.
3
Charles H. Roth, Fundamentals of Logic Design, 5th Edition, Thomson Learning, 2003.
SCE
91
DEPT OF ECE
CS6201
PRE-REQUISITE DISCUSSION
The communication of two units, with each unit having its own independent clock, must be done with
asynchronous circuits.
Do not use clock pulses. The change of internal state occurs when there is a change in the input
variable.
Their memory elements are either unclocked flip-flops or time-delay elements.
They often resemble combinational circuits with feedback.
Their synthesis is much more difficult than the synthesis of clocked synchronous sequential
circuits.
They are used when speed of operation is important.
4.1
ANALYSIS PROCEDURE
Ref: 1) A.P Godse & D.A Godse Digital Electronics, Technical publications, Pune, Revised third
edition, 2008. Pg.No:9.3
2) Morris Mano M. and Michael D. Ciletti, Digital Design, IV Edition, Pearson Education,
2008.Pg.No:417.
The analysis of asynchronous sequential circuits proceeds in much the same way as that of clocked
Synchronous sequential circuits. From a logic diagram, Boolean expressions are written and then
transferred into tabular form.
Transition Table
The analysis of the circuit starts by considering the excitation variables (Y1 and Y2) as outputs and the
secondary variables (y1 and y2) as inputs.
SCE
92
DEPT OF ECE
CS6201
=
=
+
+
In order to obtain the circuit described by a flow table, it is necessary to assign to each state a distinct
value.
This assignment converts the flow table into a transition table. This is shown below,
SCE
93
DEPT OF ECE
CS6201
Race Conditions
A race condition exists in an asynchronous circuit when two or more binary state variables change value
in response to a change in an input variable. When unequal delays are encountered, a race condition may
cause the state variable to change in an unpredictable manner.
If the final stable state that the circuit reaches does not depend on the order in which the state variables
change, the race is called a noncritical race. Examples of noncritical races are illustrated in the
transition tables below:
94
DEPT OF ECE
CS6201
SCE
95
DEPT OF ECE
CS6201
96
DEPT OF ECE
CS6201
Y = SR + Ry
Y = S + Ry when SR=0
Y = [S Ry ] = +
The behavior of the SR latch can be investigated from the transition table. The condition to be avoided is
that both S and R inputs must not be 1 simultaneously. This condition is avoided when SR = 0 (i.e.,
ANDing of S and R must always result in 0). When SR = 0 holds at all times, the excitation function
derived previously:
Y = SR + Ry
97
DEPT OF ECE
CS6201
Y = [S Ry ] = +
SCE
98
DEPT OF ECE
CS6201
ANALYSIS EXAMPLE
Consider the following circuit:
=0
=
=
=0
=0
The next step is to derive the transition table of the circuit. The excitation functions are derived from
the relation Y = S + Ry as:
Y =S +R y =x y + x +x y =x y +x y +x y
Y =S +R y =x x + x +y y =x x +x y +y y
99
DEPT OF ECE
CS6201
Investigation of the transition table reveals that the circuit is stable. There is a critical race condition
when the circuit is initially in total state y1y2x1x2 = 1101 and x2 changes from 1 to 0. If Y1 changes to
0 before Y2, the circuit goes to total state 0100 instead of 0000.
SR Latch Excitation Table
Excitation table lists the required inputs S and R for each of the possible transitions from the secondary
variable y to the excitation variable Y.
Useful for obtaining the Boolean functions for S and R and the circuits logic diagram from a given
transition table.
Implementation Example
Consider the following transition table:
SCE
100
DEPT OF ECE
CS6201
From the information given in the transition table and the SR latch excitation table, we can obtain maps
for the S and R inputs of the latch:
The logic diagram consists of an SR latch and gates required to implement the S and R Boolean
functions. The circuit when a NOR SR latch is used is as shown below:
With a NAND SR latch the complemented values for S and R must be used.
4.2
DESIGN PROCEDURE
Ref: 1) A.P Godse & D.A Godse Digital Electronics, Technical publications, Pune, Revised third
edition, 2008. Pg.No:9.7
2) Morris Mano M. and Michael D. Ciletti, Digital Design, IV Edition, Pearson Education, 2008.
Pg.No:433.
There are a number of steps that must be carried out in order to minimize the circuit complexity and to
produce a stable circuit without critical races. Briefly, the design steps are as follows:
Obtain a primitive flow table from the given specification.
SCE
101
DEPT OF ECE
CS6201
Reduce the flow table by merging rows in the primitive flow table.
Assign binary states variables to each row of the reduced flow table to obtain the transition table.
Assign output values to the dashes associated with the unstable states to obtain the output maps.
Simplify the Boolean functions of the excitation and output variables and draw the logic
diagram.
Each row in the above table specifies a total state; the resulting primitive table for the gated latch is
shown below:
SCE
102
DEPT OF ECE
CS6201
First, we fill in one square in each row belonging to the stable state in that row. Next recalling that both
inputs are not allowed to change at the same time, we enter dash marks in each row that differs in two
or more variables from the input variables associated with the stable state. Next we find values for two
more squares in each row. The comments listed in the previous table may help in deriving the necessary
information. A dash indicates dont care conditions.
Step 2: Reduction of the Primitive Flow Table
The primitive flow table can be reduced to a smaller number of rows if two or more stable states are
placed in the same row of the flow table. The simplified merging rules are as follows:
Two or more rows in the primitive flow table can be merged into one if there are non- conflicting
states and outputs in each of the columns.
Whenever, one state symbol and dont care entries are encountered in the same column, the state
is listed in the merged row.
If the state is circled in one of the rows, it is also circled in the merged row.
The output state is included with each stable state in the merged row.
Now apply these rules to the primitive flow table shown previously. To see how this is done the
primitive flow table is separated into two parts of three rows each:
103
DEPT OF ECE
CS6201
races. There can be no critical races in a two-row flow table; therefore, we can finish the design of the
gated latch. Assigning 0 to state a and 1 to state b in the reduced flow table, we obtain the transition
table. The transition table is, in effect, a map for the excitation variable Y. The simplified Boolean
function for Y is then obtained from the map as
y
Y = DG + G
There are two dont-care outputs in the final reduced flow table. Alternatively, if we replace the dontcare by 1 when y = 1 and DG= 01, the map reduces to Q = Y. If we assign the other possible values to
the don't -care outputs. We can make output Q equal to y.
SCE
104
DEPT OF ECE
CS6201
Ref: Morris Mano M. and Michael D. Ciletti, Digital Design, IV Edition, Pearson Education, 2008.
Pg.No:439.
SCE
105
DEPT OF ECE
CS6201
The procedure for reducing the number of internal states in an asynchronous sequential circuit
resembles the procedure that is used for synchronous circuits.
Implication Table and Implied State
The state-reduction procedure for completely specified state tables is based on an algorithm that
combines two slates in a slate table into one as long as they can be shown to be equivalent. Two states
are equivalent if, for each possible input, they give exactly the same output and go to the same next
states or to equivalent next states.
Consider for example the state table shown in above table. The present states a and b have the same
output for the same input. Their next states are c and d for x = 0 and b and a for x = 1. If we can show
that the pair of states (c, d) are equivalent, then the pair of states (a , b) will also be equivalent, because
they will have the same or equivalent next states. When this relationship exists, we say that (a. b) imply
(c, d) in the sense that if a and b are equivalent then r and d have to be equivalent. Similarly, from the
last two rows of above table, we find that the pair of stales (c, d) implies the pair of states (a, b). The
characteristic of equivalent states is that if (a, b) imply (c, d) and (c, d) imply (a, b), then both pairs of
states are equivalent that is, a and b are equivalent, and so are c and d. As a consequence, the four rows
of table can be reduced to two rows by combining a and b into one state and c and d into a second state.
SCE
106
DEPT OF ECE
CS6201
The implication table is shown in Fig. On the left side along the vertical are listed all the states
defined in the state table except the first and across the bottom horizontally are listed all the states
except the last. The result is a display of all possible combinations of two stares with a square placed in
the intersection of a row and a column where the two states can be tested for equivalence. Two states
having different outputs for the same input are not equivalent.
Incompletely specified states can be combined to reduce the number of state in the flow table. Such
stares cannot be called equivalent because the formal definition of equivalence requires that all outputs
and next states be specified for all inputs. Instead, two incompletely specified states that can be
combined are said to be Compatible. The process that must be applied in order to find a suitable group
of compatibles for the purpose of merging a flow table can be divided into three steps:
1.
SCE
DEPT OF ECE
CS6201
2.
3.
Compatible Pairs-The entries in each square of primitive flow table represent the next state
and output The dashes represent the unspecified states or outputs. The implication table is used to fmd
compatible states just as it is used to find equivalent stales in the completely specified case. The only
difference is that, when comparing rows, we are at liberty to adjust the dashes to fit any desired
condition.
Maximal Compatibles
The maximal compatible is a group of compatibles that contains all the possible combinations of
compatible states. The maximal compatible can be obtained from a merger diagram. The merger
diagram is a graph in which each state is represented by a dot placed along the circumference of a circle.
Lines are drawn between any two corresponding dots that form a compatible pair. All possible
compatibles can be obtained from the merger diagram by observing the geometrical patterns in which
states are connected to each other. An isolated dot represents a state that is not compatible with any
other state. A line represents a compatible pair. A triangle constitutes a compatible with three states.
SCE
108
DEPT OF ECE
CS6201
Closed-Covering Condition
, ,
The condition that must be satisfied for merging rows is that the set of chosen compatibles must cover
all the states and must be closed. The set will cover all the states if it includes all the states of the
original state table. The closure condition is satisfied if there are no implied states or if the implied states
are included within the set. A closed set of compatibles that covers all the states is called a closed
covering.
Example:
SCE
109
DEPT OF ECE
CS6201
4.4
Ref: 1) A.P Godse & D.A Godse Digital Electronics, Technical publications, Pune, Revised third
edition, 2008. Pg.No:9.10
2) Morris Mano M. and Michael D. Ciletti, Digital Design, IV Edition, Pearson Education, 2008.
Pg.No:446.
Once a reduced flow table has been derived for an asynchronous sequential circuit, the next step in the
design is to assign binary variables to each stable state. This assignment results in the transformation of
the flow table into its equivalent transition table. The primary objective in choosing a proper binary state
assignment is the prevention of critical races. Critical races can be avoided by making a binary state
assignment in such a way that only one variable changes at any given time when a state transition occurs
in the flow table.
Three-Row Flow-Table Example
110
DEPT OF ECE
CS6201
A race-free assignment can be obtained if we add an extra row to the flow table. The use of a fourth row
does not increase the number of binary state variables, but it allows the formation of cycles between two
stable states.
The transition table corresponding to the flow table with the indicated binary state assignment is shown
in Fig. The two dashes in row d represent unspecified states that can be considered don't-care conditions.
However, care must be taken not to assign 10 to these squares, in order to avoid the possibility of an
unwanted stable state being established in the fourth row.
A flow table with four rows requires a minimum of two state variables. Although a race-free assignment
is sometimes possible with only two binary state variables, in many cases the requirement of extra rows
to avoid critical races will dictate the use of three binary state variables
SCE
111
DEPT OF ECE
CS6201
Multiple-Row Method
The method for making race-free stale assignments by adding extra rows in the flow table is referred to
as the shared-row method. A second method called the multiple-row method is not as efficient, but is
easier to apply. In multiple- row assignment each state in the original row table is replaced by two or
more combinations of state variables.
SCE
112
DEPT OF ECE
CS6201
HAZARDS
Ref: 1) A.P Godse & D.A Godse Digital Electronics, Technical publications, Pune, Revised third
edition, 2008. Pg.No:10.1
2) Morris Mano M. and Michael D. Ciletti, Digital Design, IV Edition, Pearson Education, 2008.
Pg.No:452.
In designing asynchronous sequential circuits, care must be taken to conform to certain restrictions and
precautions to ensure that the circuits operate properly. The circuit must be operated in fundamental
mode with only one input changing at any time and must be free of critical races. In addition, there is
one more phenomenon called a hazard that may cause the circuit to malfunction.
Hazards are unwanted switching transients that may appear at the output of a circuit because different
paths exhibit different propagation delays. Hazards occur in combinational circuits, where they may
cause a temporary false output value. When they occur in asynchronous sequential circuits hazards may
result in a transition to a wrong stable state.
Hazards In Combinational Circuits
SCE
113
DEPT OF ECE
CS6201
A hazard is a condition in which a change in a single variable produces a momentary change in output
when no change in output should occur.
This type of implementation may cause the output to go to 0 when it should remain a 1. If however, the
circuit is implemented instead in product-of-sums form namely,
=
then the output may momentarily go to 1 when it should remain 0. The first case is referred to as static
1-hazard and the second case as static 0-hazard.
A third type of hazard, known as dynamic hazard, causes the output to change three or more times
when it should change from 1 to 0 or from 0 to 1.
114
DEPT OF ECE
CS6201
In normal combinational-circuit design associated with synchronous sequential circuits, hazards are of
no concern, since momentary erroneous signals are not generally troublesome. However, if a momentary
incorrect signal is fed back in an asynchronous sequential circuit, it may cause the circuit to go to the
wrong stable state.
SCE
115
DEPT OF ECE
CS6201
Essential Hazards
Another type of hazard that may occur in asynchronous sequential circuits is called an essential hazard.
This type of hazard is caused by unequal delays along two or more paths that originate from the same
input. An excessive delay through an inverter circuit in comparison to the delay associated with the
feedback path may cause such a hazard.
Essential hazards cannot be corrected by adding redundant gates as in static hazards. The problem that
they impose can be corrected by adjusting the amount of delay in the affected path. To avoid essential
hazards, each feedback loop must be handled with individual care to ensure that the delay in the
feedback path is long enough compare d with delays of other signals that originate from the input
terminals.
SCE
116
DEPT OF ECE
CS6201
4.6
1.
Define Asynchronous sequential circuit?
In asynchronous sequential circuits change in input signals can affect memory element at any instant of
time.
2.
Memory elements are either unlocked flip flops or time delay elements.
3.
What is race around condition?
In the JK latch, the output is feedback to the input, and therefore changes in the output results change in
the input. Due to this in the positive half of the clock pulse if J and K are both high then output toggles
continuously. This condition is known as race around condition.
4.
What is fundamental mode sequential circuit?
Input variables changes if the circuit is stable -inputs are levels, not pulses -only one input can change
at a given time
5.
What are pulse mode circuits?
Inputs are pulses -widths of pulses are long for circuit to respond to the input -pulse width must not be
so long that it is still present after the new state is reached
6.
What are the significance of state assignment?
In synchronous circuits-state assignments are made with the objective of circuit reduction
Asynchronous circuits-its objective is to avoid critical races.
7.
What are the different techniques used in state assignment?
Shared row state assignment -one hot state assignment
8.
What are the steps for the design of asynchronous sequential circuit?
Construction of primitive flow table
Reduction of flow table -state assignment is made
Realization of primitive flow table
9.
What is hazard?
Unwanted switching transients
10.
What is static 1 hazard?
Output goes momentarily 0 when it should remain at 1
11.
What is static 0 hazard?
Output goes momentarily 1 when it should remain at 0
SCE
117
DEPT OF ECE
CS6201
12.
What is dynamic hazard?
Output changes 3 or more times when it changes from 1 to 0 or 0 to 1
13.
What is the cause for essential hazards?
Unequal delays along 2 or more path from same input
14.
What is flow table?
State table of an synchronous sequential network
15.
What is primitive flow chart?
One stable state per row
16.
What is combinational circuit?
Output depends on the given input. It has no storage element.
17.
Define merger graph.
The merger graph is defined as follows. It contains the same number of vertices as the state table
contains states. A line drawn between the two state vertices indicates each compatible state pair. It two
states are incompatible no connecting line is drawn.
18.
Define closed covering
A Set of compatibles is said to be closed if, for every compatible contained in the set, all its implied
compatibles are also contained in the set. A closed set of compatibles, which contains all the states of
M, is called a closed covering.
19.
Define state table.
For the design of sequential counters we have to relate present states and next states. The table, which
represents the relationship between present states and next states, is called state table.
20.
Define total state
The combination of level signals that appear at the inputs and the outputs of the delays define what is
called the total state of the circuit.
21.
What are the steps for the design of asynchronous sequential circuit?
1. Construction of a primitive flow table from the problem statement.
2. Primitive flow table is reduced by eliminating redundant states using the state reduction
3. State assignment is made
4. The primitive flow table is realized using appropriate logic elements.
22.
Define primitive flow table
It is defined as a flow table which has exactly one stable state for each row in the table. The design
process begins with the construction of primitive flow table.
23.
What are the types of asynchronous circuits?
1. Fundamental mode circuits
2. Pulse mode circuits
SCE
118
DEPT OF ECE
CS6201
24.
Give the comparison between state Assignment Synchronous circuit and state assignment
asynchronous circuit.
In synchronous circuit, the state assignments are made with the objective of circuit reduction. In
asynchronous circuits, the objective of state assignment is to avoid critical races.
25.
What are races?
When 2 or more binary state variables change their value in response to a change in an input variable,
race condition occurs in an asynchronous sequential circuit. In case of unequal delays, a race condition
may cause the state variables to change in an unpredictable manner.
26.
Define non critical race.
If the final stable state that the circuit reaches does not depend on the order in which the state variable
changes, the race condition is not harmful and it is called a non critical race.
27.
Define critical race?
If the final stable state depends on the order in which the state variable changes, the race condition is
harmful and it is called a critical race.
28.
What is a cycle?
A cycle occurs when an asynchronous circuit makes a transition through a series of unstable states. If a
cycle does not contain a stable state, the circuit will go from one unstable to stable to another, until the
inputs are changed.
29.
Define secondary variables
The delay elements provide a short term memory for the sequential circuit. The present state and next
state variables in asynchronous sequential circuits are called secondary variables.
30.
Define flow table in asynchronous sequential circuit.In asynchronous sequential circuit state
table is known as flow table because of the behavior of the asynchronous sequential circuit. The stage
changes occur in independent of a clock, based on the logic propagation delay, and cause the states to
.flow. from one to another.
31.
A pulse mode asynchronous machine has two inputs. If produces an output whenever two
consecutive pulses occur on one input line only. The output remains at 1 until a pulse has
occurred on the other input line. Write down the state table for the machine.
SCE
119
DEPT OF ECE
CS6201
32.
Write short note on shared row state assignment.
Races can be avoided by making a proper binary assignment to the state variables. Here, the state
variables are assigned with binary numbers in such a way that only one state variable can change at any
one state variable can change at any one time when a state transition occurs. To accomplish this, it is
necessary that states between which transitions occur be given adjacent assignments. Two binary are
said to be adjacent if they differ in only one variable.
33.
Write short note on one hot state assignment.
The one hot state assignment is another method for finding a race free state assignment. In this method,
only one variable is active or hot for each row in the original flow table, ie, it requires one state variable
for each row of the flow table. Additional row are introduced to provide single variable changes
between internal state transitions.
PART B
1. Design an Asynchronous sequential circuit using SR latch with two inputs A and B and one output y.
B is the control input which, when equal to 1, transfers the input A to output y. when B is 0, the output
does not change, for any change in input.
2. Give hazard free relation for the following Boolean function.
F (A, B, C, D) =_m (0, 2, 6, 7, 8, 10, 12)
3. Explain about Hazards?
4. Explain about Races?
5. Design T Flip flop from Asynchronous Sequential circuit?
6. Explain the types of hazards in digital circuits also implement the switching function
, , , , , , ,
by a static hazard free 2-level AND-OR gate network.
7.
4.7
1.
Fundamental mode-A transition from one stable state to another occurs only in response to a
change in the input state.
2.
Pulse mode-Inputs are pulses -widths of pulses are long for circuit to respond to the input -pulse
width must not be so long that it is still present after the new state is reached
3.
State assignment- In synchronous circuits-state assignments are made with the objective of circuit
reduction Asynchronous circuits-its objective is to avoid critical races.
4.
Primitive flow table-It is defined as a flow table which has exactly one stable state for each row
in the table. The design process begins with the construction of primitive flow table.
SCE
120
DEPT OF ECE
CS6201
5.
6.
7.
Critical race- If the final stable state that the circuit reaches does not depend on the order in which
the state variable changes, the race condition are not harmful and it is called a non critical race.
8.
Non critical race-If the final stable state that the circuit reaches does not depend on the order in
which the state variable changes, the race condition is not harmful and it is called a non critical race
9.
Cycles- A cycle occurs when an asynchronous circuit makes a transition through a series of
unstable states. If a cycle does not contain a stable state, the circuit will go from one unstable to stable
to another, until the inputs are changed.
10.
Merger graph-The merger graph is defined as follows. It contains the same number of vertices as
the state table contains states. A line drawn between the two state vertices indicates each compatible state
pair. It two states are incompatible no connecting line is drawn.
4.8
REFERENCES
1.
Morris Mano M. and Michael D. Ciletti, Digital Design, IV Edition, Pearson Education, 2008.
2.
John F. Wakerly, Digital Design Principles and Practices, Fourth Edition, Pearson
Education,2007.
SCE
121
DEPT OF ECE
CS6201
PRE-REQUISITE DISCUSSION
A memory unit is a device to which binary information is transferred for storage and from which
information is retrieved when needed for processing. When data processing takes place, information
from memory is transferred to selected registers in the processing unit. A memory unit is a collection of
cells capable of storing a large quantity of binary information.
Communication between memory and its environment is achieved through data input and output lines,
address selection lines, and control lines that specify the direction of transfer.
5.1
There are two types of memories that are used in digital systems: random-access memory (RAM) and
read-only memory (ROM) The process of storing new information into memory is referred to as a
memory write operation. The process of transferring the stored information out of memory is
referred to as a memory read operation. RAM can perform both write and read operations. ROM can
perform only the read operation. This means that suitable binary information is already stored inside
memory and can be retrieved or read at any time. However, that information cannot be altered by
writing.
ROM is one example of a PLD. Other such units are the programmable logic array (PLA) Programmable array logic (PAL), and the field -programmable gate array (FPGA). A PLD is an
integrated circuit with internal logic gates connected through electronic paths that behave similarly to
fuses.
SCE
122
DEPT OF ECE
CS6201
A typical PLD may have hundreds to millions of gates interconnected through hundreds to thousands of
internal paths. Instead of having multiple input lines into the gate, we draw a single line entering the
gate. The input lines are drawn perpendicular to this single line and are connected to the gate through
internal fuses as shown in the figure. In a similar fashion, we can draw the array logic for an AND gate.
READ-ONLY MEMORY
Ref: 1) A.P Godse & D.A Godse Digital Electronics, Technical publications, Pune, Revised third
edition, 2008. Pg.No:10.1
2) Morris Mano M. and Michael D. Ciletti, Digital Design, IV Edition, Pearson Education, 2008.
Pg.No:452.
A ROM is essentially a memory device in which permanent binary information is stored.
SCE
123
DEPT OF ECE
CS6201
SCE
124
DEPT OF ECE
CS6201
For example, programming the ROM according to the truth table given by table. Every 0 listed in the
truth table specifies the absence of a connection and every 1 listed specifies a path that is obtained by a
connection.
The first is called mask programming and is done by the semiconductor company during the
last fabrication process of the unit. This procedure is costly because the vendor charges the customer a
special fee for custom masking the particular ROM.
For small quantities, it is more economical to use a second type of ROM called programmable
read-only memory- PROM. The fuses in the PROM are blown by the application of a high-voltage
pulse to the device through a special pin. A blown fuse defines a binary 0 state and an intact fuse gives
a binary 1 state. The hardware procedure for programming ROMs or PROMs is irreversible and once
programmed, the fixed pattern is permanent and cannot be altered.
A third type of R OM is the erasable PROM or EPROM, which can be restructured to the
initial state even though it has been programmed previously. When the EPROM is placed under a
special ultraviolet light for a given length of time. the shortwave radiation discharges the intern al
floating gates that serve as the programmed connections. After erasure, the EPROM returns to its initial
state and can be reprogrammed to a new set of values.
The fourth type of ROM is the electrically erasable PROM (EEPROM or E2PROM). This
device is like the EPROM except that the previously programmed connections can be erased with an
SCE
125
DEPT OF ECE
CS6201
electrical signal instead of ultraviolet light. The advantage is that the device can be erased without
removing it from its socket.
Flash memory devices are similar to EEPROMs, but have additional built-in circuitry to
selectively program and erase the device in-circuit, without the need for a special programmer. They
have widespread application in modern technology in cell phones, digital cameras, set-top boxes,
digital TV, telecommunications, non volatile data storage and microcontrollers. Their low consumption
of power makes them an attractive storage medium for laptop and notebook computers.
Combinational PLDs
The PROM is a combinational programmable logic device (PLD)-an integrated circuit with
programmable gates divided into an AND array and an OR array to provide an AND-OR sum ofproduct implementation.
There are three major types of combinational PLDs, differing in the placement of the programmable
connections in the AND-OR array.
The PROM has a fixed AND array constructed as a decoder and a programmable OR array. The
programmable OR gates implement the Boolean functions in sum-of-mintenns form.
The PAL has a programmable AND array and a fixed OR array. The AND gates are programmed to
provide the product terms for the Boolean functions, which are logically summed in each OR gate.
SCE
126
DEPT OF ECE
CS6201
The most flexible PLD is the PLA, in which both the AND and OR arrays can be programmed. The
product terms in the AND array may be shared by any OR gate to provide the required sum-of-products
implementation.
5.3
Ref: 1) A.P Godse & D.A Godse Digital Electronics, Technical publications, Pune, Revised third
edition, 2008. Pg.No:11.2
2) Morris Mano M. and Michael D. Ciletti, Digital Design, IV Edition, Pearson Education,
2008.Pg.No:285.
A memory unit is a collection of storage cells together with associated circuits needed to transfer
information into and out of a device. The time it takes to transfer information to or from any desired
random location is always the same-hence the name random access memory, abbreviated as RAM.
A memory unit stores binary information in groups of bits called words. A word in memory is an entity
of bits that move in and out of storage as a unit. A memory word is a group of 1 's and 0's and may
represent a number, an instruction , one or more alphanumeric characters or any other binary-coded
information. A group of 8 bits is called a byte. Most computer memories use words that are multiples of
8 bits in length.
Each word in memory is assigned an identification number called an address starting from 0 upto 2k-1.
where k is the number of address lines. Consider for example, a memory unit with a capacity of 1K
words of 16 bits each. Since 1K=1024 = 210 and 16 bits constitute two bytes, we can say that the
memory can accommodate 2048 = 2K bytes.
Read and write operations- The two operations that RAM can perform are the write and read
operations. The steps that must be taken for the purpose of transferring a new word to be stored into
memory are as follows:
SCE
127
DEPT OF ECE
CS6201
Apply the binary address of the desired word to the address lines.
Apply the data bits that must be stored in memory to the data input lines.
Apply the binary address of the desired word to the address lines.
Activate the read input.
The memory enable (sometimes called the chip select) is used to enable the particular memory chip in a
multichip implementation of a large memory. When the memory enable is inactive, the memory chip is
not selected and no operation is performed. When the memory enable input is active, the read/write
input determines the operation to be performed.
Timing Waveforms
The operation of the memory unit is controlled by an external device such as a central processing unit
(CPU). The CPU is usually synchronized by its own clock .The memory however doesnt employ an
internal clock. Instead its read and write operations are specified by control inputs.
The access time of memory is the time required to select a word and read it. The cycle time of memory
is the time required to complete a write operation.
128
DEPT OF ECE
CS6201
The read cycle shown in figure has an address for the memory provided by the CPU. The memoryenable and read/write signals must be in their high level for a read operation. The memory places the
data of the word selected by the address into the output data lines within a 50-ns interval (or less) from
the time that the memory enable is activated. The CPU can transfer the data into one of its internal
registers during the negative transition of T3.The next T1 cycle is available for another memory request.
SCE
129
DEPT OF ECE
CS6201
ROM is another nonvolatile memory. A nonvolatile memory enables digital computers to store
programs
that will be needed again after the computer is turned on. Programs and data that cannot be altered are
stored in ROM, while other large programs are maintained on magnetic disk.
5.4
MEMORY DECODING
Ref: 1) A.P Godse & D.A Godse Digital Electronics, Technical publications, Pune, Revised third
edition, 2008. Pg.No:11.13
2) Morris Mano M. and Michael D. Ciletti, Digital Design, IV Edition, Pearson Education,
2008.Pg.No:291.
In addition to requiring storage components in a memory unit, there is a need for decoding circuits to
select the memory word specified by the input address.
Internal Construction
The internal construction of a R AM of m words and n bits per word consists of m n binary storage
cells and associated decoding circuits for selecting individual words. The binary storage cell is the basic
building block of a memory unit.
SCE
130
DEPT OF ECE
CS6201
SCE
131
DEPT OF ECE
CS6201
Coincident Decoding
A decoder with k inputs and 2k outputs requires 2k AND gates with k inputs per gate. The total number
of gates and the number of inputs per gate can be reduced by employing two decoders in a two dimensional selection scheme.
SCE
132
DEPT OF ECE
CS6201
The basic idea in two -dimensional decoding is to arrange the memory cells in an array, (i.e.) two input decoders are used instead of one k-input decoder. One decoder performs the row selection and the
other the column selection in a two-dimensional matrix configuration.
For example, instead of using a single 10 x 1,024 decoder, we use two 5 x 32 decoders. With the single
decoder, we would need 1,024 AND gates with 10 inputs in each. The five most significant bits of the
address go to input X and the five least significant bits go to input Y. Each word within the memory
array is selected by the coincidence of one X line and one Y line. Thus each word in memory is
selected by the coincidence between 1 of 32 rows and 1 of 32 columns, for a total of 1,024 words.
Address Multiplexing
Because of large capacity, the address decoding of DRAM is arranged in a two dimensional array and
larger memories often have multiple arrays. To reduce the number of pins in the IC package, designers
utilize address multiplexing whereby one set of address input pins accommodates the address
components.
In a two-dimensional array, the address is applied in two parts at different times, with the row address
first and the column address second. Since the same set of pins is used for both parts of the address, the
size of the package is decreased significantly.
133
DEPT OF ECE
CS6201
The memory consists of a two-dimensional array of cells arranged into 256 rows by 256 columns, for a
total of 28 x 28 = 216 = 64K words. There is a single data input line; a single data output line, and a
read/write control as well as an eight-bit address input and two address strobes, the latter included forenabling the row and column address into their respective registers. The row address strobe (RAS)
enables the eight-bit row register and the column address strobe (CAS) enables the eight-bit column
register. The bar on top of the name of the strobe symbol indicates that the registers are enabled on the
zero level of the signal.
5.5
Ref: 1) A.P Godse & D.A Godse Digital Electronics, Technical publications, Pune, Revised third
edition, 2008. Pg.No:1-17
2) Morris Mano M. and Michael D. Ciletti, Digital Design, IV Edition, Pearson Education,
2008.Pg.No:296.
The reliability of a memory unit may be improved by employing error-detecting and error-correcting
codes. The most common error detection scheme is the parity bit. A parity bit is generated and stored
along with the data word in memory. The parity of the word is checked after reading it from memory.
The data word is accepted if the parity of the bits read out is correct. If the parity checked results in an
inversion, an error is detected, but it cannot be corrected.
An error-correcting code generates multiple parity check bits that are stored with the data word in
memory. Each check bit is parity over a group of bits in the data word. When the word is read back
from memory, the associated parity bits are also read from memory and compared with a new set of
check bits generated from the data that have been read. If the check bits are correct, no error has
occurred. If the check bits do not match the stored parity, they generate a unique pattern called a
syndrome, which can be used to identify the bit that is in error. A single error occurs when a bit
changes in value from 1 to 0 or from 0 to 1 during the write or read operation. If the specific bit in error
is identified, then the error can be corrected by complementing the erroneous bit.
Hamming Code
One of the most common error-correcting codes used in RAMs was devised by R. W. Hamming. In the
Hamming code, k. parity bits are added to an n-bit data word, forming a new word of n + k bits. The bit
positions are numbered in sequence from 1 to n + k, these positions numbered as a power of 2 are
reserved for the parity bits. The remaining bits are the data bits.
Consider, for example the 8-bil data word 11000100. We include 4 parity bits with the 8-bit word and
arrange the 12 bits as follows:
The 4 parity bits P1, P2, P4 and P8 are in positions 1, 2, 4 and 8 respectively. The 8 bits of the data
word are in the remaining positions. Each parity bit is calculated as follows:
SCE
134
DEPT OF ECE
CS6201
The 8-bit data word is stored in memory together with the 4 parity bits as a 12-bit composite word.
Substituting the 4 P bits in their proper positions, we obtain the 12-bit composite word stored in
memory.
When the 12 bits are read from memory, they are checked again for errors. The parity is checked over
the same combination of bits, including the parity bit. The 4 check bits are evaluated as follows:
A 0 check bit designates even parity over the checked bits and a 1 designates odd parity. Since the bits
were stored with even parity, the result, C = C8C4C2C1 = 0000, indicates that no error has occurred.
However, if C0, then the 4 -bit binary number formed by the check bits gives the position of the
erroneous bit. For example, consider the following three cases:
The Hamming code can detect and correct only a single error. By adding another parity bit to the coded
word, the Hamming code can be used to correct a single error and detect double errors.
SCE
135
DEPT OF ECE
CS6201
5.6
Ref: 1) A.P Godse & D.A Godse Digital Electronics, Technical publications, Pune, Revised third
edition, 2008. Pg.No:11.20
2) Morris Mano M. and Michael D. Ciletti, Digital Design, IV Edition, Pearson Education,
2008.Pg.No:305.
There are a wide variety of ICs that can have their logic function programmed into them after they
are manufactured. Most of these devices use technology that also allows the function to be
reprogrammed, which means that if you find a bug in your design.
Programmable logic arrays (PLAs) were the first programmable logic devices. PLAs contained a twolevel structure of AND and OR gates with user-programmable connections. Using this structure, a
designer could accommodate any logic function up to a certain level of complexity using the wellknown theory of logic synthesis and minimization
PLA structure was enhanced and PLA costs were reduced with the introduction of programmable array
logic (PAL) devices. Today, such devices are generically called programmable logic devices (PLDs),
and are the MSI of the programmable logic industry.
The PLA is similar in concept to the PROM, except that the PLA does not provide full decoding of the
variables and does not generate all the minterms. The decoder is replaced by an array of AND gates that
can be programmed to generate any product term of the input variables. The product terms are then
connected to OR gates to provide the sum of products for the required Boolean functions. The output is
inverted when the XOR input is connected to 1 (since x
1 = x'). The output does not change when
the XOR input is connected to 0 (since x
0 = x).
= +
+
=
+
SCE
136
DEPT OF ECE
CS6201
Fig: PLA with three inputs, four product terms and two outputs
The fuse map of a PLA can be specified in a tabular form. The first section lists the product terms
numerically. The second section specifies the required paths between inputs and AND gates. The third
section specifies the paths between the AND and OR gates. For each output variable, we may have a
T'(for true) or C (for complement) for programming the XOR gate.
For each product term, the inputs are marked with 1, 0, or - (dash). If a variable in the product term
appears in the form in which it is true, the corresponding input variable is marked with a 1. If it appears
complemented, the corresponding input variable is marked with a 0. If the variable is absent from the
product term, it is marked with a dash.
SCE
137
DEPT OF ECE
CS6201
Simplifying the four functions to a minimum number of terms results in the following Boolean
functions:
Note that the function for z has four product terms. The logical sum of two of these terms is equal to w.
By using w, it is possible to reduce the number of terms for z from four to three.
SCE
138
DEPT OF ECE
CS6201
5.7
Ref: 1) A.P Godse & D.A Godse Digital Electronics, Technical publications, Pune, Revised third
edition, 2008. Pg.No:1-17
2) Morris Mano M. and Michael D. Ciletti, Digital Design, IV Edition, Pearson Education, 2008.
Pg.No:311.
Digital systems are designed with flip-flops and gates. Since the combinational PLD consists of only
gates, it is necessary to include external flip-flops when they are used in the design. Sequential
programmable devices include both gates and flip-flops.
SCE
139
DEPT OF ECE
CS6201
Fig: PAL with four inputs, four outputs and three AND-OR structure
The ever-increasing capacity of integrated circuits created an opportunity for IC manufacturers to
design larger PLDs for larger digital-design applications. Instead, IC manufacturers devised complex
PLD (CPLD) architectures to achieve the required scale. A typical CPLD is merely a collection of
multiple PLDs and an interconnection structure, all on the same chip. In addition to the individual
PLDs, the on-chip interconnection structure is also programmable, providing a rich variety of design
possibilities. CPLDs can be scaled to larger sizes by increasing the number of individual PLDs and the
richness of the interconnection structure on the CPLD chip.
SCE
140
DEPT OF ECE
CS6201
At about the same time that CPLDs were being invented, other IC manufacturers took a different
approach to scaling the size of programmable logic chips. Compared to a CPLD, a field-programmable
gate arrays (FPGA) contains a much larger number of smaller individual logic blocks, and provides a
large, distributed interconnection structure that dominates the entire chip.
Ref: 1) A.P Godse & D.A Godse Digital Electronics, Technical publications, Pune, Revised third
edition, 2008. Pg.No:1-17
2) Morris Mano M. and Michael D. Ciletti, Digital Design, IV Edition, Pearson Education, 2008.
Pg.No:1-8.
3) John F. Wakerly, Digital Design Principles and Practices, Fourth Edition, Pearson Education,2007.
Pg.No:35-44.
Perhaps the most interesting developments in IC technology for the average digital designer are not the
ever-increasing chip sizes, but the ever-increasing opportunities to design your own chip. Chips
designed for a particular, limited product or applications are called semicustom ICs or applicationspecific ICs (ASICs). ASICs generally reduce the total component and manufacturing cost of a product
SCE
141
DEPT OF ECE
CS6201
by reducing chip count, physical size, and power consumption, and they often provide higher
performance.
The nonrecurring engineering (NRE) cost for designing an ASIC can exceed the cost of a discrete
design by $5,000 to $250,000 or more.
The NRE cost to design a custom LSI chipa chip whose functions, internal architecture, and detailed
transistor-level design is tailored for a specific customeris very high, $250,000 or more. Thus, full
custom LSI design is done only for chips that have general commercial application or that will enjoy
very
high sales volume in a specific application (e.g., a digital watch chip, a network interface, or a businterface circuit for a PC).
To reduce NRE charges, IC manufacturers have developed libraries of standard cells including
commonly used MSI functions such as decoders, registers, and counters, and commonly used LSI
functions such as memories, programmable logic arrays, and microprocessors.
In a standard-cell design, the logic designer interconnects functions in much the same way as in a
multichip MSI/LSI design. Custom cells are created only if absolutely necessary. All of the cells are
then laid out on the chip, optimizing the layout to reduce propagation delays and minimize the size of
the chip.
A gate array is an IC whose internal structure is an array of gates whose interconnections are initially
unspecified. The logic designer specifies the gate types and interconnections. Even though the chip
design is ultimately specified at this very low level, the designer typically works with macrocells, the
same high-level functions used in multichip MSI/LSI and standard-cell designs; software expands the
high-level design into a low-level one.
The main difference between standard-cell and gate-array design is that the macrocells and the chip
layout of a gate array are not as highly optimized as those in a standard-cell design, so the chip may be
25% or more larger, and therefore may cost more.
SCE
142
DEPT OF ECE
CS6201
5.9
SCE
143
DEPT OF ECE
CS6201
EEPROM allows selective erasing at the register level rather than erasing all the information since the
information can be changed by using electrical signals.
9. What is RAM?
Random Access Memory-Read and write operations can be carried out.
10. What is programmable logic array? How it differs from ROM?
In some cases the number of dont care conditions is excessive, it is more economical to use a second
type of LSI component called a PLA. A PLA is similar to a ROM in concept; however it does not
provide full decoding of the variables and does not generates all the minterms as in the ROM.
11. What is mask - programmable?
With a mask programmable PLA, the user must submit a PLA program table to the manufacturer.
12. What is field programmable logic array?
The second type of PLA is called a field programmable logic array. The user by means of certain
recommended procedures can program the EPLA.
13. List the major differences between PLA and PAL
Both AND and OR arrays are programmable and Complex Costlier than PAL PAL, AND arrays are
programmable OR arrays are fixed Cheaper and Simpler.
14. Define PLD.
Programmable Logic Devices consist of a large array of AND gates and OR gates that can be
programmed to achieve specific logic functions.
15. Give the classification of PLDs.
PLDs are classified as PROM (Programmable Read Only Memory), Programmable Logic Array(PLA),
Programmable Array Logic (PAL), and Generic Array Logic(GAL)
16. Define PROM.
PROM is Programmable Read Only Memory. It consists of a set of fixed AND gates connected to a
decoder and a programmable OR array.
17. Define PLA
PLA is Programmable Logic Array (PLA). The PLA is a PLD that consists of a programmable AND
array and a programmable OR array.
18. Define PAL
PAL is Programmable Array Logic. PAL consists of a programmable AND array and a fixed OR array
with output logic.
19. Why was PAL developed?
It is a PLD that was developed to overcome certain disadvantages of PLA, such as longer delays due to
additional fusible links that result from using two programmable arrays and more circuit complexity.
20. Why the input variables to a PAL are buffered
SCE
144
DEPT OF ECE
CS6201
The input variables to a PAL are buffered to prevent loading by the large number of AND gate inputs to
which available or its complement can be connected.
21. What does PAL 10L8 specify?
PAL - Programmable Logic Array 10 - Ten inputs L - Active LOW Ouput 8 - Eight Outputs
22. Give the comparison between PROM and PLA.
PROM
And array is fixed and OR array is
programmable.
Cheaper and simple to use.
PLA
Both AND and OR arrays are
Programmable.
PART B
1.
5.
SCE
145
DEPT OF ECE
CS6201
5.10
GLOSSARY TERMS
1. FPGA-Field-Programmable Gate Arrays -use read/write memory cells to control the state of
each connection.
2. Memory unit- A memory unit is a collection of cells capable of storing a large quantity of
binary information.
3. Write operation- The process of storing new information into memory is referred to as a
memory write operation.
4. Read operation- The process of transferring the stored information out of memory is referred
to as a memory read operation.
5. ROM- Read only Memory-ROM can perform only the read operation.
6. RAM-Random Access Memory-Read and write operations can be carried out.
7. PLD- A PLD is an integrated circuit with internal logic gates connected through electronic
paths that behave similarly to fuses.
8. Programmable array logic (PAL) - PAL is Programmable Array Logic, consists of a
programmable AND array and a fixed OR array with output logic.
9. Programmable logic array (PLA) - PLA is Programmable Logic Array (PLA) consists of a
programmable AND array and a programmable OR array.
10. ASIC (Application specific integrated circuits)- Chips designed for a particular, limited
product or applications.
5.11
REFERENCES
1. Morris Mano M. and Michael D. Ciletti, Digital Design, IV Edition, Pearson Education, 2008.
2. Dr.N.Jayaprakash, Digital Principles and System Design, Anuradha publications.
3. Donald D. Givone, Digital Principles and Design, Tata Mcgraw Hill, 2003.
SCE
146
DEPT OF ECE
CS6201
1.
2.
3.
4.
5.
6.
7.
8.
9.
10.
11.
12.
6.
, , ,
(a) Design a circuit that converts 8421 BCD code to Excess-3 code.
(or)
(b) Implement the following Boolean function using 8 to 1 multiplexer
, , ,
= +
+
+ . Also implement the function using 16 to 1 multiplexer.
SCE
147
DEPT OF ECE
CS6201
(a) Explain the steps for the design of asynchronous sequential circuits.
(or)
(b) Implement the switching function =
, , , , , , ,
by a static hazard free two
level AND OR gate network.
8.
(b) The following messages have been coded in the even parity Hamming code and transmitted
through a noisy channel. Decode the messages, assuming that at most a single error has occurred in each
code word.
i.
ii.
iii.
iv.
SCE
1001001
0111001
1110110
0011011
148
DEPT OF ECE
CS6201
1.
2.
3.
4.
5.
6.
7.
8.
9.
10.
Realize =
+
+ using NAND gates.
Realize 4-bit binary to gray code converter using EX-OR gates.
State the difference between demultiplexer and decoder
State the difference between PAL and PLA.
Write the HDL code to realize a D flipflop.
State the rules for state assignment.
What are cycles and races?
Draw the ASM chart for the following state diagram:
(b)
12.
SCE
(a)(i) Add subtract and multiply the following numbers in binary 110010 and 11101.
(ii) Minimize the following function using k-map.
, , ,
=
, , , , , , , , ,
(or)
(i) State and prove De Morgans theorems for 2 variables.
(ii) Simplify the following function using Quine-Mc Cluskey method
, , ,
=
, , , , , , , , ,
(a)(i) Design a 2-bit binary magnitude comparator.
149
(6)
(10)
(6)
(10)
(6)
DEPT OF ECE
CS6201
(ii) Design a 2-bit binary multiplier to multiply two binary numbers and produce a 4-bit result.
(10)
(b)
(or)
(i) Design a full adder and realize it using only NOR gates
(ii) Design a 4-bit parallel binary adder/subtractor.
(a)
(i) Implement the following function using 8 to 1 multiplexer
, , , =
, , , , , , ,
(ii) Write the HDL code to realize binary to octal encoder
(or)
(b)
(i) Design 8 to 3 priority encoder
(ii) Simplify the following functions and implement it using a suitable PLA
, , ,
=
, , , , , , ,
and = , , ,
(8)
(8)
13.
14.
(a)
flops.
(10)
(6)
(8)
(8)
Design a sequence detector to detect the input sequence 101(overlapping). Use JK flip(16)
(or)
Design a 3-bit synchronous up counter using JK flip-flops.
(6)
Design a 3-bit parallel in serial out shift register and write the HDL code to realize it.
(10)
(b)
(i)
(ii)
15.
(a)
(i) Explain the two types of asynchronous sequential circuits with suitable examples.(10)
(ii) What is a flow table? Explain with a suitable example.
(6)
(or)
(i) What are the basic building blocks of an ASM chart? Explain.
(6)
(ii) What is a hazard? How to remove hazards using hazard covers in k-map? Explain.
(10)
(b)
SCE
150
DEPT OF ECE
CS6201
1.
2.
3.
4.
5.
6.
7.
8.
9.
10.
11. (a) Reduce the following functions using Karnaugh map technique.
(i)
, ,
=
, , , +
,
(ii)
, , , =
, , , , ,
+
, ,
(or)
12.
(or)
(or)
, , , ,
151
DEPT OF ECE
CS6201
14.
(a)Using D flipflops, design a synchronous counter which counts in the sequence
000,001,010,011,100,101,110,111,000.
(or)
(b)Design a shift register using JK flipflops.
(a)(i) Explain the types of hazards in digital circuits.
(ii) Implement the switching function =
, , , , , ,
level AND-OR gate network.
(or)
15.
SCE
152
DEPT OF ECE
CS6201
(16)
13. (a) (i) Realize 4 16 decoder using two 3 8 decoders with enable input.
(ii) Implement the two following Boolean functions using 8 2 PROM.
(4)
SCE
153
(12)
(4)
DEPT OF ECE
CS6201
=
, , ,
=
, , ,
(6)
(iii) Implement the following function using a multiplexer
, , , =
, , , , ,
(6)
(or)
(b) Implement the following two Boolean functions using PLA with 3 inputs, 4 product terms
and 2 outputs.
=
, , ,
=
, , ,
(16)
14. (a) Design a synchronous counter with the following sequence 0,1,3,7,6,4 and repeats. Use JK
flip-flops.
(16)
(or)
(b) Design the sequential circuit specified by the following state diagram using T flip-flops. (16)
15. (a) (i) What is the objective of state assignment in asynchronous circuit? Explain race-free state
assignment with an example.
(8)
(ii) Discuss about static, dynamic and essential hazards in asynchronous sequential circuits.(8)
(or)
(b) Design an asynchronous sequential circuit with inputs x1 and x2 and one output z. Initially
and at any time if both the inputs are 0, output is equal to 0. When x1 or x2 becomes 1, z
becomes 1. When second input also becomes 1, z=0. The output stays at 0 until circuit goes back
to initial state.
(16)
SCE
154
DEPT OF ECE