Digital Electronics 3rd Sem
Digital Electronics 3rd Sem
NETHAJI MEMORIAL ARTS AND SCIENCE COLLEGE, Module 2- Combinational Logic Analysis and Design: Standard
NEMMARA representation of logic functions (SOP and POS), Karnaugh map
DEPARTMENT OF COMPUTER SCIENCE STUDY MATERIAL minimization. Multiplexers and Demultiplexers, Implementing
Class & Year of Admission Second Year CS- 2021 logic functions with multiplexer, Adder (half and full) and
Course with Code ELE3C03 Digital Electronics subtractor, Encoder and Decoder.
Semester 3
Hours per week 3 Module 3- Sequential logic design: Latch, Flip flop (FF), S-R FF,
Credits 3 J-K FF, T and D type FFs, Clocked FFs, Registers, Counters
Prepared By (Name of (synchronous and asynchronous, ring, modulo-N),Shift registers –
Shabana. M R
faculty) Serial and parallel
1|Page
Downloaded by Anjana Raj ([email protected])
lOMoARcPSD|48902121
9. By integrating system peripheral functions on a DSP chip, the reliability can An octal number system (base 8) is composed of eight digits (0, 1, 2, 3, 4, 5, 6, 7)
be enhanced and cost reduced. An octal number such as 2478 can be expressed in decimal equivalent by
10. When volumes are high, they can be manufactured at low cost. successive power of ‘8’.
11. The same digital system can be used with a variety of software for a number (247)8 = 2 × 82 + 4 × 81 + 7 × 80 = 16710 (decimal)
A binary number is composed of two binary digits, 0 and 1, and the number • Binary Decimal
system have base “2”. • Decimal Octal
Which are also called bits (e.g., 0 = low voltage, 1= high voltage). • Binary Octal
A binary number such as (11100)2 can be expressed in decimal equivalent by • Binary Hexadecimal
successive powers of ‘2’: • Decimal Hexadecimal
4 3 2 1 0
(11100)2 = 1 × 2 + 1 × 2 + 1 × 2 + 0 × 2 + 0 × 2 = 2810 (decimal) • Octal Hexadecimal
3|Page
Downloaded by Anjana Raj ([email protected])
lOMoARcPSD|48902121
4|Page
Downloaded by Anjana Raj ([email protected])
lOMoARcPSD|48902121
Short Division by Two with Remainder for integer part and add any number of 0’s in rightmost bit (or in least significant
Convert decimal number 25 into binary number, since given number is decimal bit) for fraction part for completing the group of 3 bit.
integer number, so by using above algorithm performing short division by 2 with Example-1 − Convert binary number 1010111100 into octal number. Since there
remainder.
is no binary point here and no fractional part.
5|Page
Downloaded by Anjana Raj ([email protected])
lOMoARcPSD|48902121
= (0110 011.1011)2 To convert a hexadecimal number to a binary number, convert each hexadecimal
= (0 110 011. 101 1 )2 digit to its four digit equivalent. For example, consider the hexadecimal number
= (110 011.101 100)2 (9AF)16 which is converted into a binary digit.
= (6 3.5 4)8
= (63.54)8
6|Page
Downloaded by Anjana Raj ([email protected])
lOMoARcPSD|48902121
10
7|Page
Downloaded by Anjana Raj ([email protected])
lOMoARcPSD|48902121
Convert (15E)16 into octal equivalent: to represent the magnitude of the binary number in the usual unsigned binary number
Convert 15E (Hex) into its binary equivalent; ie : format way.
(15E)16 = (0001) (0101) (1110) = (000101011110)2 Positive Signed Binary Numbers and Negative Signed Binary Numbers
Now forming the group of 3 binary bits to obtain its Octal equivalent:
Mathematical numbers are generally made up of a sign and a value (magnitude) in Complements are used in digital computers in order to simply the subtraction
which the sign indicates whether the number is positive, (+) or negative, (–) with operation and for the logical manipulations. For the Binary number (base-2)system,
the value indicating the size of the number, for example 23, +156 or -274. there are two types of complements: 1’s complement and 2’s complement.
We know that binary digits, or bits only have two values, either a “1” or a “0” and 1’s Complement of a Binary Number:
conveniently for us, a sign also has only two values, being a “+” or a “–“. The algorithm to convert a binary number into 1’s complement. To get 1’s
complement of a binary number, simply invert the given number.
8|Page
Downloaded by Anjana Raj ([email protected])
lOMoARcPSD|48902121
The algorithm to convert a binary number into 2’s complement. To get 2’s
complement of a binary number, simply invert the given number and add 1 to the
least significant bit (LSB) of given result.
Digital electronic circuits that operates on One or more input signals to produce an
output.
Logic gates contain two states which are ON or OFF , The ON means Logic “1”
and OFF means Logic “0” .
“Boolean algebra specifies the relationship between Boolean Variables which is
used to design combinational logic circuits using Logic gates”.
“The truth table used to represent the Boolean expression of a logic gate function
NOT gate :
called “Truth table”.
Universal gates :
9|Page
Downloaded by Anjana Raj ([email protected])
lOMoARcPSD|48902121
NOR gate :
10 | P a g e
Downloaded by Anjana Raj ([email protected])
lOMoARcPSD|48902121
Commutative Law
Distributive Law
De morgan’s theorem
De Morgan has suggested two theorems which are extremely useful in Boolean
Theorem 2
algebra. The two theorems are discussed below.
Theorem 1
• The LHS of this theorem represents a NOR gate with inputs A and B,
• The left hand side (LHS) of this theorem represents a NAND gate with inputs
whereas the RHS represents an AND gate with inverted inputs.
A and B, whereas the right hand side (RHS) of the theorem represents an OR
gate with inverted inputs. • This AND gate is called as Bubbled AND.
11 | P a g e
Downloaded by Anjana Raj ([email protected])
lOMoARcPSD|48902121
A B C
0 0 0
0 0 1
0 1 0
0 1 1
1 0 0
1 0 1
1 1 1
12 | P a g e
Downloaded by Anjana Raj ([email protected])
lOMoARcPSD|48902121
It is one of the ways of writing a Boolean expression. As the name suggests, it is As the name suggests, it is formed by multiplying(AND operation) the sum terms.
formed by adding (OR operation) the product terms. These product terms are also These sum terms are also called as ‘max-terms’. Max-terms are represented with
called as ‘min-terms’. Min-terms are represented with ‘m’, they are the ‘M’, they are the sum (OR operation) of Boolean variables either in normal form
product (AND operation) of Boolean variables either in normal form or or complemented form.
Therefore, SOP is sum of minterms and is represented as: F in SOP = ΠM(1, 2) Here, F is product of maxterm1 and maxterm2.
Here, F is sum of minterm0 and minterm3. A=1, B=1, C=1 Maxterm is A+B+C
13 | P a g e
Downloaded by Anjana Raj ([email protected])
lOMoARcPSD|48902121
Boolean functions are generally solved using Boolean postulates and theorems. It
is a time consuming process and we have to re-write the simplified expressions after
each step. To overcome this difficulty; Karnaugh introduced a method for
simplification of Boolean functions in an easy way. This method is known as
Karnaugh map method or K-map method. It is a graphical method, which consists • There is only one possibility of grouping 8 adjacent min terms.
of 2n cells for ‘n’ variables. The adjacent cells are differed only in single bit
• The possible combinations of grouping 4 adjacent min terms are {(m0, m1, m3,
position.
m2), (m4, m5, m7, m6), (m0, m1, m4, m5), (m1, m3, m5, m7), (m3, m2, m7, m6) and
(m2, m0, m6, m4)}.
14 | P a g e
Downloaded by Anjana Raj ([email protected])
lOMoARcPSD|48902121
m3), (m3, m2), (m2, m0), (m4, m5), (m5, m7), (m7, m6), (m6, m4), (m0, m4), Let us simplify the following Boolean function, F= Σm {W, X, Y, Z} = WX’Y’ +
(m1, m5), (m3, m7) and (m2, m6)}. WY + W’YZ’ using K-map.
The given Boolean function is in sum of products form. It is having 4 variables W,
• If x=0, then 3 variable K-map becomes 2 variable K-map.
X, Y & Z. So, we require 4 variable K-map. The 4 variable K-map with ones
4 Variable K-Map
corresponding to the given product terms is shown in the following figure.
The number of cells in 4 variable K-map is sixteen, since the number of variables
is four. The following figure shows 4 variable K-Map.
• The cells, which are common to the intersection of Row 4 and columns 1 &
2 are corresponding to the product term, WX’Y’.
• The cells, which are common to the intersection of Rows 3 & 4 and columns
• There is only one possibility of grouping 16 adjacent min terms. 3 & 4 are corresponding to the product term, WY.
• Let R1, R2, R3 and R4 represents the min terms of first row, second row, third • The cells, which are common to the intersection of Rows 1 & 2 and column
4 are corresponding to the product term, W’YZ’.
row and fourth row respectively. Similarly, C 1, C2, C3 and C4
represents the min terms of first column, second column, third column and There are no possibilities of grouping either 16 adjacent ones or 8 adjacent ones.
There are three possibilities of grouping 4 adjacent ones. After these three
fourth column respectively. The possible combinations of grouping 8
groupings, there is no single one left as ungrouped. So, we no need to check for
adjacent min terms are {(R1, R2), (R2, R3), (R3, R4), (R4, R1), (C1, C2), (C2,
grouping of 2 adjacent ones. The 4 variable K-map with these three groupings is
C3), (C3, C4), (C4, C1)}.
shown in the following figure.
• If w=0, then 4 variable K-map becomes 3 variable K-map.
15 | P a g e
Downloaded by Anjana Raj ([email protected])
lOMoARcPSD|48902121
• Two ones (m8 & m9) of fourth row grouping are not covered by any other
groupings. Only fourth row grouping covers those two ones.
• Single one (m15) of square shape grouping is not covered by any other
groupings. Only the square shape grouping covers that one.
• Two ones (m2 & m6) of fourth column grouping are not covered by any
other groupings. Only fourth column grouping covers those two ones.
Here, we got three prime implicants X + Y, Y + Z & Z + X. All these prime
Therefore, the simplified Boolean function is
implicants are essential because one zero in each grouping is not covered by any
F= WX’ + WY + YZ’ other groupings except with their individual groupings.
16 | P a g e
Downloaded by Anjana Raj ([email protected])
lOMoARcPSD|48902121
A half adder is a logical circuit that performs a addition operation on two binary From the truth table of the half adder we can see that the SUM (S) output is the
digits. The half adder produces a sum and a carry bit.
result of the Exclusive-OR gate and the Carry-out (Cout) is the result of
the AND gate. Then the Boolean expression for a half adder is as follows.
Full adder :
0+0 = 0
0+1 = 1 This adder is difficult to implement than a half-adder. The difference between a
1+0 = 1
half-adder and a full-adder is that the full-adder has three inputs and two outputs,
1+1 = 10
whereas half adder has only two inputs and two outputs. The first two inputs are A
and B and the third input is an input carry as C-in
17 | P a g e
Downloaded by Anjana Raj ([email protected])
lOMoARcPSD|48902121
18 | P a g e
Downloaded by Anjana Raj ([email protected])
lOMoARcPSD|48902121
Encoders:
One limitation of this encoder is that only one input can be active at any given time.
If more than one input is active, then the output is undefined. For example, if D6
and D3 are both active, then, our output would be 111 which is the output for D7.
To overcome this, we use Priority Encoders.
The truth table for implementing Octal to Binary or 8:3 Encoders A Display Decoder is a combinational circuit which decodes and n-bit input value
19 | P a g e
Downloaded by Anjana Raj ([email protected])
lOMoARcPSD|48902121
A standard 7-segment LED display generally has eight (8) input connections, one
for each LED segment and one that acts as a common terminal or connection for all
the internal display segments. Some single displays have also have an additional
7-Segment Display Format
input pin to display a decimal point in their lower right or left hand corner.
In electronics there are two important types of 7-segment LED digital display.
So in order to display the number “3” for example, segments
1. The Common Cathode Display (CCD) – In the common cathode display, a, b, c, d and g would need to be illuminated. If we wanted to display a different
all the cathode connections of the LED’s are joined together to logic “0” or number or letter then a different set of segments would need to be illuminated. Then
ground. The individual segments are illuminated by applicationof a “HIGH”, for a 7-segment display, we can produce a truth table giving the
logic “1” signal to the individual Anode terminals.
20 | P a g e
Downloaded by Anjana Raj ([email protected])
lOMoARcPSD|48902121
shown below. Binary Coded Decimal (BCD or “8421” BCD) numbers are made up using just 4
data bits (a nibble or half a byte) similar to the Hexadecimal numbers we saw in the
Individual Segments display Individual segments display binary tutorial, but unlike hexadecimal numbers that range in full from 0
a b c d e f g a b c d e f g through to F, BCD numbers only range from 0 to 9, with the binary number patterns
× × × × × × 0 × × × × × × × 8 of 1010 through to 1111 (A to F) being invalid inputs for this type of display and
× × 1 × × × × × × 9 so are not used as shown below.
× × × × × 2 × × × × × × a
Decimal Binary pattern BCD Decimal Binary pattern BCD
× × × × × 3 × × × × × b
8 4 2 1 8 4 2 1
× × × × 4 × × × × c
0 0 0 0 0 0 8 1 0 0 0 8
× × × × × 5 × × × × × d
1 0 0 0 1 1 9 1 0 0 1 9
× × × × × × 6 × × × × × e
2 0 0 1 0 2 10 1 0 1 0 Invalid
× × × 7 × × × × f
3 0 0 1 1 3 11 1 0 1 1 Invalid
4 0 1 0 0 4 12 1 1 0 0 Invalid
Truth Table for a 7-segment display
5 0 1 0 1 5 13 1 1 0 1 Invalid
6 0 1 1 0 6 14 1 1 1 0 Invalid
7 0 1 1 1 7 15 1 1 1 1 Invalid
It can be seen that to display any single digit number from 0 to 9 in binary or letters
from A to F in hexadecimal, we would require seven separate segmentconnections BCD to 7-Segment Display Decoders
plus one additional connection for the LED’s “common” connection. Also as the A binary coded decimal (BCD) to 7-segment display decoder such as the TTL
segments are basically a standard light emitting diode, the driving circuit would 74LS47 or 74LS48, have 4 BCD inputs and 7 output lines, one for each LED
need to produce up to 20mA of current to illuminate each individual segment and segment. This allows a smaller 4-bit binary number (half a byte) to be used to
to display the number “8”, all seven segments would need to be lit resulting a total display all the denary numbers from 0 to 9 and by adding two displays together; a
current of nearly 140mA, (8 x 20mA). full range of numbers from 00 to 99 can be displayed with just a single byte of eight
data bits.
21 | P a g e
Downloaded by Anjana Raj ([email protected])
lOMoARcPSD|48902121
Liquid crystal displays (LCD´s) have one major advantage over similar LED types
in that they consume much less power and nowadays, both LCD and LED displays
are combined together to form larger Dot-Matrix Alphanumeric type displays which
can show letters and characters as well as numbers in standard Red or Tri-colour
The use of packed BCD allows two BCD digits to be stored within a single byte outputs.
(8-bits) of data, allowing a single data byte to hold a BCD number in the range
Multiplexers and DE multiplexers:
of 00 to 99.
A multiplexer is a circuit that accept many input but give only one output, used to
An example of the 4-bit BCD input ( 0100 ) representing the number “4” is given
select and route any one of the several input signals to a signal output.
below.
Multiplexer handle two type of data that is analog and digital. For analog
Display Decoder Example No1 application, multiplexer are built of relays and transistor switches. For digital
application, they are built from standard logic gates.
The multiplexer used for digital applications, also called digital multiplexer, is a
circuit with many input but only one output. By applying control signals, we can
steer any input to the output. Few types of multiplexer are 2-to-1, 4-to-1, 8-to-1, 16-
to-1 multiplexer.
22 | P a g e
Downloaded by Anjana Raj ([email protected])
lOMoARcPSD|48902121
If the control input is changed to AB =11, all gates are disabled except the bottom
AND gate. In this case, D3 is transmitted to the output and Y = D3.
Understanding 4-to-1 Multiplexer:
The 4-to-1 multiplexer has 4 input bit, 2 control bits, and 1 output bit. The four Truth table
input bits are D0,D1,D2 and D3. only one of this is transmitted to the output y. The
Data select Output
output depends on the value of AB which is the control input. The control input
A B Y
determines which of the input data bit is transmitted to the output.
0 0 D0
For instance, as shown in fig. when AB = 00, the upper AND gate is enabled while
0 1 D1
all other AND gates are disabled. Therefore, data bit D0 is transmitted to the output,
1 0 D2
giving Y = Do.
1 1 D3
Applications of Multiplexer:
Multiplexer are used in various fields where multiple data need to be transmitted
using a single line. Following are some of the applications of multiplexers –
23 | P a g e
Downloaded by Anjana Raj ([email protected])
lOMoARcPSD|48902121
Demultiplexer:
Demultiplexer means one to many. A demultiplexer is a circuit with one input and
many output. By applying control signal, we can steer any input to the output. Few
types of demultiplexer are 1-to 2, 1-to-4, 1-to-8 and 1-to 16 demultiplexer.
The input bit is labelled as Data D. This data bit is transmitted to the data bit of
the output lines. This depends on the value of AB, the control input.
24 | P a g e
Downloaded by Anjana Raj ([email protected])
lOMoARcPSD|48902121
disabled. Therefore, only data bit D is transmitted to the output, giving Y1 = Data. work together to carry out the process of transmission and reception of data in
If D is low, Y1 is low. IF D is high,Y1 is high. The value of Y1 depends upon the communication system.
value of D. All other outputs are in low state. 3. ALU (Arithmetic Logic Unit) – In an ALU circuit, the output of ALU can be
If the control input is changed to AB = 10, all the gates are disabled except the third stored in multiple registers or storage units with the help of demultiplexer. The
AND gate from the top. Then, D is transmitted only to the Y2 output, and Y2 output of ALU is fed as the data input to the demultiplexer. Each output of
1. Demultiplexer is used to connect a single source to multiple destinations. The Sequential Logic Circuits
main application area of demultiplexer is communication system where Unlike combinational Logic circuits that change state depending upon the actual
multiplexer are used. Most of the communication system are bidirectional i.e. signals being applied to their inputs at that time, Sequential Logic circuits have
they function in both ways (transmitting and receiving signals). Hence, for most some form of inherent “Memory” built in.
of the applications, the multiplexer and demultiplexer work in sync. This means that sequential logic circuits are able to take into account their previous
Demultiplexer are also used for reconstruction of parallel data and ALU circuits. input state as well as those actually present, a sort of “before” and “after” effect is
2. Communication System – Communication system use multiplexer to carry involved with sequential circuits.
multiple data like audio, video and other form of data using a single line for
In other words, the output state of a “sequential logic circuit” is a function of the
transmission. This process make the transmission easier. The demultiplexer
following three states, the “present input”, the “past input” and/or the “past output”.
receive the output signals of the multiplexer and converts them back to the
Sequential Logic circuits remember these conditions and stay fixed in
25 | P a g e
Downloaded by Anjana Raj ([email protected])
lOMoARcPSD|48902121
sequential logic circuits “Memory”. This circuit has two inputs S & R and two outputs Q & Q’. The upper NOR gate
has two inputs R & complement of present state, Q’ and produces next state Q.
Sequential logic circuits are generally termed as two state or Bistable devices which
Similarly, the lower NOR gate has two inputs S & present state, Q and produces
can have their output or outputs set in one of two basic states, a logic level “1” or a
complement of next state, Q’.
logic level “0” and will remain “latched” (hence the name latch) indefinitely in this
We know that a 2-input NOR gate produces an output, which is the complement
current state or condition until some other input trigger pulse or signal is applied
of another input when one of the input is ‘0’. Similarly, it produces ‘0’ output,
which will cause the Bistable to change its state once again.
when one of the input is ‘1’.
The word “Sequential” means that things happen in a “sequence”, one after another
and in Sequential Logic circuits, the actual clock signal determines when things
will happen next. Simple sequential logic circuits can be constructed from standard
Bistable circuits such as: Flip-flops, Latches and Counters and whichthemselves
can be made by simply connecting together universal NAND Gates and/or NOR
Gates in a particular combinational way to produce the required sequential circuit.
The working of SR-Latch can be explained by its truth table of NOR gate:
THE SR-LATCH
Working of SR-Latch.
A Bistable multivibrator has two stable states, as indicated by the prefix bi in its
name. Typically, one state is referred to as set and the other as reset .The simplest Case I : if R=1, and S= 0; which produce Q= 0, and Q’= 1 : ie Latch is
Bistable device, therefore, is known as a SET-RESET or S-R, latch. To create an S- RESET because Q=0.
R latch, we can wire two NOR gate in such a way that the output of one feeds back If we remove the input ,as R=0, and S=0 : the previous condition of Q and Q’
to the input of another, and vice versa, like this. sustain. Which consider as the latch is Memory state.
If we remove the input, as R=0, and S=0 : the Latch remain in SET condition.
Which consider as the latch is Memory state.
or
26 | P a g e
Downloaded by Anjana Raj ([email protected])
lOMoARcPSD|48902121
Similarly if the both inputs are ‘0’, The latch hold the previous condition of the
latch when it turned ON.
The status of SR-Latch using NOR can be realise using the table given below: This circuit is formed by adding two NAND gates to NAND based SR flip – flop.
The inputs are active high as the extra NAND gate inverts the inputs. A clock
pulse is given as input to both the extra NAND gates.
Hence the transition of the clock pulse is a key factor in functioning of this
device.
The above Clocked SR flip flop is designed using NAND gate, first of all ,the
truth table of NAND gate shows any of the input have LOW or ‘logic 0’ the
The SR-Latch using NAND has some different at which the R and S inputs of output become ‘1’.
NOR SR latch is replaced by S and R.
27 | P a g e
Downloaded by Anjana Raj ([email protected])
lOMoARcPSD|48902121
Clock S R Q Q’
0 X X MEMORY
1 0 0 MEMORY
1 0 1 0 1
1 1 0 1 0
1 1 1 NOT USED
If S* = R* = 1 , the flip-flop remain in Memory state. to produce another type of flip flop circuit known as a Data Latch, Delay flip flop,
D-type Bistable, D-type Flip Flop or just simply a D Flip Flop as it is more
Case 3 : If clock =1 ,and S=0 , R= 1 ; S* = 1 and R* = 0 .
generally called.
If S* = 1 and R* = 0 then Q = 0 , Q’ = 1 (Flip flop in RESET)
The D-type flip flop is constructed from a gated SR flip-flop with an inverter added
Case 4 : If clock =1 ,and S=1 , R= 0 ; S* = 0 and R* = 1 . between the S and the R inputs to allow for a single D (Data) input.
If S* = 0 and R* = 1 then Q = 1 , Q’ = 0 (Flip flop in SET) Then this single data input, labelled “D” and is used in place of the “Set” signal,
and the inverter is used to generate the complementary “Reset” input thereby
Case 5 : If clock =1 ,and S=1 , R= 1 ; S* = 0 and R* = 0 .
making a level-sensitive D-type flip-flop from a level-sensitive SR-latch as now S
If S* = 0 and R* = 0 then Q and , Q’ become unpredictable and not = D and R = not D as shown.
used.
28 | P a g e
Downloaded by Anjana Raj ([email protected])
lOMoARcPSD|48902121
CLK D Q Q’ Description
0 X Q Q’ Memory no change
1 0 0 1 RESET
1 1 1 0 SET
We remember that a simple SR flip-flop requires two inputs, one to “SET” the
output and one to “RESET” the output. By connecting an inverter (NOT gate) to
the SR flip-flop we can “SET” and “RESET” the flip-flop using just one input as The JK Flip Flop
now the two input signals are complements of each other. This complement avoids
The JK Flip-flop is similar to the SR Flip-flop but there is no change in state when
the ambiguity inherent in the SR latch when both inputs are LOW, since that state
the J and K inputs are both LOW The basic S-R NAND flip-flop circuit has many
is no longer possible.
advantages and uses in sequential logic circuits but it suffers from two basic
Thus this single input is called the “DATA” input. If this data input is held HIGH switching problems.
the flip flop would be “SET” and when it is LOW the flip flop would change and
1. The Set = 0 and Reset = 0 condition (S = R = 0) must always be avoided
become “RESET”. However, this would be rather pointless since the output of the
2. If Set or Reset change state while the enable (EN) input is high the correct
flip flop would always change on every pulse applied to this data input.
latching action may not occur
To avoid this an additional input called the “CLOCK” or “ENABLE” input is used
Then to overcome these two fundamental design problems with the SR flip-flop
to isolate the data input from the flip flop’s latching circuitry after the desired data
design, the JK flip Flop was developed.
has been stored. The effect is that D input condition is only copied to the output Q
when the clock input is active. This then forms the basis of another sequential device This simple JK flip Flop is the most widely used of all the flip-flop designs and is
called a D Flip Flop. considered to be a universal flip-flop circuit. The two inputs labelled “J” and “K” is
not shortened abbreviated letters of other words, such as “S” for Set and “R” for
The “D flip flop” will store and output whatever logic level is applied to its data
Reset, but are themselves autonomous letters chosen by its inventor Jack Kilby to
terminal so long as the clock input is HIGH. Once the clock input goes LOW the
distinguish the flip-flop design from other types.
29 | P a g e
Downloaded by Anjana Raj ([email protected])
lOMoARcPSD|48902121
SR flip-flop with the same “Set” and “Reset” inputs. The difference this time is that two inputs are now interlocked.
the “JK flip flop” has no invalid or forbidden input states of the SR Latch even If the circuit is now “SET” the J input is inhibited by the “0” status of Q through
when S and R are both at logic “1”. the lower NAND gate. If the circuit is “RESET” the K input is inhibited by the “0”
The JK flip flop is basically a gated SR flip-flop with the addition of a clock input status of Q through the upper NAND gate. As Q and Q are always different we can
circuitry that prevents the illegal or invalid output condition that can occur when use them to control the input. When both inputs J and K are equal to logic “1”, the
both inputs S and R are equal to logic level “1”. Due to this additional clocked input, JK flip flop toggles as shown in the following truth table.
a JK flip-flop has four possible input combinations, “logic 1”, “logic 0”,“no
change” and “toggle”. The symbol for a JK flip flop is similar to that of an SR The Truth Table for the JK Function
Bistable Latch as seen in the previous tutorial except for the addition of a clock
input.
Then the JK flip-flop is basically an SR flip flop with feedback which enables only
one of its two input terminals, either SET or RESET to be active at any one time
thereby eliminating the invalid condition seen previously in the SR flip flop circuit.
Also when both the J and the K inputs are at logic level “1” at the same time, and
the clock input is pulsed “HIGH”, the circuit will “toggle” from its SET state to a
Both the S and the R inputs of the previous SR Bistable have now been replaced by RESET state, or visa-versa. This result in the JK flip flop acting more like a T- type
two inputs called the J and K inputs, respectively after its inventor Jack Kilby. Then toggle flip-flop when both terminals are “HIGH”.
this equates to: J = S and K = R.
Although this circuit is an improvement on the clocked SR flip-flop it still suffers
The two 2-input AND gates of the gated SR Bistable have now been replaced by from timing problems called “race” if the output Q changes state before the timing
two 3-input NAND gates with the third input of each gate connected to the outputs
at Q and Q. This cross coupling of the SR flip-flop allows the previously invalid
30 | P a g e
Downloaded by Anjana Raj ([email protected])
lOMoARcPSD|48902121
T flip – flop
T flip – flop is also known as “Toggle Flip – flop”. To avoid the occurrence of
intermediate state in SR flip – flop, we should provide only one input to the flip –
flop called Trigger input or Toggle input (T). Then the flip – flop acts as a Toggle As mentioned earlier, T flip – flop is an edge triggered device. For example,
switch. Toggling means ‘Changing the next state output to complement of the consider a T flip – flop made of NAND SR latch as shown below.
present state output’. If the output Q = 0, then the upper NAND is in enable state and lower NAND gate
We can design the T flip – flop by making simple modifications to the JK flip – is in disable condition. This allows the trigger to pass the S inputs to make the flip
flop. The T flip – flop is a single input device and hence by connecting J and K – flop in SET state i.e. Q = 1.
inputs together and giving them with single input called T we can convert a JK flip If the output Q = 1, then the upper NAND is in disable state and lower NAND gate
– flop into T flip – flop. So a T flip – flop is sometimes called as single input JK is in enable condition. This allows the trigger to pass the R inputs to make theflip –
flip – flop. flop in RESET state i.e. Q =0.
The logic symbol of T flip – flop is shown below. It has one Toggle input (T) & one In simple terms, the operation of the T flip – flop is
clock signal input (CLK). When the T input is low, then the next sate of the T flip flop is same as the present
state.
When the T input is high and during the positive transition of the clock signal, the
Working
next state of the T flip – flop is the inverse of present state.
T flip – flop is an edge triggered device i.e. the low to high or high to low transitions
on a clock signal of narrow triggers that is provided as input will cause the change
• T = 1 and present state = 0 then the next state = 1
in output state of flip – flop.
• T = 1 and present state = 1 then the next state = 0
31 | P a g e
Downloaded by Anjana Raj ([email protected])
lOMoARcPSD|48902121
toggles. So to complete one full cycle of output wave form it need two triggers. This formed by connecting n flip-flops where each flip flop stores a single bit of data.
means that the T flip flop produces the output at exactly half of the frequency of Shift registers are basically of 4 types. These are:
input frequency. So a T flip – flops will act as “Frequency Divider Circuit”. 1. Serial In Serial Out shift register
The main disadvantage of T flip – flop is that the state of the flip – flop at an applied 2. Serial In parallel Out shift register
trigger pulse is known only when the previous state is known. 3. Parallel In Serial Out shift register
SHIFT REGISTERS 4. Parallel In parallel Out shift register
A register capable of shifting its binary information in one or both directions is Serial-In Serial-Out Shift Register (SISO)
called a shift register. The logical configuration of a shift register consist of a chain The shift register, which allows serial input (one bit after the other through a single
of flip-flop is cascade, with the output of one flip-flop connected to theinput data line) and produces a serial output is known as Serial-In Serial-Out shiftregister.
of the next flip-flop. All flip-flops receive common clock pulses that initiate the Since there is only one output, the data leaves the shift register one bit ata time in
shift from one stage to the next. a serial pattern, thus the name Serial-In Serial-Out Shift Register.
The logic circuit given below shows a serial-in serial-out shift register. The circuit
consists of four D flip-flops which are connected in a serial manner. All these flip-
flops are synchronous with each other since the same clock signal is applied to each
flip flop.
A shift register basically consists of several single bit “D-Type Data Latches”, one
for each data bit, either a logic “0” or a “1”, connected together in a serial type
daisy-chain arrangement so that the output from one data latch becomes the input
of the next latch and so on.
The information stored within these registers can be transferred with the help The above circuit is an example of shift right register, taking the serial data input
of shift registers. Shift Register is a group of flip flops used to store multiple bits from the left side of the flip flop. The main use of a SISO is to act as a delay element.
of data. The bits stored in such registers can be made to move within the registers
32 | P a g e
Downloaded by Anjana Raj ([email protected])
lOMoARcPSD|48902121
The shift register, which allows serial input (one bit after the other through a single The shift register, which allows parallel input (data is given separately to each flip
data line) and produces a parallel output, is known as Serial-In Parallel-Out shift flop and in a simultaneous manner) and produces a serial output is known as
The logic circuit given below shows a serial-in-parallel-out shift register. The The logic circuit given below shows a parallel-in-serial-out shift register. The circuit
circuit consists of four D flip-flops which are connected. The clear (CLR) signal is consists of four D flip-flops which are connected. The clock input is directly
connected in addition to the clock signal to all the 4 flip flops in order to RESET connected to all the flip flops but the input data is connected individually to each
them. The output of the first flip flop is connected to the input of the next flip flop flip flop through a multiplexer at the input of every flip flop. The output of the
and so on. All these flip-flops are synchronous with each other since the same clock previous flip flop and parallel data input are connected to the input of the MUX
signal is applied to each flip flop. and the output of MUX is connected to the next flip flop. All these flip- flops are
synchronous with each other since the same clock signal is applied to each flip flop.
The above circuit is an example of shift right register, taking the serial data input
from the left side of the flip flop and producing a parallel output. They are used in
communication lines where de-multiplexing of a data line into several parallel lines
is required because the main use of the SIPO register is to convert serial data into
A Parallel in Serial out (PISO) shift register us used to convert parallel data to serial
parallel data.
data.
33 | P a g e
Downloaded by Anjana Raj ([email protected])
lOMoARcPSD|48902121
A Parallel in Parallel out (PIPO) shift register is used as a temporary storage device
and like SISO Shift register it acts as a delay element.
34 | P a g e
Downloaded by Anjana Raj ([email protected])
lOMoARcPSD|48902121
Cache Memory
Cache memory is a very high speed semiconductor memory which can speed up
the CPU. It acts as a buffer between the CPU and the main memory. It is used to
hold those parts of data and program which are most frequently used by the CPU.
The advantages of cache memory are as follows –
• Cache memory is faster than main memory.
• It consumes less access time as compared to main memory.
• It stores the program that can be executed within a short period of time.
• It stores data for temporary use.
First ,assume that the counter is initially in the binary 0 state; that is ,both flip- flops
are RESET .When the positive edge of the first clock pulse is applied,FF0
35 | P a g e
Downloaded by Anjana Raj ([email protected])
lOMoARcPSD|48902121
• Cache memory has limited capacity. • These are magnetic and optical memories.
Secondary Memory
36 | P a g e
Downloaded by Anjana Raj ([email protected])
lOMoARcPSD|48902121
• It is also called as read write memory or the main memory or the primary 1. PROM (Programmable read-only memory) – It can be programmed by user.
• The programs and data that the CPU requires during execution of a program 2. EPROM (Erasable Programmable read only memory) – It can be
are stored in this memory. reprogrammed. To erase data from it, expose it to ultra violet light. To
• It is a volatile memory as the data loses when the power is turned off. reprogram it, erase all the previous data.
• RAM is further classified into two types- SRAM (Static Random Access 3. EEPROM (Electrically erasable programmable read only memory) – The
Memory) and DRAM (Dynamic Random Access Memory). data can be erased by applying electric field, no need of ultra violet light. We
can erase only portions of the chip.
37 | P a g e
Downloaded by Anjana Raj ([email protected])
lOMoARcPSD|48902121
38 | P a g e
Downloaded by Anjana Raj ([email protected])