Professional Documents
Culture Documents
UNIT-1
Presentation by
Mrs.V.Hema
AP-ECE
SYLLABUS
UNIT I: BOOLEAN ALGEBRA AND LOGIC GATES
Review of Number Systems –Arithmetic Operations -Binary Codes–
Boolean Algebra and Theorems –Boolean Functions–Simplification
of Boolean Functions using Karnaugh Map and Tabulation Methods
–Logic Gates–NAND and NOR Implementations.
TEXT BOOKS:
1.“Digital Design”, Pearson Education Publication, IV
Edition 2008 by Morris Mano M. and Michael D. Ciletti
i) Analog
ii) Digital
Robustness
is the coefficient
REVIEW OF NUMBER SYSTEMS
In the octal place value system, each time you move a place
to the left, the value increases eight-fold.
HEXADECIMAL TO DECIMAL
Here are the steps to convert hex to decimal:
Example:
= 1792 + 208 + 14
7DE = 2014
DECIMAL TO HEXADECIMAL
Take decimal number as dividend.
Divide this number by 16 (16 is base of hexadecimal so divisor
here).
Store the remainder in an array (it will be: 0 to 15 because of
divisor 16, replace 10, 11, 12, 13, 14, 15 by A, B, C, D, E, F
respectively).
Repeat the above two steps until the number is greater than zero.
Example − Convert decimal number 540 into hexadecimal
number.
Since given number is decimal integer number, so by using
above algorithm performing short division by 16 with
remainder.
Contd,.
Step 1: Write down the hex number. If there are any, change
the hex values represented by letters to their decimal
equivalents.
Step 2: Each hex digit represents four binary digits and
therefore is equal to a power of 2.
Step 3: Determine which powers of two (8, 4, 2 or 1) sum up
to your hex digits.
Step 4: Write down 1 below those 8, 4, 2 and 1’s that are
used. Write down 0 below those that are not used.
Step 5: Read the 1’s and 0’s from left to right to get the
binary equivalent of the given hex number.
Contd,.
Example 1:
(2C1)16 = ?
2 C 1
2 12 1 (using 8421 code)
0010 1100 0001 ------- binary number
Example 2:
(9DB2)16 = ?
9 D B 2
9 13 11 2 (using 8421 code)
1001 1101 1011 0010 ------- binary number
COMPLEMENT OF NUMBERS
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.
The two types are referred to as
2's complement and
1's complement for binary numbers
and the 10’s complement a complement for decimal
numbers.
1’s and 2’s COMPLEMENT
The 1’s complement of a binary number is the number that
results when we change all1’s to zeros and the zeros to ones.
0+0=0
0+1=1
1+0=1
0-0=0
1-0=1
1-1=0
EXAMPLE
RULES FOR ARTHIMETIC OPERATIONS
3) Rules of Binary Multiplication
0x0=0
0x1=0
1x0=0
Example:
BINARY DIVISION
BINARY CODES
The digital data is represented, stored and transmitted as
group of binary bits. This group is also called as binary code.
Binary codes are codes which are represented in binary
system with modification from the original ones.
The types of binary codes are:
1) Weighted codes.
2) Non-Weighted codes.
3) Binary Coded Decimal Code
4) Alphanumeric Codes
5) Error Detecting Codes
6) Error Correcting Codes
ADVANTAGES OF BINARY CODES
Excess-3 code
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.
EXCESS-3 CODE
The excess-3 codes are obtained as follows −
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.
Error-correcting codes
It not only detect errors, but also correct them. This is used
normally in Satellite
BCD to Excess-3
Excess-3 to BCD
BINARY TO BCD CONVERSION
Step 1 -- Convert the binary number to decimal.
Result
(00101001)BCD = (11101)2
BCD TO EXCESS-3
EXCESS-3 TO BCD
BINARY CODE CONVERSION
BINARY CODE CONVERSION
T6: Redundancy
(a) A + A B = A
(b) A (A + B) = A
Contd,.
T8 : Complement laws
Contd,.
T10: De Morgan's Theorem
For the above table, the canonical SOP form can be written as
This form is chosen due to the number of input lines & gates
are used in this is minimum.
K-MAP
F = Y’Z + X’Y
SCHEMATIC DESIGN
These are not arithmetic product and sum but they are logical
Boolean AND and OR respectively.
Max Term
97
4-2. Analysis procedure
To obtain the output Boolean functions from a logic
diagram, proceed as follows:
1. Label all gate outputs that are a function of input variables with
arbitrary symbols. Determine the Boolean functions for each
gate output.
98
4-2. Analysis procedure
3. Repeat the process outlined in step 2 until the outputs of the
circuit are obtained.
99
Example
F2 = AB + AC + BC; T1 = A + B + C; T2 = ABC; T3 = F2’T1;
F1 = T3 + T2
F1 = T3 + T2 = F2’T1 + ABC = A’BC’ + A’B’C + AB’C’ + ABC
100
Derive truth table from logic diagram
We can derive the truth table in Table 4-1 by using the
circuit of Fig.4-2.
101
4-3. Design procedure
1. Table4-2 is a Code-Conversion example, first, we can
list the relation of the BCD and Excess-3 codes in the
truth table.
102
Karnaugh map
2. For each symbol of the Excess-3 code, we use 1’s to
draw the map for simplifying Boolean function.
103
Circuit implementation
z = D’; y = CD + C’D’ = CD + (C + D)’
x = B’C + B’D + BC’D’ = B’(C + D) + B(C + D)’
w = A + BC + BD = A + B(C + D)
104
4-4. Binary Adder-Subtractor
A combinational circuit that performs the addition of two bits is
called a half adder.
The truth table for the half adder is listed below:
S: Sum
C: Carry
S = x’y + xy’
C = xy
105
Implementation of Half-Adder
106
Full-Adder
One that performs the addition of three bits(two
significant bits and a previous carry) is a full adder.
107
Simplified Expressions
109
Another implementation
Full-adder can also implemented with two half adders
and one OR gate (Carry Look-Ahead adder).
S = z ⊕ (x ⊕ y)
= z’(xy’ + x’y) + z(xy’ + x’y)’
= xy’z’ + x’yz’ + xyz + x’y’z
C = z(xy’ + x’y) + xy = xy’z + x’yz + xy
110
Binary adder
This is also called
Ripple Carry
Adder ,because of the
construction with full
adders are connected
in cascade.
111
Carry Propagation
112
Carry Propagation
Because the propagation delay will affect the output signals on
different time, so the signals are given enough time to get the
precise and stable outputs.
The most widely used technique employs the principle of carry
look-ahead to improve the speed of the algorithm.
113
Boolean functions
Pi = Ai ⊕ Bi steady state value
Gi = AiBi steady state value
Output sum and carry
Si = Pi ⊕ Ci
Ci+1 = Gi + PiCi
Gi : carry generate Pi : carry propagate
C0 = input carry
C1 = G 0 + P0 C0
C2 = G 1 + P1 C1 = G 1 + P1 G 0 + P1 P0 C0
C 3 = G 2 + P2 C2 = G 2 + P 2 G 1 + P 2 P1 G 0 + P2 P1 P0 C 0
115
4-bit adder with carry lookahead
Delay time of n-bit CLAA = XOR + (AND + OR) + XOR
116
Binary subtractor
M = 1subtractor ; M = 0adder
117
Overflow
It is worth noting Fig.4-13 that binary numbers in the signed-
complement system are added and subtracted by the same basic
addition and subtraction rules as unsigned numbers.
118
Overflow on signed and unsigned
When two unsigned numbers are added, an overflow is detected
from the end carry out of the MSB position.
When two signed numbers are added, the sign bit is treated as
part of the number and the end carry does not indicate an
overflow.
119
4-5 Decimal adder
BCD adder can’t exceed 9 on each input digit. K is the carry.
120
Rules of BCD adder
When the binary sum is greater than 1001, we obtain a non-valid
BCD representation.
To distinguish them from binary 1000 and 1001, which also have a
1 in position Z8, we specify further that either Z4 or Z2 must have
a 1.
C = K + Z8Z4 + Z8Z2
121
Implementation of BCD adder
A decimal parallel
adder that adds n
decimal digits needs n
BCD adder stages.
122
4-6. Binary multiplier
Usually there are more bits in the partial products and it is necessary to use
full adders to produce the sum of the partial products.
And
123
4-bit by 3-bit binary multiplier
For J multiplier bits and K
multiplicand bits we need (J X
K) AND gates and (J − 1) K-
bit adders to produce a
product of J+K bits.
124
4-7. Magnitude comparator
The equality relation of each pair
of bits can be expressed logically
with an exclusive-NOR function
as:
A = A3A2A1A0 ; B = B3B2B1B0
xi=AiBi+Ai’Bi’ for i = 0, 1, 2, 3
(A = B) = x3x2x1x0
125
Magnitude comparator
We inspect the relative magnitudes
of pairs of MSB. If equal, we
compare the next lower significant
pair of digits until a pair of unequal
digits is reached.
126
4-8. Decoders
The decoder is called n-to-m-line decoder,
where m≤2n .
the decoder is also used in conjunction with
other code converters such as a BCD-to-
seven_segment decoder.
3-to-8 line decoder: For each possible input
combination, there are seven outputs that are
equal to 0 and only one that is equal to 1.
127
Implementation and truth table
128
Decoder with enable input
Some decoders are constructed with NAND gates, it becomes
more economical to generate the decoder minterms in their
complemented form.
As indicated by the truth table , only one output can be equal to 0
at any given time, all other outputs are equal to 1.
129
Demultiplexer
A decoder with an enable input is referred to as a
decoder/demultiplexer.
The truth table of demultiplexer is the same with
decoder. A B
D0
Demultiplexer D1
E
D2
D3
130
3-to-8 decoder with enable implement
the 4-to-16 decoder
131
Implementation of a Full Adder with a
Decoder
From table 4-4, we obtain the functions for the combinational circuit in sum of
minterms:
S(x, y, z) = ∑(1, 2, 4, 7)
C(x, y, z) = ∑(3, 5, 6, 7)
132
4-9. Encoders
An encoder is the inverse operation of a decoder.
We can derive the Boolean functions by table 4-7
z = D1 + D3 + D5 + D7
y = D2 + D3 + D6 + D7
x = D 4 + D5 + D6 + D7
133
Priority encoder
If two inputs are active simultaneously, the output
produces an undefined combination.We can establish an
input priority to ensure that only one input is encoded.
Another ambiguity in the octal-to-binary encoder is
that an output with all 0’s is generated when all the
inputs are 0; the output is the same as when D0 is equal
to 1.
The discrepancy tables on Table 4-7 and Table 4-8 can
resolve aforesaid condition by providing one more
output to indicate that at least one input is equal to 1.
134
Priority encoder
V=0no valid inputs
V=1valid inputs
135
4-input priority encoder
0
Implementation of 0
table 4-8 0
0
x = D2 + D3
y = D3 + D1D’2
V = D0 + D 1 + D 2 + D 3
136
4-10. Multiplexers
S = 0,Y = I0 Truth Table S Y Y = S’I0 + SI1
S = 1,Y = I1 0 I0
1 I1
137
4-to-1 Line Multiplexer
138
Quadruple 2-to-1 Line Multiplexer
Multiplexer circuits can be combined with common selection inputs to provide
multiple-bit selection logic. Compare with Fig4-24.
I0 Y
I1
139
Boolean function implementation
A more efficient method for implementing a Boolean function of
n variables with a multiplexer that has n-1 selection inputs.
F(x, y, z) = (1,2,6,7)
140
4-input function with a multiplexer
F(A, B, C, D) = (1, 3, 4, 11, 12, 13, 14, 15)
141
Three-State Gates
A multiplexer can be constructed with three-state gates.
142
4-11. HDL for combinational circuits
143
Gate-level Modeling
A circuit is specified by its logic gates and their interconnection.
Verilog recognizes 12 basic gates as predefined primitives.
The logic values of each gate may be 1, 0, x(unknown), z(high-impedance).
144
Gate-level description on Verilog code
The wire declaration is for internal connections.
145
Design methodologies
There are two basic types of design methodologies: top-down
and bottom-up.
Top-down: the top-level block is defined and then the sub-
blocks necessary to build the top-level block are
identified.(Fig.4-9 binary adder)
Bottom-up: the building blocks are first identified and then
combined to build the top-level block.(Example 4-2 4-bit adder)
146
A bottom-up hierarchical description
147
Full-adder
148
4-bit adder
149
Three state gates
Gates statement: gate name(output, input, control)
>> bufif1(OUT, A, control);
A = OUT when control = 1, OUT = z when control = 0;
>> notif0(Y, B, enable);
Y = B’ when enable = 0, Y = z when enable = 1;
150
2-to-1 multiplexer
HDL uses the keyword tri to
indicate that the output has
multiple drivers.
151
Dataflow modeling
It uses a number of operators that act on operands to produce
desired results.Verilog HDL provides about 30 operator types.
Table 4-10
Symbol Operation
+ binary addition
− binary subtraction
& bit-wise AND
| bit-wise OR
^ bit-wise XOR
~ bit-wise NOT
== equality
> greater than
< less than
{} concatenation
?: conditional
152
Dataflow modeling
A continuous assignment is a
statement that assigns a value
to a net.
The data type net is used in
Verilog HDL to represent a
physical connection between
circuit elements.
A net defines a gate output
declared by an output or wire.
153
Dataflow description of 4-bit adder
154
Data flow description of a 4-bit
comparator
155
Dataflow description of 2-1 multiplexer
Conditional operator( ? : )
Condition? true-expression : false-expression;
156
Behavioral modeling
It is used mostly to describe sequential circuits, but can be used
also to describe combinational circuits.
157
Behavioral description of 2-1 multiplexer
158
4-to-1-line Multiplexer
159
Unit-III & IV
Synchronous and Asynchronous
Sequential Circuits
Combinational Logic
Combinational Logic:
◦ Output depends only on current input
◦ Has no memory
PJF
-
2022/5/22 Sequential Circuits 161
Sequential Logic
Sequential Logic:
◦ Output depends not only on current input
but also on past input values, e.g., design a
counter
◦ Need some type of memory to remember
the past input values
PJF
-
2022/5/22 Sequential Circuits 162
Sequential Circuits
Circuits that we Information Storing
have learned Circuits
so far
Timed “States”
PJF
-
2022/5/22 Sequential Circuits 163
Sequential Logic: Concept
Sequential Logic circuits remember past
inputs and past circuit state.
Outputs from the system are
“fed back” as new inputs
◦ With gate delay and wire delay
The storage elements are circuits that are
capable of storing binary information:
memory.
PJF
-
2022/5/22 Sequential Circuits 164
PJF
-
2022/5/22 Sequential Circuits 165
Synchronous vs. Asynchronous
There are two types of sequential circuits:
Synchronous sequential circuit: circuit output
changes only at some discrete instants of time.
This type of circuits achieves synchronization by
using a timing signal called the clock.
Asynchronous sequential circuit: circuit
output can change at any time (clockless).
PJF
-
2022/5/22 Sequential Circuits 166
Synchronous Sequential Circuits:
Flip flops as state memory
FF Combinational FF
Circuit
FF
PJF
-
2022/5/22 Sequential Circuits 168
CLOCK SIGNAL
PJF
-
2022/5/22 Sequential Circuits 169
TYPES OF TRIGGERING
PJF
-
2022/5/22 Sequential Circuits 170
EDGE TRIGERRING
There are two types of transitions that occur in clock signal.
That means, the clock signal transitions either from Logic Low
to Logic High or Logic High to Logic Low.
PJF
-
2022/5/22 Sequential Circuits 171
POSITIVE EDGE TRIGGERING
If the sequential circuit is operated with the clock signal that is
transitioning from Logic Low to Logic High, then that type of
triggering is known as Positive edge triggering. It is also called as
rising edge triggering. It is shown in the following figure.
PJF
-
2022/5/22 Sequential Circuits 172
NEGATIVE EDGE TRIGGERING
If the sequential circuit is operated with the clock signal that is
transitioning from Logic High to Logic Low, then that type of triggering is
known as Negative edge triggering. It is also called as falling edge
triggering. It is shown in the following figure.
PJF
-
2022/5/22 Sequential Circuits 173
LATCH
Latch is one kind of a logic circuit, and it is also known as
a bistable-multivibrator.
Latches are useful for the design of the asynchronous sequential
circuit
The working of these circuits can be done in 2-states based on the
enable signal being high or else low.
When the latch circuit is the in an active high state, then both the
i/ps are low.
Similarly, when the latch circuit is then an active low state, then
both the i/ps are high.
The latches can be classified into different types which include
SR Latch, Gated S-R Latch, D latch, Gated D Latch, JK Latch, and
T Latch.
PJF
-
2022/5/22 Sequential Circuits 174
PJF
-
2022/5/22 Sequential Circuits 175
FLIPFLOP
Flip flops are also considered as sequential logic
circuits as their present output value depends on
present and past input and past output.
when input is changed from one value to
another then the stored bit changes only when
there is a change in the clock signal either from
low level to high or high to a low level.
Therefore, we can say a flip changes the output
according to input but with respect to the clock
signal.
PJF
-
2022/5/22 Sequential Circuits 176
PJF
-
2022/5/22 Sequential Circuits 177
PJF
-
2022/5/22 Sequential Circuits 178
S.No. FLIP LATCHES
5 It checks the inputs but changes the It checks the inputs continuously and
output only at times defined by the responds to the changes in inputs
clock signal or any other control signal. immediately.
PJF
-
2022/5/22 Sequential Circuits 180
LOGIC SYMBOL
PJF
-
2022/5/22 Sequential Circuits 181
NOR BASED SR LATCH
PJF
-
2022/5/22 Sequential Circuits 182
CIRCUIT DIAGRAM-SR Latch
PJF
-
2022/5/22 Sequential Circuits 183
TRUTH TABLE
PJF
-
2022/5/22 Sequential Circuits 184
SR FLIPFLOP
The S and R in SR flip – flop means ‘SET’ and ‘RESET’
respectively. Hence it is also called Set – Reset flip –
flop. The symbolic representation of the SR Flip Flop
is shown below.
PJF
-
2022/5/22 Sequential Circuits 185
UNCLOCKED S-R FLIP-FLOP USING NAND
GATE
SR flip flop can be designed by cross coupling
of two NAND gates. It is an active low input
SR flip – flop. The circuit of SR flip – flop using
NAND gates is shown in below figure
PJF
-
2022/5/22 Sequential Circuits 186
UNCLOCKED S R FLIP-FLOP USING NOR
GATE
SR flip flop can also be designed by cross coupling of
two NOR gates. It is an active high input SR flip –
flop. The circuit of SR flip – flop using NOR gates is
shown in below figure.
PJF
-
2022/5/22 Sequential Circuits 187
CLOCKED SR FLIP – FLOPS
PJF
-
2022/5/22 Sequential Circuits 188
D Latch
There is one drawback of SR Latch. That is the next
state value can’t be predicted when both the inputs S &
R are one. So, we can overcome this difficulty by D
Latch. It is also called as Data Latch. The circuit
diagram of D Latch is shown in the following figure.
PJF
-
2022/5/22 Sequential Circuits 189
TRUTH TABLE-D LATCH
PJF
-
2022/5/22 Sequential Circuits 190
Flip-Flops
Latches are “transparent” (= any change
on the inputs is seen at the outputs
immediately when C=1).
This causes synchronization problems.
Solution: use latches to create flip-flops
that can respond (update) only on specific
times (instead of any time).
Types: RS flip-flop and D flip-flop
PJF
-
2022/5/22 Sequential Circuits 191
Master-Slave FF configuration
using SR latches
PJF
-
2022/5/22 Sequential Circuits 192
Master-Slave FF configuration
using SR latches (cont.)
S R CLK Q Q’
•When C=1, master is enabled and
0 0 1 Q0 Q0’ Store stores new data, slave stores old
0 1 1 0 1 Reset data.
1 0 1 1 0 Set •When C=0, master’s state passes
1 1 1 1 1 Disallowed to enabled slave, master not
X X 0 Q0 Q0’ Store sensitive to new data (disabled).
PJF
-
2022/5/22 Sequential Circuits 193
D Flip-Flop
PJF
-
2022/5/22 Sequential Circuits 195
Characteristic Tables (cont.)
SR Flip-Flop
S R Q(t+1) Operation
0 0 Q(t) No change/Hold
0 1 0 Reset
1 0 1 Set
1 1 ? Undefined/Invalid
PJF
-
2022/5/22 Sequential Circuits 196
Characteristic Tables (cont.)
D Flip-Flop
D Q(t+1) Operation
0 0 Set
1 1 Reset
PJF
-
2022/5/22 Sequential Circuits 197
D Flip-Flop Timing Parameters
PJF
-
2022/5/22 Sequential Circuits 199
Example
Input: x(t)
x
Output: y(t) D Q A
Function? CP C Q
PJF
-
20
2022/5/22 Sequential Circuits 0
Example (continued)
Boolean equations
for the functions: x
A
D Q
◦ A(t+1) = A(t)x(t) A’
C Q
+ B(t)x(t) Next State
◦ B(t+1) = A’(t)x(t)
◦ y(t) = x’(t)(B(t) + A(t)) D Q B
CP C Q'
Output
PJF
-
2022/5/22 Sequential Circuits 201
State Table Characteristics
State table – a multiple variable table with the following
four sections:
◦ Present State – the values of the state variables for each allowed
state.
◦ Input – the input combinations allowed.
◦ Next-state – the value of the state at time (t+1) based on the
present state and the input.
◦ Output – the value of the output as a function of the present state
and (sometimes) the input.
From the viewpoint of a truth table:
◦ the inputs are Input, Present State
◦ and the outputs are Output, Next State
PJF
-
20
2022/5/22 Sequential Circuits 2
Example: State Table
The state table can be filled in using the next state and output equations:
◦ A(t+1) = A(t)x(t) + B(t)x(t)
◦ B(t+1) =A (t)x(t);
◦ y(t) =x (t)(B(t) + A(t))
PJF
-
20
2022/5/22 Sequential Circuits 4
Example: State Diagram
x=0/y=0 x=0/y=1 x=1/y=0
Diagram gets
confusing for AB
large circuits 00 x=0/y=1 1 0
For small circuits, x=1/y=0
usually easier to x=1/y=0
understand than x=0/y=1
the state table
01 11
x=1/y=0
PJF
-
20
2022/5/22 Sequential Circuits 5
UNIT-5 MEMORY AND
PROGRAMMABLE LOGIC
PLAs
Programmable Logic Array
207
PLA
Inputs
Outputs
208
PLA
209
PLA
210
Design for PLA:
Example
◦ Implement the following functions using PLA
F0 = A + B' C'
F1 = A C' + A B Input Side:
F2 = B' C' + A B
F3 = B' C + A 1 = asserted in term
0 = negated in term
- = does not participate
Personality Matrix
Product Inputs Outputs
term A B C F0 F1 F2 F3 Output Side:
AB 1 1 - 0 1 1 0 1 = term connected to output
Reuse 0 = no connection to output
BC - 01 0 0 0 1
AC 1 - 0 0 1 0 0 of
terms
BC - 00 1 0 1 0
A 1 - - 1 0 0 1
211
Example: Continued
A B C
F0 = A + B' C' AB
F1 = A C' + A B
F2 = B' C' + A B B’C
F3 = B' C + A
AC’
B’C’
Personality Matrix A
212
Constants
◦ Sometimes a PLA output must
be programmed to be a
constant 1 or a constant 0.
P1 is always 1 because its
product line is connected to
no inputs and is therefore
always pulled HIGH;
this constant-1 term drives
the O1 output.
◦ No product term drives the
O2 output, which is therefore
always 0.
◦ Another method of obtaining
a constant-0 output is shown
for O3.
213
BCD to Gray Code Converter
A B C D W X Y Z A A
0 0 0 0 0 0 0 0 AB AB
0 0 0 1 0 0 0 1 CD 00 01 11 10 CD 00 01 11 10
0 0 1 0 0 0 1 1 00 0 0 X 1 00 0 1 X 0
0 0 1 1 0 0 1 0
0 1 0 0 0 1 1 0
0 1 0 1 1 1 1 0 01 0 1 X 1 01 0 1 X 0
0 1 1 0 1 0 1 0 D D
0 1 1 1 1 0 1 1 11 0 1 X X 11 0 0 X X
1 0 0 0 1 0 0 1 C C
1 0 0 1 1 0 0 0 10 0 1 X X 10 0 0 X X
1 0 1 0 X X X X
1 0 1 1 X X X X B B
1 1 0 0 X X X X
K-map for W K-map for X
1 1 0 1 X X X X
1 1 1 0 X X X X
1 1 1 1 X X X X A A
AB AB
CD 00 01 11 10 CD 00 01 11 10
00 0 1 X 0 00 0 0 X 1
Minimized Functions: 01 0 1 X 0 01 1 0 X 0
D D
11 1 1 X X 11 0 1 X X
W=A+BD+BC C C
X = B C' 10 1 1 X X 10 1 0 X X
Y=B+C
Z = A'B'C'D + B C D + A D' + B' C D' B B
K-map for Y K-map for Z
214
A B C D
BD
BC’
B
PLA achieves higher flexibility
C
at the cost of lower speed!
BCD
AD’
BCD’
W X Y Z
215
PALs
Programmable Array Logic
◦ a fixed OR array.
Inputs
Outputs
216
PAL
inputs
1st output
section
4th output
section
217
PAL
x
x
W = ABC + CD
X = ABC + ACD + ACD + BCD
Y = ACD + ACD + ABD
218
219
Helper Terms
◦ If an I/O pin’s output-control
gate produces a constant 1,
the output is always enabled,
but the pin may still be used as
an input too.
◦ outputs can be used to
generate first-pass “helper
terms” for logic functions that
cannot be performed in a single
pass with the limited number of
AND terms available for a
single output.
220
Read Only Memory (ROM)
• Decoder
Produces minterms
• ORs 0
1
A‘B’C’D’
A ‘B’C’D
F1
2 A‘B’CD’
Produce SOP’s 3 A‘B’CD
A S3 4 A‘BC’D’
5 A‘BC’D
S2
B 6 A‘BCD’
4:16 7 A‘ BCD
S1 dec
C 8 A B’C’D’ F2
9 A B’C’D
S0 10 A B’CD’
D
11 A B’CD
12 A B C’D’
13 A B C’D
14 A B C D’ F3
15 AB C D
Enb
221
ROM
• ROM
A decoder
D7 X X X
A set of programmable D6
OR’s D5 X X
D4 X
A A2 D3 X
D2
B A1 D1 X X
A0 D0 X
C
F3 F2 F1 F0
222
ROM vs. PLA/PAL
Fixed Programmable
Inputs Programmable Outputs
AND array
Connections OR array
(decoder)
223
Example
Find a ROM-based circuit
implementation for:
◦ f(a,b,c) = a’b’ + abc
◦ g(a,b,c) = a’b’c’ + ab + bc
◦ h(a,b,c) = a’b’ + c
Solution:
◦ Express f(), g(), and h() in m() format (use
truth tables)
◦ Program the ROM based on the 3 m()’s
225
Example
◦ There are 3 inputs and 3 outputs, thus we
need a 8x3 ROM block.
f = m(0, 1, 7)
g = m(0, 3, 6, 7)
h = m(0, 1, 3, 5, 7)
a 0
1
3-to-8 2
b 3
decoder 4
5
c 6
7
f g h
226
ROM as a Memory
Read Only Memories (ROM) or Programmable Read
Only Memories (PROM) have:
◦ N input lines,
◦ M output lines, and
◦ 2N decoded minterms.
Can be viewed as a memory with the inputs as
addresses of data (output values),
◦ hence ROM or PROM names!
227
(Memories)
Volatile:
◦ Random Access Memory (RAM):
SRAM "static"
DRAM "dynamic"
Non-Volatile:
◦ Read Only Memory (ROM):
Mask ROM "mask programmable"
EPROM "electrically programmable"
EEPROM “electrically erasable electrically programmable"
FLASH memory - similar to EEPROM with programmer
integrated on chip
228
ROM as Memory
Read Example: For input (A ,A ,A ) = 011, output is (F ,F ,F ,F
• 2 1 0 0 1 2 3 )=
0010.
•What are functions F3, F2 , F1 and F0 in terms of (A2, A1, A0)?
229
Design by ROM: Example
BCD to 7 Segment Display Controller
ABC D C0 C1 C2 C3 C4 C5 C6
0000 1 1 1 1 1 1 0
0001 0 1 1 0 0 0 0
0010 1 1 0 1 1 0 1
0011 1 1 1 1 0 0 1
0100 0 1 1 0 0 1 1
0101 1 0 1 1 0 1 1
0110 1 0 1 1 1 1 1
0111 1 1 1 0 0 0 0
1000 1 1 1 1 1 1 1
1001 1 1 1 0 0 1 1
1010 X X X X X X X
1011 X X X X X X X
1100 X X X X X X X
1101 X X X X X X X
1110 X X X X X X X
0111 X X X X X X X
230
Standard Devices
◦ Vpp and PGM are used when 2764 EPROM
programming 8K x 8
2764
VPP
PGM
A12
A11
A10 O7
A9 O6
A8 O5
A7 O4
A6 O3
A5 O2
A4 O1
A3 O0
A2
A1
A0
CS
OE
231
THANK YOU