Digital Logic Circuits
Digital Logic Circuits
Digital Logic Circuits
ENGINEERING COLLEGE
(Approved by AICTE and Affiliated to Anna University Chennai)
TRICHY – PUDUKKOTTAI ROAD, TIRUCHIRAPPALLI – 620 007
COURSE MATERIAL
EE8351 - DIGITALLOGIC CIRCUITS
(SYLLABUS)
Sub. Code : EE8351 Branch/Year/Sem : EEE/II/III
(SYLLABUS)
Sub. Code : EE8351 Branch/Year/Sem : EEE/II/III
COURSE OBJECTIVES
1. To study various number systems and simplify the logical expressions using Boolean
functions.
2. To study combinational circuits application of knowledge to understand digital
electronics circuits.
3. To design various synchronous and asynchronous circuits.
4. To introduce asynchronous sequential circuits and PLDs.
5. To acquire the basic knowledge of digital logic levels.
COURSE OUTCOMES
A digital system can understand positional number system only where there are a few
symbols called digits and these symbols represent different values depending on the position
they occupy in the number.
The digit
The position of the digit in the number
The base of the number system (where base is defined as the total number of digits
available in the number system).
The number system that we use in our day-to-day life is the decimal number system. Decimal
number system has base 10 as it uses 10 digits from 0 to 9. In decimal number system, the
successive positions to the left of the decimal point represents units, tens, hundreds, thousands
and so on.
Each position represents a specific power of the base (10). For example, the decimal number
1234 consists of the digit 4 in the units position, 3 in the tens position, 2 in the hundreds position,
and 1 in the thousands position, and its value can be written as
Example
Characteristics
Example
Characteristics
Example −
Step 2 19FDE16 ((1 × 164) + (9 × 163) + (15 × 162) + (13 × 161) + (14 × 160))10
Step 3 19FDE16 (65536 + 36864 + 3840 + 208 + 14)10
Step 4 19FDE16 10646210
There are many methods or techniques which can be used to convert numbers from one base to
another. We'll demonstrate here the following −
Steps
Step 1 − Divide the decimal number to be converted by the value of the new base.
Step 2 − Get the remainder from Step 1 as the rightmost digit (least significant digit) of
new base number.
Step 3 − Divide the quotient of the previous divide by the new base.
Step 4 − Record the remainder from Step 3 as the next digit (to the left) of the new base
number.
Repeat Steps 3 and 4, getting remainders from right to left, until the quotient becomes zero in
Step 3.
The last remainder thus obtained will be the Most Significant Digit (MSD) of the new base
number.
Example −
As mentioned in Steps 2 and 4, the remainders have to be arranged in the reverse order so that
the first remainder becomes the Least Significant Digit (LSD) and the last remainder becomes
the Most Significant Digit (MSD).
Steps
Step 1 − Determine the column (positional) value of each digit (this depends on the
position of the digit and the base of the number system).
Step 2 − Multiply the obtained column values (in Step 1) by the digits in the
corresponding columns.
Step 3 − Sum the products calculated in Step 2. The total is the equivalent value in
decimal.
Example
Steps
Example
Step 1 − Divide the binary digits into groups of three (starting from the right).
Step 2 − Convert each group of three binary digits to one octal digit.
Example
Steps
Step 1 − Convert each octal digit to a 3 digit binary number (the octal digits may be
treated as decimal for this conversion).
Step 2 − Combine all the resulting binary groups (of 3 digits each) into a single binary
number.
Example
Steps
Step 1 − Divide the binary digits into groups of four (starting from the right).
Step 2 − Convert each group of four binary digits to one hexadecimal symbol.
Example
Hexadecimal to Binary
Steps
Step 1 − Convert each hexadecimal digit to a 4 digit binary number (the hexadecimal
digits may be treated as decimal for this conversion).
Step 2 − Combine all the resulting binary groups (of 4 digits each) into a single binary
number.
Example
Weighted Codes
Non-Weighted Codes
Binary Coded Decimal Code
Alphanumeric Codes
Error Detecting Codes
Error Correcting Codes
Weighted Codes
Weighted binary codes are those binary codes which obey the positional weight principle. Each
position of the number represents a specific weight. Several systems of the codes are used to
express the decimal digits 0 through 9. In these codes each decimal digit is represented by a
group of four bits.
Non-Weighted Codes
In this type of binary codes, the positional weights are not assigned. The examples of non-
weighted codes are Excess-3 code and Gray code.
Excess-3 code
The Excess-3 code is also called as XS-3 code. It is non-weighted code used to express decimal
numbers. The Excess-3 code words are derived from the 8421 BCD code words adding (0011)2
or (3)10 to each code word in 8421. The excess-3 codes are obtained as follows −
Example
Gray Code
It is the non-weighted code and it is not arithmetic codes. That means there are no specific
weights assigned to the bit position. It has a very special feature that, only one bit will change
each time the decimal number is incremented as shown in fig. As only one bit changes at a time,
the gray code is called as a unit distance code. The gray code is a cyclic code. Gray code cannot
be used for arithmetic operation.
Application of Gray code
In this code each decimal digit is represented by a 4-bit binary number. BCD is a way to express
each of the decimal digits with a binary code. In the BCD, with four bits we can represent sixteen
numbers (0000 to 1111). But in BCD code only first ten of these are used (0000 to 1001). The
remaining six code combinations i.e. 1010 to 1111 are invalid in BCD.
Alphanumeric codes
A binary digit or bit can represent only two symbols as it has only two states '0' or '1'. But this is
not enough for communication between two computers because there we need many more
symbols for communication. These symbols are required to represent 26 alphabets with capital
and small letters, numbers from 0 to 9, punctuation marks and other symbols.
The alphanumeric codes are the codes that represent numbers and alphabetic characters. Mostly
such codes also represent other characters such as symbol and various instructions necessary for
conveying information. An alphanumeric code should at least represent 10 digits and 26 letters
of alphabet i.e. total 36 items. The following three alphanumeric codes are very commonly used
for the data representation.
ASCII code is a 7-bit code whereas EBCDIC is an 8-bit code. ASCII code is more commonly
used worldwide while EBCDIC is used primarily in large IBM computers.
Error Codes
There are binary code techniques available to detect and correct data during data transmission.
The most commonly used logic family called the transistor –transistor logic, has the faster
switching speed when compared to other logic families that utilize saturated transistors.
+VCC
R3
Rb
R1
Q3
A
B Q2
Q1
C
1
D1 y=(ABC)'
2
R2 Q4
0 0
Circuit operation:
The output is taken from the collector of Q4.Each emitter of Q1 act as a diode When
either of Q1 act as a Diode. When either or all inputs (A,B,C) are at 0 V, (logic 0), the
corresponding emitter-base junction of Q1 is forward biased. The value of Rb is selected so as to
ensure that Q1 is turn ON. However the value of current ib2 flowing through the base of Q2
reduces the potential at the base of Q2. and hence transistor Q2 and Q3 are cut-off so that the
output voltage is at Vcc(logic 1). If all the inputs are high (logic 1), the E-B junction of Q1 is
reverse biased.hence Q1 is switched off. And Q2 is turned ON and the drop across R2 is
sufficient to forward bias the EB junction of Q4. Thereby turning Q4 ON. Hence the output at its
collector is low(logic 0). The function of Diode D is to prevent both Q3 and Q4 from being ON
simultaneously.
0 +VCC
Q3
Vout= (A+B)'
A B
Q1
Q2
Q -1.3 v -2v
Q4
VEE Vout= (A+B)
-2v
The basic circuit of ECL is a different amplifier as shown if fig. The VEE supply produces a
fixed current IE, which remains around 3 mA during normal operation. This current is allowed to
flow through Q1 or Q2, depending on the voltage level at Vin. In other words, these current
switches between the collectors of Q1 and Q2 as Vine witches between its two logic levels of -
1.7 V. If both inputs A and B are low, then both transistors Q& Q1 off. While Q2 is the active
region and its collector is in a LOW state.
+Vdd
Q1
Y=(Vin)'
Vin
Q2
Operation:
Q1 is ON , output is high
+Vdd
Q4
Q1
Y=(A.B)
A
Q2
Q3
B
0
Operation:
If both input is High, both P channel transistor turned off and boths „n‟ channel transistors turned
ON. The output has a low impedance to ground and produces a low state.
If any input is low, the associated n-channel transisitor is turned off. And the associated p-
channel transisitor is turned ON.The output is coupled to VDD and goes to the HIGH state.
To produce the positive AND function the output of the CMOS NAND gate can be connected to
a CMOS inverter.
UNIT II
Boolean Algebra:
commutative property:
A+B=B+A
A.B=B.A
Associative property:
A+(B+C) = (A+B)+C
A.(B.C) =(A.B)C
Distributive property:
A+BC=(A+B)(A+C)
A.(B+C) = A.B+A.C
Absorption laws:
A+AB = A
A.(A+B)
A+A‟B = A+B
A.(A‟+B) = AB
Consensus Laws:
AB + A‟C + BC = AB + A‟C
(A+B)(A‟+C)(B+C) = (A+B)(A‟+C)
A+0 =A A.1= A
A+1=1 A.0=0
A+A=A A.A=A
A+A‟=1 A.A‟=0
A‟‟=A A‟‟=A
Principle of duality:
From the above properties and laws of Boolean algebra, it is evident that they are
grouped in pairs. One expression can be obtained from the other in each pair by replacing every
0 with 1, every 1 with 0, every + with . every . with +. Any pair of expression satisfying this
property is called dual expression. This characteristics of Boolean algebra is called the principles
of duality.
De-Morgan’s theorem:
(AB)‟=A‟+B‟
(A+B)‟= A‟.B‟
Truth table:
The word sum and product are derived from the symbolic representation of the OR and
AND function by + and .(addition and multiplication), respectively. The SOP is a group of
product terms OR ed together.
Ex.
F(P,Q,R,S)= PQ+QR
Ex.
1.F(A,B,C) = (A+B).(B+C)
F(A,B,C)= A‟B‟C‟+A‟B‟C+A‟BC‟
= mo + m1+m2
=∑m(0,1,2)
F(A,B,C)= (A‟+B‟+C‟.(A+B+C).(A+B+C‟)
= M7.M0.M1
=ΠM(0,1,7)
A‟B‟C‟+A‟BC‟+A‟BC+AB‟C+ABC
Solution:
F(A,B,C)= ∑(0,2,3,5,7)
F‟=∑(1,4,6)=m1+m4+m6
F= (m1+m4+m6)‟
F= m1‟+m4‟+m6‟
F= M1.M4.M6
= Πm(1,4,6).
STRUCTURE OF K MAP:
1 2 3 1 3 7 5
AB
00 01 11 10
CD
00 0 4 12 8
01 1 5 13 9
11 3 7 15 11
10
10 2 6 14
FOUR VARIABLE K
MAP
EXAMPLE 1
AB
00 01 11 10
CD
0
00 0 1 1
01 1 1 1 1
11 1 1 0 0
0 0
10 0 0
Y=AC‟+A‟D
EX:2
AB
00 01 11 10
CD
0 0
00 1 0
0 0
01 1 1
11 0 1 1 1
0 0 1 1
10
Y= AB+AD+AC+BCD
EXAMPLE:
AB
00 01 11 10
CD
0 0 0 0
00
0 0 0 0
01
11
10 0 0
Y = C (B‟+D)
EXAMPLE:
ABC
DE
000 001 011 010 110 111 101 100
00 1 1 1 1 1
01 1 1 1
1 1
11 1 1
10 1 1 1
Y= BDE‟+AC‟E+A‟BE‟+AB‟CD‟+A‟B‟CD+A‟B‟DE
AB
CD 00 01 11 10
00 d 0 0 0
01
1 d 0 0
11 1 1 1 1
10 0 0 0
d
Y= A‟B‟ + CD
Example:
Using the K-map method, simplify the following Boolean function and obtain (i) minimal sum of
products (SOP) (ii) minimal POS expression
AB
CD 00 01 11 10
00 1 0 0 d
01 0 0 0 0
11 1 1 d d
10
1 1 0 d
EXAMPLE:
Find the minimal sum of products for the Boolean expression, f = (1, 2, 3, 7, 8, 9, 10, 11,
14, 15), using Quine McCluskey method.
Solution:
Variables
ABCD
Minterms
1 0000
2 0010
3 0011
7 0111
8 1000
9 1001
10 1010
11 1011
14 1110
15 1111
Group of minterms for different number of 1‟s:
ABCD
1 1 0000
2 0010
8 0111
2 3 0011
9 1001
10 1010
3 7 0111
11 1011
14 1110
4 15 1111
2 CELL COMBINATION:
COMBINATION ABCD
1,3 00-1
1,9 -001
2,3 001-
2,10 -010
8,9 100-
8,10 10-0
3,7 0-11
3,11 -011
9,11 10-1
10,11 101-
10,14 1-10
7,15 -111
11,15 1-11
14,15 111-
4 cell combination
COMBINATION ABCD
1,3,9,11 -0-1
2,3,10,11 -01-
8,9,10,11 10--
3,7,11,15 --11
10,11,14,15 1-1-
PRIME IMPLICANT CHART:
PRIME
IMPLICANTS MINTERMS
1 2 3 7 8 9 10 11 14 15
(1,3,9,11)* X X X X
(2,3,10,11)* X X X X
(8,9,10,11)* X X X X
(3,7,11,15)* X X X X
(10,11,14,15)* X X X X
Combinational logic:
Digital computers and calculators consists of arithmetic and logic circuits, which contains logic
gates and flip flops that add, subtract, multiply and divide binary numbers.
In Combinational logic circuit, the output at any time depends only on present input values at
that time.
Half adder:
Truth table:
A B sum carry
0 0 0 0
0 1 1 0
1 0 1 0
1 1 0 1
Sum= A‟B+AB‟
Carry= A.B
Logic diagram:
U1A
A 1
2
3
SUM
B 7486
U2A
1
2
3
CARRY
7408
FULL ADDER:
Truth table:
CARRY = AB+BC+CA
Logic diagram:
A U1A
1
U3A
3
sum
B 2 1
3
7486 2
C 7486
U4A
U2A 1
1 3
3 2
2
7408
U5A
7408
1 carry
3
2
7432
Half subtractor :
Truth table
A B Difference Borrow
0 0 0 0
0 1 1 1
1 0 1 0
1 1 0 0
Differece = A xor B
Borrow = A‟B
Logic diagram:
A U1A
1 difference
3
B 2
7486
1
U2A
U6A
7404
1 Borrow
3
2
2
7408
Full subtractor:
Truth table:
A U1A
1
3 U3A
B 2 1
3 Difference
1
7486 2
Bin U6A
7404
7486
1
U4A
U6A U2A 1
2
1 3
7404 3 2
2
7408
2
U5A
7408
1 Borrow
3
2
7432
Multiplexer:
The multiplexer has several data input lines and a single output line. The selection of a particular
input lines is controlled by a set of selection lines.
4:1 Multiplexer:
Block diagram:
selection lines
so S1
D0
data D1
4 to 1 mux o/p
inputs D2
D3
Truth table:
s1 s0
1
U2A U2A
D0 7404 7404
U3A
1
2
3
2
7408
U4A
D1
1
3 U7A
2 1
3 y
7408 2
U5A
D2 7432
1
3
2
7408
U6A
D3
1
3
2
7408
A demultiplxer is a logic circuit that receives information on a single line and transmits
the same information over several out lines.
1:4 demultiplexer:
Truth table:
D s1 s0
1
U2A U2A
7404 7404
U3A
1
y0
2
3
2
7408
U4A
1
3 y1
2
7408
U5A
1
3 y2
2
7408
U6A
1
3 y3
2
7408
Decoder:
A decoder is similar to demultiplexer but without any data input. In a decoder, the
number of outputs is greater than the number of inputs.
3:8 decoder:
A 3:8 decoder has three inputs and eight outputs . the truth table and logic diagram are
follows.
Truth table:
Inputs outputs
A B C D0 D1 D2 D3 D4 D5 D6 D7
0 0 0 1 0 0 0 0 0 0 0
0 0 1 0 1 0 0 0 0 0 0
0 1 0 0 0 1 0 0 0 0 0
0 1 1 0 0 0 1 0 0 0 0
1 0 0 0 0 0 0 1 0 0 0
1 0 1 0 0 0 0 0 1 0 0
1 1 0 0 0 0 0 0 0 1 0
1 1 1 0 0 0 0 0 0 0 1
C
A B
1
U2A
1
7404
U2A U2A
2
7404 7404 U3A
1
3 D0
2
2
U4A 7408
1
3 D1
2
U5A 7408
1
3 D2
2
U6A 7408
1
3 D3
2
U3A
1
7408
D4
3
2
U3A 7408
1
3 D5
2
U3A 7408
1
3 D6
2
U3A 7408
1
3 D7
2
7408
Logic diagram:
ENCODER:
An encoder is a digital circuit that perform the inverse operation of a decoder. Hence, the
opposite of the decoding process is called encoding.
An encoder is a combinational circuit that converts an active low signal into a coded
output signal.
Outputs Inputs
A B C D0 D1 D2 D3 D4 D5 D6 D7
0 0 0 1 0 0 0 0 0 0 0
0 0 1 0 1 0 0 0 0 0 0
0 1 0 0 0 1 0 0 0 0 0
0 1 1 0 0 0 1 0 0 0 0
1 0 0 0 0 0 0 1 0 0 0
1 0 1 0 0 0 0 0 1 0 0
1 1 0 0 0 0 0 0 0 1 0
1 1 1 0 0 0 0 0 0 0 1
A = D1 + D3 + D5 + D7
B = D2 + D3 + D6 + D7
C = D4 + D5 + D6 + D7
LOGIC DIAGARM:
D0
D1
D2
D3
D4
D5
D6
D7
2
1
3
C B A
COMPARATORS:
Truth table:
A B condition
0 0 A=B
0 1 A<B
1 0 A>B
1 1 A=B
LOGICAL EXPRESSION:
(A=B) = A‟B‟+AB
(A<B) = A‟B
(A>B) = AB‟
Logic diagram:
U3A
1
3 A<B
2
7408
2
U2A
7404 U4A U2A
A 1
31 2 A=B
1
2
B 7486
7404
1
U3A
U2A
7404
1 A>B
3
2
2
7408
Code converters:
Code converter is a logic circuit that changes data presented in one type of binary code to
another type of binary code.
TRUTH TABLE:
BINARY INPUTS GRAY CODE OUTPUTS
B3 B2 B1 B0 G3 G2 G1 G0
0000 0000
0001 0001
0010 0011
0011 0010
0100 0110
0101 0111
0110 0101
0111 0100
1000 1100
1001 1101
1010 1111
1011 1110
1100 1010
1101 1011
1110 1001
1111 1000
G3 = B3
G2 = B3 XOR B2
G1 = B2 XOR B1
G0 = B1 XOR B0
Logic diagram:
U3A
B0 1
2
3
G0
7486
U4A
B1 1
2
3
G1
U5A
B2 1
2
3
G2
7486
B3
G3
Gray to binary code converter:
B3 = G3
B2 = B3 XOR G2
B1 = B2 XOR G1
B0 = G0 XOR B1
Logic diagram:
U3A
B0
G0 1
3
2
7486
U4A
G1 1
3 B1
2
U5A
G2 1
3 B2
2
7486
B3
G3
UNIT III
Sequential circuits:
Combinational logic refers to circuits whose output is strictly depended on the present
value of the inputs. As soon as inputs are changed, the information about the previous
inputs is lost, that is, combinational logics circuits have no memory. In many applications,
information regarding input values at a certain instant of time is required at some future time.
Although every digital system is likely to have combinational circuits, most systems encountered
in practice also include memory elements, which require that the system be described in terms of
sequential logic. Circuits whose outputs depends not only on the present input value but also
the past input value are known as sequential logic circuits. The mathematical model of a
sequential circuit is usually referred to as a sequential machine.
FLIP FLOPS:
SR FLIP FLOP:
Logic diagram:
S U11A
1 U12A
2
3 1
3 Q
2
7400
clock 7400
U14A
U13A
R 1
3 1 Q'
2 3
2
7400
7400
Truth table:
clk S R Qn Qn+1
X 0 0 No change
1 0 1 0 1
1 1 0 1 0
1 1 1 Forbidden state
Characteristics equation:
Qn+1=S+R‟Q
State diagram:
D FLIP FLOP:
The d flip flop has only one input called delay and two outputs Q,Q‟
Logic diagram:
U11A
D 1 U12A
2
3 1
3 Q
2
1
7400
clock U15A
7404
7400
U14A
2
U13A
1
3 1 Q'
2 3
2
7400
7400
Characteristics equation:
Q(n+1) = D
Truth table:
1 0 0
1 1 1
0 X No change
State diagram:
JKFLIP FLOP:
Logic diagram:
U16A
1 U11A
U12A
J 3 1
2
2
3 1
3 Q
7408 2
7400
clock 7400
U14A
U17A U13A
K 1
1
3 1 Q'
3 2 3
2 2
7400
7408 7400
Characteristics equation:
Truth table:
X 0 0 Qn No change
1 0 1 0 1
1 1 0 1 0
1 1 1 Qn‟ Toggle
State diagram:
TFLIP FLOP:
Logic diagram:
U16A
1 U11A
U12A
T 3 1
2
2
3 1
3 Q
7408 2
7400
clock 7400
U14A
U17A U13A
1
1
3 1 Q'
3 2 3
2 2
7400
7408 7400
Characteristics equation:
Truth table:
CLK T Qn+1
1 0 (No change) Qn
1 1 (Toggle) Qn‟
0 x (No change) Qn
State diagram:
DESIGN OF COUNTERS:
Example:
Solution:
state diagram
State table:
Q2 Q1Q0 q2q1q0
000 001
001 010
010 011
011 100
100 101
101 110
110 111
111 000
Excitation table :
PS NS J2 K2 J1 K1 J0 K0
Q2 Q1 Q0 Q2 q1 q0
000 001 0X 0X 1X
001 010 0X 1X X1
010 011 0X X0 1X
011 100 1X X1 X1
100 101 X0 0X 1X
101 110 X0 1X X1
110 111 X0 X0 1X
111 000 X1 X1 X1
KARNAUGH MAP:
From the k map
J0=k0=1
J1=K1=Q0
J2=2=Q1Q0
Logic diagram:
Analysis of synchronous sequential circuits:
Example: Derive the state table and state diagram of the following diagram.
Solution:
Step 2:Converting the equation into next state expression according to the flip flop used. ere we
are using D flip flop so Qn+1=D,
00 00 01
01 01 10
10 10 11
11 11 00
State diagram.
STATE REDUCTION:
A B C 10
B F D 00
C D E 11
D F E 01
E A D 00
F B C 10
Solution:
It can be seen from the table that the present state A and F both have the same next
states,B (when x=0) and C (when x=1). They also produce the same output 1 (when x=0) and 0
(when x=1). Therefore states A and F are equivalent. Thus one of the states, A or F can be
removed from the state table. For example, if we remove row F from the table and replace
all F's by A's in the columns, the state table is modified as shown in Table.
A B C 10
B A D 00
C D E 11
D A E 01
E A D 00
It is apparent that states B and E are equivalent. Removing E and replacing E‟s by B‟s. Results in
the reduce table follows.
A B C 10
B A D 00
C D B 11
D A B 01
ASYNCHRONOYUS (RIPPLE OR SERIAL)COUNTER:
The asynchronous counter is the simplest in terms of logical operation, and is therefore the
easiest to design. The clock pulse is applied to the first flip flop is triggered by the output of the
previous flip-flop and thus the counter has a cumulative settling time.
STATE QD QC QB QA
0 0000
1 0001
2 0010
3 0011
4 0100
5 0101
6 0110
7 0111
8 1000
9 1001
10 1010
TRUTH TABLE
11 1011
12 1100
13 1101
14 1110
15 1111
0 0000
+VCC
Q Q Q Q
J J J J
clk C
A B clk clk D
clk
K K
K K
QA QD
QB QC
Mod-number or modulus:
The above counter has 16 different states. Thus, it is a MOD-16 ripple counter. The
MOD-number of a counter is the total number of states it sequences through in each complete
cycle.
SYNCHRONOUS COUNTERS:
The clock pulses are applied to all flip flop simultaneously.The speed of operation in a
synchronous counter is limited by the propagation delay of control gating and a flip flop.
clk
+VCC
Q Q Q Q
J J J J
C
A B clk D
clk
clk
K K
K K
1
3 1
2 3
2
Total delay = propagation delay of one flip flop + propagation delay of AND gate
UNIT IV
Z1
x1
x2 Z2
combinational
xn circuit
Zn
DELAY
DELAY
DELAY
Consider the fundamental mode sequential circuit shown in fig. The circuit has two input
variables I0 and I1 and one output variable Z. The circuit has two feedback paths which provide
inputs to the gates, creating latching operation necessary to provide a sequential circuit. The feed
back path also generates the state variables X0 and X1 the next state for the circuit is determined
by the both the state of input variable and the state variables.
U8A
U1A
I1 1 2 1
3
2
U7A
7404 7408 1
3
X1
2
U2A
I0 1
3
7432
7408
U3A
1
3
U6A
2
1
X0
7408 3
U4A 2
1
U9A 3 7432
1 2 2
7404
7408
From the given sequential circuit we can have next secondary state and output equation as
follows,
X1 = x0 I1‟+ x0 x1 I0
X0 = x0 I0 I1 + X1 I0‟
Z = X0 X1 I0
From these next secondary state and output equation we can construct the state table
indicating present state and next state and the output.The next secondary state values are found
by assigning present state values to the Boolean variables in the next secondary state equation to
determine X1 and X0.For the given input and secondary state if next secondary state does not
change then the state is said to be stable.
Transition table:
input state
I1I0
secondary state x1x0 00 01 11 10
00 00 00 00 00
01 10 10 01 00
11
11 10 11 01
10 01 00 00 01
Sate table:
X1 X0 I1 I0 X1 X0 Yes/No Z
0000 00 Yes 0
0001 00 Yes 0
0010 00 Yes 0
0011 00 Yes 0
0100 10 No 0
0101 10 No 0
0110 00 No 0
0111 01 Yes 0
1000 01 No 0
1001 00 No 0
1010 01 No 0
1011 00 No 0
1100 11 Yes 0
1101 10 No 0
1110 01 No 1
1111 11 yes 1
Design steps:
construction of a primitive flow table from the statement. And intermediate step may include the
development of a state diagram.Primitive flow table is reduced by eliminating redundants states
by using state reduction techniques.state assignment is made the primitive flow table is realized
using appropriate logic elements.
DESIGN PROBLEMS:
Example:
Design a asynchronous sequential circuit with two inputs X andY and with one output Z.
Whenever Y is one, input X is transferred to Z. When Y is zero, the output does not change for
any change in X.
Solution:
00 01 11 10
,1
B
C
D
F
E
A,B,C S0
D,E,F S1
00 01 11 10
S0
S0 S0 S0
,0 ,0 S1,- ,0
S1
S1 S1 S1
,1 S0,- ,1 ,1
Transition table:
00 01 11 10
0 0 0
,0 ,0 1,- ,0
1
1 1 1
,1 0,- ,1 ,1
K-map simplification:
XY
00 01 11 10
F
0
0 0 1 0
1 0 1 1
1
F+=FY‟+XY
` XY
01 11 10
00
F
0
0 0 X 0
1 0 1 1
1
Z=FY‟+XY
Logic diagram:
X Y
F
U1A
1 2
7404
U2A
1
3
2
U4A
7408 1 F+=Z
3
U3A 2
1
3 7432
2
7408
Example:
Design a circuit with inputs A and B to give an output x=1 when AB=11 but only if A becomes 1
before B, by drawing total state diagram, Primitive flow table and output map in which transient
state is included.
Solution:
00 01 11 10
D -,- B,-
,0 C,-
E -,- B,-
E
,1 C,0
State assignment:
A,B,D --- S0
C,E ----S1
00 01 11 10
S0
S0 S0 S0
,0 ,0 ,0 S1,-
S1
S1 S1
S0,- S0,- ,1 ,0
Transition table:
00 01 11 10
0 0 0
,0 ,0 ,0 1,-
1
1 1
0,- 0,1 ,1 ,0
K-map:
AB
F
00 01 11 10
0
0
0 0 1
0 1 1
1 0
F+ = F + AB‟
AB
F
00 01 11 10
0
0 0 X
1 1 0
1 X
Z= FB
Example:
An asynchronous sequential circuit is described by the following excitation and output function
Y=X1X2 +(X1+X2)Y
Z=Y
Solution:
(i)
U7A
X1
1
3 U6A
2 1 Y=Z
X2 3
7408 2
7432
U5A
1 U8A
3 1
2 3
2
7432
7408
(ii) PRESENT STATE , NEXTSTATE, OUTPUT TABLE:
000 000 Y 0
001 000 N 0
010 010 Y 0
011 011 Y 1
100 100 Y 0
101 101 Y 1
110 111 N 1
111 111 Y 1
Transition table:
` X1X2
01 11 10
00
Y
0
1 0
0 0 0
0 1 1 1
1
Output map:
` X1X2
01 11 10
00
Y
0
0 0 - 0
- 1 1 1
1
(iii) The circuit gives carry output of the full adder circuit.
INTRODUCTION:
Memories are made up of registers. Each registers in the memory is one storage location.
Each location is identified by an adder. Generally the total number of bits that a memory can
store is its capacity.Each register consists of storage elements, each of which stores one-bit
information. A storage element is called a cell.The data stored in a memory by a process called
and are retrieved from the memory by a process called reading.
Classification of memories:
ROM ORGANIZATION:
It is a read only memory. We can read data from the memory we cannot write the data in
the memory. Ie.. it can hold data even if power is turned off. Genally ROM is used to store the
binary codes for the sequence of instruction you want the computer carry out and data as look up
tables. The block diagram of ROM memory is shown in fig. It consists of n address lines and m
output lines. Each bit combination of the address variable is called an address. Each bit
combination that comes out of the output lines is called a data word. Hence, the number of bits
per word is equal to the number of output lines, m; an address is essentially a binary number that
denotes one of the 2n memory location. An output word can be selected by a unique address;
since there is 2n distinct address in a ROM; there are 2n distinct words that are said to be stored
in the unit.
0
m bit words
n address lines
decoder
2n
read
tristate
logic
m out put
lines
Masked ROM:
Mask programming is done by the manufacturing during last fabrication process of the unit.
Once the memory is programmed, it cannot be changed. Most Ic ROM‟s utilize the absence or
absence of a transistor connection at a ROW/COLOUMN junction to represent 0„s and 1‟s.
ROM cells:
row
storing a 0
storing a 1
coloumn
PROM (programmable ROM)
The PROM can be programmed electrically by the users but cannot be reprogrammed. In
a PROM chip, the manufacturer includes a connection at every intersection of the grid of address
and data lines. PROM‟s are widely used in the control of electrical equipment such as washing
machines and electric ovens.
P-N junction.
Erasable programmable ROM‟s use MOS circutary.They store 1‟s and 0‟s as a packet of
charge in a buried layer of the Ic chip. EPROM‟s can be programmed by the user with a special
EPROM programmer.
The important point is that we can erase the stored data in the EPROM‟s by exposing the chip
to ultraviolet light through it‟s quartz window for 15 to 20 minutes. It is not possible to erase the
selected data when erased the entire information is lost. The chip can be reprogrammed.
EPROM programming:
When erased each cell in the EPROM contains 1 data is introduced by selectively
programming 0‟s will be programmed, both 1‟s and 0‟s can be presented in the data.
OR
Various combinational and sequential circuits are designed using logic gates and flip
flops. To implement such combinational and sequential circuits , the designer has to interconnect
several SSI and MSI chips by making connections to the IC packages.
Logic circuit can also be designed using Programmable logic device (PLD) that have all the
gates necessary for a logic circuit design in a single package. In such devices, there are
provisions to perform the interconnections of the gates internally so that the desired logic can be
implemented.
PLA is a type of fixed architecture logic devices with programmable AND gates followed by
programmable OR gates. The PLA is used to implement a complex combinational circuit.
A PLA is similar to a ROM in concept except that it does not provide full decoding of the
variables and does not generate all the minterms as in the ROM. Thus, in a PLA, the decoder is
replaced by a group of AND gates, each of which can be programmed to produce a product
(AND) terms of the input variables. The AND and OR gates inside the PLA are initially
fabricated with fuses among them. The specific Boolean functions are implemented in SOP form
by blowing appropriate fuses and leaving the desired connection. It is similar to reprogramming
of ROM‟s.For this reason logic array is called a programmable logic array.
Problems:
EX.1
F1= m(3,5,7)
F2= m(4,5,7) implement the circuit with a PLA having 3 inputs 3 products terms and two
outputs.
Solution:
K map simplification
BC
A 00 01 11 10
0
1
1 1 1
F1 = AC+BC
BC
A 00 01 11 10
1 1 1 1
F2= AB‟+AC
Implementation:
A B C
1
U11A U11A
U11A
7404 7404
7404 U12A
1
2
2
2
U13A 7408
1
3
2
7408
U14A
1
3
2
7408
1
U15A
U16A
7432
7432
3
FIELD PROGRAMMABLE GATE ARRAY(FPGA):
VHDL
INTRODUCTION:
VHDL
H - Hardware
D - Description
L - Language
– VHDL87 ) IEEE-1076-1987
– VHDL93 ) IEEE-1076-1993
Features:
Design may be decomposed hierarchically.Each design element has both a well defined
interface and a precise functional specification.Concurrency, timing, and clocking can all be
modeled.The logical operation and timing behavior of a design can be simulated.
Program structure:
Entity:
Architecture :
entity
architecture
Hierarchical use:
entity
A
architecture
A
entity
entity D
C
entity
B
architecture
architecture D
C
architecture
B
VHDL program file structure:
entity declaration
architecture declaration
Entity entity-name is
…………..
………….);
End entity-name
Type declaration
Signal declaration
Constant declaration
Function definition
Procedure definition
Component declaration
Begin
Concurrent statement
End architecture-name;
Integer operators:
+ Addition
- Subtraction
* Multiplication
/ Division
mod Modulo division
rem Modulo remainder
abs Absolute value
** exponential
Boolean operators:
and AND
or OR
nand NAND
nor NOR
xor EXCLUSIVE OR
xnor EXCLUSIVENOR
not COMPLEMENTATION
Syntax of VHDL types and constant declaration:
example:
function function-name(
signal-names : signal-type;
) return return-type is
Type declaration
Constant declaration
Variable declaration
Function declaration
Procedure definition
Begin
Swquential-statement
End function-name;
Example:
begin
If B =‟0‟;
end if;
end ButNot;
begin
Z<= ButNot(X,Y);
End Inhibit_archf;
A VHDL library is a place where the vhdl compiler stores information about a particular
design project, including intermediate files used in the analysis, simulation, and synthesis of the
design.
A vhdl package is a file containing definition of objects that can be used in other programs. The
kinds of objects that can be put into a package include signal, type, constant, and procedure and
components declaration.
Component component-name
-------------------------------------------------)
end component;
syntax of a vhdl for-generate loop:
concurrent statement
end generate;
example:
library IEEE;
use IEEE.std_logic_1164.all;
entity inv8 is
end inv8;
begin
end generate;
end inv8_arch;
subprograms:
procedures:
syntax:
procedure identifier(parameter_interface_list) is
……………….
Begin
…………
end
syntax:
procedure parameters:
interface list
syntax
constant / variable/signal
mode…..> in /out/inout.
Call statements:
Ex.
Callprocess:p(s1,s2,val1);
Callprocess:process is
Begin
P(s1,s2,val);
Wait on s1,s2;
Functions:
Syntax:‟
Function identifier
……………..
Begin
……………
End
Several additional concurrent statements allow vhdl to describe a circuit in terms of the flow of
data and operations on it within the circuit. This style is called a data flow description or
dataflow design.
Syntax :
………………………………………………..
expression;
Behavioral design or behavioral description is one of the key benefits of hardware description
language in general and VHDL in particular.
end if;
else sequential-statements
end if;
………………..
………………..
end if;
Loop
Sequential-statement
……………..
……….
End loop;
Sequential-statement
…………………….
End loop;
Clocked circuits:
Ex.
Library ieee;
Use ieee.std_logic_1164.all;
Entity vposdff is
Q : out std_logic);
End vposdff;
Begin
Process (clk,clr)
Begin
End if;
End process;
End vposdff_arch.
TEST BENCHES:
VHDL programs:
8 bit adder:
Library IEEE;
Use IEEE.std_logic_1164.all;
Use IEEE.std_logic_arith.all;
Entity vadd is
port(
);
End vadd;
Begin
T <= A+C;
U <= C + SIGNED (D);
End vadd_arch;
Full adder:
Library IEEE;
Use ieee.std_logic_1164.all;
Entity fulladder is
End fulladder;
Begin
End;
4:1 multiplexer:
Library ieee;
Use ieee.std_logic_1164.all;
Entity mux is
Y : out std_logic );
End mux;
Begin
Y <= ((not S1) and (not s0) and d0) or ((not s1) and s0 and d1) or (s1 and (not s0)and d2 or (s1
and s0 and d3);
End arch_mux;
1:4 demultiplexer:
Library ieee;
Use ieee.std_logic_1164.all;
Entity demux is
Port(d,s1,s0: in std_logic;
End demux;
Begin
end;
SR flip flop:
Library ieee;
Use ieee.std_logic_1164.all;
Entity srff1 is
end srff1;
nq <= s nor q;
end;
library ieee;
use ieee.std_logic_1164.all;
entity clksr is
port(s,r,clk : in std_logic;
ends clksr;
component srff1 is
port(s,r : in std_logic;
end component;
begin
end;
d flip flop:
library ieee;
entity dfff1 is
port(d,clk,reset: in std_logic;
q: out std_logic);
end dfff1;
begin
process (clk)
begin
q<= „0‟;
else
q<=d;
end if;
end if;
end process;
end;
Library ieee;
Use ieee.std_logic_1164.all;
Entity ripple_counter is
Port(vcc,clk,reset : in std_logic;
end ripple_counter;
component jkff1 is
port( j,k,clk,reset: in std_logic;
end component;
begin
end;