Module 5 Backbencher - Club
Module 5 Backbencher - Club
Module 5 Backbencher - Club
Structure
5.0 Introduction
5.1 Objectives
5.2 Switching and Logic Levels
5.3 Digital Waveform
5.4 Number Systems:
5.4.1 Decimal Number System,
5.4.2 Binary Number System,
5.4.3 Converting Decimal to Binary
5.4.4 Hexadecimal Number System
5.4.5 Converting Binary to Hexadecimal & Vice versa
5.4.6 Converting Hexadecimal to Decimal & Vice versa
5.4.7 Octal Number System
5.4.8 Octal to Binary & Binary to octal Conversion
5.5 Complement of Binary Numbers
5.6 Boolean Algebra Theorems
5.7 Digital Circuits
5.7.1 Logic gates
5.7.2 Algebraic Simplification
5.7.3 NAND and NOR Implementation
5.7.4 Half adder & Full adder
5.8 Flip Flops
5.8.1 S R Flip Flop
5.8.2 J K Flip Flop
5.8.3 Shift Register
5.8.4 Binary Counter
5.9 Principle of Communication system
Course outcome
5.11 Further Reading
5.0 INTRODUCTION:
5.1 OBJECTIVES
1. To Understand the Number systems and conversion of one Number system to other
2. To define a Logic gate and understand the different types of Logic Gates
3. To state different laws of Boolean Algebra
4. Simplify the Logical expressions using Boolean algebra and implement using Universal
Gates
5. Design and implementation of Half adder and Full adder
In digital circuits, a logic level is one of a finite number of states that a signal can have. Logic levels are
usually represented by the voltage difference between the signal and ground (or some other common
reference point), although other standards exist. The range of voltage levels that represents each state
depends on the logic family being used.
In binary logic the two levels are logical high and logical low, which generally correspond to a binary 1
and 0 respectively. Signals with one of these two levels can be used in boolean logic for digital circuit
design or analysis.
In three-state logic, an output device can also be high impedance. This is not a logic level, but means
that the output is not controlling the state of the connected circuit.
= radix or base
n = number of integer digits to the left of the radix point
m = number of fractional digits to the right of the radix point
an-1 = most significant digit (MSD)
a-m = least significant digit (LSD)
Example:
plus 9 times 1/100 = The number is 1954.89 in decimal. and is represented by (1954.89)10. The digits
In the binary system, there are only two symbols or possible digit values, 0 and 1. This base-
2 system can be used to represent any quantity that can be represented in decimal or other
base system.
Integer part Fractional part
3 2 1 0 -1
2 2 2 2 2 2-2 2-3
=8 =4 =2 =1 . =0.5 =0.25 =0.125
Least
Most Significant Digit Binary point Significant Digit
Binary Counting
The Binary counting sequence to represent decimal numbers is shown in the table below :
23 22 21 20 Decimal
0 0 0 0 0
0 0 0 1 1
0 0 1 0 2
0 0 1 1 3
0 1 0 0 4
0 1 0 1 5
0 1 1 0 6
0 1 1 1 7
1 0 0 0 8
1 0 0 1 9
1 0 1 0 10
1 0 1 1 11
1 1 0 0 12
1 1 0 1 13
1 1 1 0 14
1 1 1 1 15
Example: Subtract the binary numbers 11011 from100101. Sol: The binary subtraction process is
indicated below,
The answer is : (100101) 2 - (11011) 2 = ( 01010) 2
The weight is the position of the bit, starting from 0 on the right Add the results
Example:
Binary Decimal
101101012
27+06+25+24+03+22+01+20 =128+0+32+16+0+4+0+1
Result 18110
You should have noticed that the method is to find the weights (i.e., powers of 2) for each bit position
that contains a 1, and then to add them up.
Binary to decimal Fractions:
Example :
10.1011 =>
1 x 2-1 = 0.5
0 x 20 = 0.0
1 x 21 = 2.0 =2.6875
The hexadecimal system uses base 16. Thus, it has 16 possible digit symbols. It uses the digits 0 through
9 plus the letters A, B, C, D, E, and F ,to represent 10 through 16, as the 16 digit symbols Digits = {0, 1,
2, 3, 4, 5, 6, 7, 8, 9, A, B, C, D, E, F}
Sometimes, it is necessary to use a numbering system that has more than ten base digits One such
numbering system is hexadecimal number system, useful in computer application. Hexadecimal number,
is widely used in micro processors and micro controllers in assembly programming, and in embedded
system development.
Hexadecimal addition and subtraction: Examples of addition and subtraction in this number
system is shown below:
Addition
1011 Carries
5 BA9 Augend
+ D 0 5 8 Addend 1 2 C 0
1 Sum
Subtraction
9 10 A 10 Borrows
A 5 B 9 Minuend
+ 5 8 0 D Subtrahend
1 D A C Difference
5.4.5 BINARY-TO-HEXADECIMAL /HEXADECIMAL-TO-BINARY CONVERSION
Hexadecimal Digit 0 1 2 3 4 5 6 7
Binary Equivalent 0000 0001 0010 0011 0100 0101 0110 0111
Hexadecimal Digit 8 9 A B C D E F
Binary Equivalent 1000 1001 1010 1011 1100 1101 1110 1111
Each Hexadecimal digit is represented by four bits of binary digit
5.4.5 HEXADECIMAL TO DECIMAL/DECIMAL TO HEXADECIMAL CONVERSION
The weight is the position of the bit, starting from 0 on the right
Add the results
Example:
Decimal To Hexadecimal
Repeat Division- Convert decimal to hexadecimal - This method uses repeated division by 16.
Example: convert 37810 to hexadecimal and binary:
Division Result Hexadecimal
378/16 = 23+ remainder of 10 A (Least Significant Bit)23
23/16 = 1 + remainder of 7 7
1/16 = 0 + remainder of 1 1 (Most Significant Bit)
Result 37810 = 17A16
Binary = 0001 0111 10102
The octal number system has a base of eight, meaning that it has eight possible
digits: 0,1,2,3,4,5,6,7.
83 82 81 80 8-1 8-2 8-3
=512 =64 =8 =1 . =1/8 =1/64 =1/512
The octal numbering system includes eight base digits (0-7).After 7, the next placeholder to the
right begins with a “1”
0, 1, 2, 3, 4, 5, 6, 7, 10, 11, 12, 13 ...
1
) = 20.7510 11.18 = 1 x (81) + 1 x (80) + 1 x (8-1) = 9.12510 12.38 = 1 x (81) + 2
Subtraction of first column 1-3= 6,by borrowing carry from previous stage 1+8= 9, hence 9-
3=6
Subtraction of second column 4-4= 0,now after the barrow 5 becomes 4 in II column.
Subtraction of third column 4-6= 6, by borrowing from previous stage, 8+4=12, Hence 12-6 = 6
Subtraction of fourth column 6-5= 1, 7 will become 6 after a barrow to the right. The answer is :
(7451) 8 - (5643) 8 = ( 1606) 8
Binary to octal
Group 3 Bits and write its corresponding octal equivalent
Example: 100 111 0102 = (100) (111) (010)2 = 4 7 28
Octal to Binary
Octal 0 1 2 3 4 5 6 7
Binary
000 001 010 011 100 101 110 111
Equivalent
The 1„s complement of a given binary no. is the new no. obtained by changing all the 0„ to 1, and
all 0„s to 1
Ex : 11010„s 1„s complement is 00101
The 2„s complement of a given binary no. is the new no. obtained by changing all the 0„ to 1, and
all 0„s to 1 and then adding 1 to the least significant it
Ex : 11010„s 2„s complement is 1„s complement 00101+1=00110 Subtraction of smaller number
from larger number
Method:
1. Determine the 1„s complement of the smaller no.
2. Add the first complement to the larger no.
3. Remove the carry and add it to the result. This is called end-around carry.
Ex : Subtract 1010112 from 1110012 using the 1„s complement method Solution :
111001
-101011 - Take 1„s complement of101011 = 010100 -------------
111001 + 010100
-----------------Carry 1) 001101
------- --+1 - end around carry -------------------
1110 Final answer
Subtraction of larger number from smaller number
Method :
1. Determine the first complement of the larger no.
2. Add the first complement to the smaller no.
3. Answer is in the 1„s complement form.To get the answer in true form take the 1„s complement
and assign –ve sign to the answer.
Advantages of 1’s complement method
1. The first complement subtraction can be accomplished with a binary adder. There fore,
this method is useful in arithmetic logic circuits.
2. The first complement of a no. is easily obtained by inverting each bit in the no.
2’s complement method of subtraction
Subtraction of smaller number from larger number
Method:
1. Determine the 2„s complement of a smaller no.
2 Add the 2„s complement to the larger no.
3 Discard the carry.
Subtract 1010112 from 1110012 using the 1„s complement method
Solution :
111001
-101011 -
Take 2„s complement of101011 = 1„s complement+1=010100+1 ------------- =010101
111001 + 010101
-----------------
Carry 1) 001110------- discard the carry -------------------
1110 Final answer
Subtraction of larger number from smaller number
Method:
1. Determine the 2„s complement of a larger no.
2 Add the 2„s complement to the smaller no.
3 When there is no carry, answer is in the 2„s complement form.
To get the answer in the true form take the 2„s complement and assign –ve sign to the
answer.
Ex :Subtract 1110012 from1010112 using the 1„s complement method Solution :
101011
-111001 - Take 2„s complement of111001 = 1„s complement+1=000110+1 -------------
=000111
101011 + 000111
-----------------
110010------- no carry generated,hence take 2„s complement of the result -------------------
and attach –ve sign to it.i.e 001101+1=001110
001110
Therefore the answer is -0011
Symbolic Logic
Boolean algebra derives its name from the mathematician George Boole. Symbolic Logic uses values,
variables and operations
True is represented by the value 1. False is represented by the value 0.:
Variables are represented by letters and can have one of two values, either 0 or 1. Operations are
functions of one or more variables
A logic gate is an electronic circuit/device which makes the logical decisions. To arrive at this
decisions, the most common logic gates used are OR, AND, NOT, NAND, and NOR gates. The
NAND and NOR gates are called universal gates. The exclusive-OR gate is another logic gate
which can be constructed using AND, OR and NOT gate.
Logic gates have one or more inputs and only one output. The output is active only for certain
input combinations. Logic gates are the building blocks of any digital circuit. Logic gates are also
called switches. With the advent of integrated circuits, switches have been replaced by
TTL (Transistor Transistor Logic) circuits and CMOS circuits. Here I give example circuits on
how to construct simples gates.
Symbolic Logic
Boolean algebra derives its name from the mathematician George Boole. Symbolic Logic uses
values, variables and operations.
Inversion
A small circle on an input or an output indicates inversion. See the NOT, NAND and NOR gates
given below for examples.
Two input AND gate using "diode-resistor" logic is shown in Figure below, where X, Y are inputs and F
is the output
If X = 0 and Y = 0, then both diodes D1 and D2 are forward biased and thus both diodes conduct and
pull F low.
If X = 0 and Y = 1, D2 is reverse biased, thus does not conduct. But D1 is forward biased, thus conducts
and thus pulls F low
If X = 1 and Y = 0, D1 is reverse biased, thus does not conduct. But D2 is forward biased, thus conducts
and thus pulls F low.
If X = 1 and Y = 1, then both diodes D1 and D2 are reverse biased and thus both the diodes are in cut-off
and thus there is no drop in voltage at F. Thus F is HIGH.
Switch Representation of AND Gate
In the Figure below, X and Y are two switches which have been connected in series (or just cascaded)
with the load LED and source battery. When both switches are closed, current flows to LED.
inputs and single output. The output of OR gate is HIGH only when any one of its inputs are HIGH (i.e.
even if one input is HIGH, Output will be HIGH)
If X and Y are two inputs, then output F can be represented mathematically as F = X+Y. Here plus sign
(+) denotes the OR operation. Truth table and symbol of the OR gate is shown in the Figure below.
Symbol
0 1 1
1 0 1
1 1 1
Circuit
If X = 0 and Y = 0, then both diodes D1 and D2 are reverse biased and thus both the diodes are in cut-off
and thus F is low
If X = 0 and Y = 1, D1 is reverse biased, thus does not conduct. But D2 is forward biased, thus conducts
and thus pulling F to HIGH.
If X = 1 and Y = 0, D2 is reverse biased, thus does not conduct. But D1 is forward biased, thus conducts
and thus pulling F to HIGH.
If X = 1 and Y = 1, then both diodes D1 and D2 are forward biased and thus both the diodes conduct and
thus F is HIGH.
Switch Representation of OR Gate
In the Figure, X and Y are two switches which have been connected in parallel, and this is connected in
series with the load LED and source battery. When both switches are open, current does not flow to
LED, but when any switch is closed then current flows.
NOT gate using "transistor-resistor" logic is shown in the Figure below, where X is the input and F is the
output
NAND Gate
NAND gate is a cascade of AND gate and NOT gate, as shown in the Figure below. It has two or more
inputs and only one output. The output of NAND gate is HIGH when any one of its input is LOW (i.e.
even if one input is LOW, Output will be HIGH).
NAND From AND and NOT
Truth table
X Y F
0 0 1
0 1 1
1 0 1
1 1 1
NOR Gate
NOR gate is a cascade of OR gate and NOT gate, as shown in the Figure below. It has two or more
inputs and only one output. The output of NOR gate is HIGH when any all its inputs are LOW (i.e. even
if one input is HIGH, output will be LOW)
Symbol
XOR Gate
An Exclusive-OR (XOR) gate is gate with two or three or more inputs and one output. The output of a
two-input XOR gate assumes a HIGH state if one and only one input assumes a HIGH state. This is
equivalent to saying that the output is HIGH if either input X or input Y is HIGH exclusively, and LOW
when both are 1 or 0 simultaneously
If X and Y are two inputs, then output F can be represented mathematically as F = X Y, Here denotes
the XOR operation. X Y and is equivalent to X.Y' + X'.Y. Truth table and symbol of the XOR gate is
shown in the Figure below
Symbol
XNOR Gate
An Exclusive-NOR (XNOR) gate is gate with two or three or more inputs and one output. The output of
a two-input XNOR gate assumes a HIGH state if all the inputs assumes same state. This is equivalent to
saying that the output is HIGH if both input X and input Y is HIGH exclusively or same as input X and
input Y is LOW exclusively, and LOW when both are not same.
If X and Y are two inputs, then output F can be represented mathematically as F= X Y, Here denotes
the XNOR operation. X Y and is equivalent to X.Y + X'.Y'. Truth table and symbol of the XNOR gate
is shown in the Figure below.
Symbol
Truth Table
X Y F=(X Y)'
0 0 1
0 1 0
1 0 0
1 1 1
Universal Gates
Universal gates are the ones which can be used for implementing any gate like AND, OR and NOT, or
any combination of these basic gates; NAND and NOR gates are universal gates. But there are some
rules that need to be followed when implementing NAND or NOR based gate
To facilitate the conversion to NAND and NOR logic, we have two new graphic symbols for these gates
NAND Gate
NOR Gate
Any logic function can be implemented using NAND gates. To achieve this, first the logic function has
to be written in Sum of Product (SOP) form. Once logic function is converted to SOP, then is very easy
to implement using NAND gate. In other words any logic circuit with AND gates in first level and OR
gates in second level can be converted into a NAND-NAND gate circuit.
Consider the following SOP expression
F = W.X.Y + X.Y.Z + Y.Z.
The above expression can be implemented with three AND gates in first stage and one OR gate in
second stage as shown in Figure
If bubbles are introduced at AND gates output and OR gates inputs (the same for NOR gates), the above
circuit becomes as shown in Figure
Now replace OR gate with input bubble with the NAND gate. Now we have circuit which is fully
implemented with just NAND gates.
Any logic function can be implemented using NOR gates. To achieve this, first the logic function has to
be written in Product of Sum (POS) form. Once it is converted to POS, then it's very easy to implement
using NOR gate. In other words any logic circuit with OR gates in first level and AND gates in second
level can be converted into a NOR-NOR gate circuit.
If bubble are introduced at the output of the OR gates and the inputs of AND gate, the above circuit
becomes as shown in Figure.
Now replace AND gate with input bubble with the NOR gate. Now we have circuit which is fully
implemented with just NOR gates.
Output Rule
((X+X)'+(Y+Y)')' =(X'+Y')' Idempotent
= X''.Y'' DeMorgan
= (X.Y) Involution
= X+Y Involution
Arithmetic circuits are the ones which perform arithmetic operations like addition, subtraction,
multiplication, division, parity calculation. Most of the time, designing these circuits is the same as
designing muxers, encoders and decoders.
In the next few pages we will see few of these circuits in detail.
Adders are the basic building blocks of all arithmetic circuits; adders add two binary numbers and give
out sum and carry as output. Basically we have two types of adders
Half Adder
Adding two single-bit binary values X, Y produces a sum S bit and a carry out C-out bit. This operation
is called half addition and the circuit to realize it is called a half adder.
Truth Table
X Y SUM CARRY
0 0 0 0
0 1 1 0
1 0 1 0
1 1 0 1
Dept. of Basic Science & Humanities, ATMECE Page 32
BASIC ELECTRONICS 18ELN14/24
Symbol
S (X,Y) = (1,2)
S = X'Y + XY'
S=X Y
CARRY(X,Y) = (3)
CARRY = XY
Circuit
Full Adder
Full adder takes a three-bits input. Adding two single-bit binary values X, Y with a carry input bit C-in
produces a sum bit S and a carry out C-out bit.
Truth Table
X Y Z SUM CARRY
0 0 0 0 0
0 0 1 1 0
0 1 0 1 0
0 1 1 0 1
1 0 0 1 0
1 0 1 0 1
1 1 0 0 1
1 1 1 1 1
SUM (X,Y,Z) = (1,2,4,7)
CARRY (X,Y,Z) = (3,5,6,7)
Full Adder using AND-OR
The below implementation shows implementing the full adder with AND-OR gates, instead of
using XOR gates. The basis of the circuit below is from the above Kmap.
Circuit-SUM
Circuit-CARRY
Circuit-CARRY
5.8 FLIPFLOPS
Latches and flip-flops are the basic elements for storing information. One latch or flip-flop can store one
bit of information. The main difference between latches and flip-flops is that for latches, their outputs
Dept. of Basic Science & Humanities, ATMECE Page 34
BASIC ELECTRONICS 18ELN14/24
are constantly affected by their inputs as long as the enable signal is asserted. In other words, when they
are enabled, their content changes immediately when their inputs change. Flip-flops, on the other hand,
have their content change only either at the rising or falling edge of the enable signal. This enable signal
is usually the controlling clock signal. After the rising or falling edge of the clock, the flip-flop content
remains constant even if the input changes. There are basically four main types of latches and flip-flops:
SR, D, JK, and T. The major differences in these flip-flop types are the number of inputs they have and
how they change state. For each type, there are also different variations that enhance their operations.
The simplest sequential circuit or storage element is a bistable element, which is constructed with two
inverters connected sequentially in a loop as shown in Figure . It has no inputs and two outputs labeled
Q and Q‟. Since the circuit has no inputs, we cannot change the values of Q and Q‟. However, Q will
take on whatever value it happens to be when the circuit is first powered up. Assume that Q = 0 when
we switch on the power. Since Q is also the input to the bottom inverter, Q‟, therefore, is a 1. A 1 going
to the input of the top inverter will produce a 0 at the output Q, which is what we started off with.
Similarly, if we start the circuit with Q = 1, we will get Q‟ = 0, and again we get a stable situation. A
bistable element has memory in the sense that it can remember the content (or state) of the circuit
indefinitely. Using the signal Q as the state variable to describe the state of the circuit, we can say that
the circuit has two stable states: Q = 0, and Q = 1; hence the name “bistable.”
5.8.1 S R FLIPFLOP
The R-S (Reset Set) flip flop is the simplest flip flop of all and easiest to understand. It is basically a
device which has two outputs one output being the inverse or complement of the other, and two inputs.
A pulse on one of the inputs to take on a particular logical state. The outputs will then remain in this
state until a similar pulse is applied to the other input. The two inputs are called the Set and Reset input
(sometimes called the preset and clear inputs).
Such flip flop can be made simply by cross coupling two inverting gates either NAND or NOR gate
could be used Figure (a) shows on RS flip flop using NAND gate and Figure (b) shows the same circuit
using NOR gate
Figure : Latch R-S Flip Flop Using NAND and NOR Gates
To describe the circuit of Figure 4.6(a), assume that initially both R and S are at the logic 1 state and
that output is at the logic 0 state.
Now, if Q = 0 and R = 1, then these are the states of inputs of gate B, therefore the outputs of gate B is
at 1 (making it the inverse of Q i.e. 0). The output of gate B is connected to an input of gate A so if S =
1, both inputs of gate A are at the logic 1 state. This means that the output of gate A must be 0 (as was
originally specified). In other words, the 0 state at Q is continuously disabling gate B so that any change
in R has no effect. Also the 1 state at is continuously enabling gate A so that any change S will be
transmitted through to Q. The above conditions constitute one of the stable states of the device referred
to as the Reset state since Q = 0.
Now suppose that the R-S flip flop in the Reset state, the S input goes to 0. The output of gate A i.e. Q
will go to 1 and with Q = 1 and R = 1, the output of gates B ( ) will go to 0 with now 0 gate A is
disabled keeping Q at 1. Consequently, when S returns to the 1 state it has no effect on the flip flop
whereas a change in R will cause a change in the output of gate B. The above conditions constitute the
other stable state of the device, called the Set state since Q = 1. Note that the change of the state of S
from 1 to 0 has caused the flip flop to change from the Reset state to the Set state.
There is another input condition which has not yet been considered. That is when both the R and S
inputs are taken to the logic state 0. When this happens both Q and will be forced to 1 and will remain
so far as long as R and S are kept at 0. However when both inputs return to 1 there is no way of
knowing whether the flip flop will latch in the Reset state or the Set state. The condition is said to be
indeterminate because of this indeterminate state great care must be taken when using R-S flip flop to
ensure that both inputs are not instructed simultaneously.
Table 1: The truth table for the NAND R-S flip flop
Q S R Q
1 0 0 indeterminate
1 0 1 1 0
1 1 0 0 1
1 1 1 1 0
0 0 0 indeterminate
0 0 1 1 0
0 1 0 0 1
0 1 1 0 1
S R Q
0 0 indeterminate
0 1 Set (1)
1 0 Reset(0)
1 1 No Change
When NOR gate are used the R and S inputs are transposed compared with the NAND version. Also the
stable state when R and S are both 0. A change of state is effected by pulsing the appropriate input to
the 1 state. The indeterminate state is now when both R and S are simultaneously at logic 1. Table 3
shows this operation.
S R Q
0 0 No Change
0 1 Reset (0)
1 0 Set (1)
1 1 Indeterminate
5.8.2 J K FLIPFLOP
The JK flip flop is basically a gated SR flip-flop with the addition of a clock input circuitry that
prevents the illegal or invalid output condition that can occur when both inputs S and R are equal to
logic level “1”. Due to this additional clocked input, a JK flip-flop has four possible input combinations,
“logic 1”, “logic 0”, “no change” and “toggle”. The symbol for a JK flip flop is similar to that of an SR
Bistable Latch as seen in the previous tutorial except for the addition of a clock input.
Both the S and the R inputs of the previous SR bistable have now been replaced by two inputs called
the J and K inputs, respectively after its inventor Jack Kilby. Then this equates to: J = S and K = R.
The two 2-input AND gates of the gated SR bistable have now been replaced by 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 condition of S = “1” and R = “1” state to be
used to produce a “toggle action” as the two inputs are now interlocked.
If the circuit is now “SET” the J input is inhibited by the “0” status of Q through the lower NAND gate.
If the circuit is “RESET” the K input is inhibited by the “0” status of Q through the upper NAND gate.
As Q and Q are always different we can use them to control the input. When both inputs J and K are
equal to logic “1”, the JK flip flop toggles as shown in the following truth table.
Input Output
Description
J K Q Q
0 0 0 0
Memory
same as
no change
for the 0 0 0 1
SR Latch
0 1 1 0
Reset Q » 0
0 1 0 1
1 0 0 1 Set Q » 1
1 0 1 0
1 1 0 1
toggle
Toggle
action
1 1 1 0
Then the JK flip-flop is basically an SR flip flop with feedback which enables only one of its two input
terminals, either SET or RESET to be active at any one time thereby eliminating the invalid condition
seen previously in the SR flip flop circuit.
Also when both the J and the K inputs are at logic level “1” at the same time, and the clock input is
pulsed “HIGH”, the circuit will “toggle” from its SET state to a RESET state, or visa-versa. This results
in the JK flip flop acting more like a T-type toggle flip-flop when both terminals are “HIGH”.
Although this circuit is an improvement on the clocked SR flip-flop it still suffers from timing problems
called “race” if the output Q changes state before the timing pulse of the clock input has time to go
“OFF”. To avoid this the timing pulse period ( T ) must be kept as short as possible (high frequency).
As this is sometimes not possible with modern TTL IC‟s the much improved Master-Slave JK Flip-
flop was developed.
We know that one flip-flop can store one-bit of information. In order to store multiple bits of
information, we require multiple flip-flops. The group of flip-flops, which are used to hold (store) the
binary data is known as register.
If the register is capable of shifting bits either towards right hand side or towards left hand side is
known as shift register. An „N‟ bit shift register contains „N‟ flip-flops. Following are the four types of
shift registers based on applying inputs and accessing of outputs.
The shift register, which allows serial input and produces serial output is known as Serial In – Serial
Out (SISO) shift register. The block diagram of 3-bit SISO shift register is shown in the following
figure.
This block diagram consists of three D flip-flops, which are cascaded. That means, output of one D flip-
flop is connected as the input of next D flip-flop. All these flip-flops are synchronous with each other
since, the same clock signal is applied to each one.
In this shift register, we can send the bits serially from the input of left most D flip-flop. Hence, this
input is also called as serial input. For every positive edge triggering of clock signal, the data shifts
from one stage to the next. So, we can receive the bits serially from the output of right most D flip-flop.
Hence, this output is also called as serial output.
Example
Let us see the working of 3-bit SISO shift register by sending the binary information “011” from LSB
to MSB serially at the input.
can understand the working of 3-bit SISO shift register from the following table.
0 - 0 0 0
1 1(LSB) 1 0 0
2 1 1 1 0
3 0(MSB) 0 1 1(LSB)
4 - - 0 1
5 - - - 0(MSB)
The initial status of the D flip-flops in the absence of clock signal is Q2Q1Q0=000Q2Q1Q0=000.
Here, the serial output is coming from Q0Q0. So, the LSB (1) is received at 3rd positive edge of clock
Therefore, the 3-bit SISO shift register requires five clock pulses in order to produce the valid output.
Similarly, the N-bit SISO shift register requires 2N-1 clock pulses in order to shift „N‟ bit information.
The shift register, which allows serial input and produces parallel output is known as Serial In –
Parallel Out (SIPO) shift register. The block diagram of 3-bit SIPO shift register is shown in the
following figure.
This circuit consists of three D flip-flops, which are cascaded. That means, output of one D flip-flop is
connected as the input of next D flip-flop. All these flip-flops are synchronous with each other since,
the same clock signal is applied to each one.
In this shift register, we can send the bits serially from the input of left most D flip-flop. Hence, this
input is also called as serial input. For every positive edge triggering of clock signal, the data shifts
from one stage to the next. In this case, we can access the outputs of each D flip-flop in parallel. So, we
will get parallel outputs from this shift register.
Example
Let us see the working of 3-bit SIPO shift register by sending the binary information “011” from LSB
to MSB serially at the input.
Here, Q2Q2 & Q0Q0 are MSB & LSB respectively. We can understand the working of 3-bit SIPO
0 - 0 0 0
1 1(LSB) 1 0 0
2 1 1 1 0
3 0(MSB) 0 1 1
The initial status of the D flip-flops in the absence of clock signal is Q2Q1Q0=000Q2Q1Q0=000. The
binary information “011” is obtained in parallel at the outputs of D flip-flops for third positive edge of
clock.
So, the 3-bit SIPO shift register requires three clock pulses in order to produce the valid output. Similarly,
the N-bit SIPO shift register requires N clock pulses in order to shift „N‟ bit information.
The shift register, which allows parallel input and produces serial output is known as Parallel In – Serial
Out (PISO) shift register. The block diagram of 3-bit PISO shift register is shown in the following figure.
This circuit consists of three D flip-flops, which are cascaded. That means, output of one D flip-flop is
connected as the input of next D flip-flop. All these flip-flops are synchronous with each other since, the
same clock signal is applied to each one.
In this shift register, we can apply the parallel inputs to each D flip-flop by making Preset Enable to 1.
For every positive edge triggering of clock signal, the data shifts from one stage to the next. So, we will
get the serial outputfrom the right most D flip-flop.
Example
Let us see the working of 3-bit PISO shift register by applying the binary information “011” in parallel
through preset inputs.
Since the preset inputs are applied before positive edge of Clock, the initial status of the D flip-flops
from leftmost to rightmost will be Q2Q1Q0=011Q2Q1Q0=011. We can understand the working of 3-bit
Q2 Q1 Q0
No of positive edge of Clock
0 0 1 1(LSB)
1 - 0 1
2 - - 0(LSB)
Here, the serial output is coming from Q0Q0. So, the LSB (1) is received before applying positive edge
of clock and the MSB (0) is received at 2nd positive edge of clock.
Therefore, the 3-bit PISO shift register requires two clock pulses in order to produce the valid output.
Similarly, the N-bit PISO shift register requires N-1 clock pulses in order to shift „N‟ bit information.
The shift register, which allows parallel input and produces parallel output is known as Parallel In −
Parallel Out (PIPO) shift register. The block diagramof 3-bit PIPO shift register is shown in the
following figure.
This circuit consists of three D flip-flops, which are cascaded. That means, output of one D flip-flop is
connected as the input of next D flip-flop. All these flip-flops are synchronous with each other since,
the same clock signal is applied to each one.
In this shift register, we can apply the parallel inputs to each D flip-flop by making Preset Enable to 1.
We can apply the parallel inputs through preset or clear. These two are asynchronous inputs. That
means, the flip-flops produce the corresponding outputs, based on the values of asynchronous inputs.
In this case, the effect of outputs is independent of clock transition. So, we will get the parallel
outputs from each D flip-flop.
Example
Let us see the working of 3-bit PIPO shift register by applying the binary information “011” in parallel
through preset inputs.
Since the preset inputs are applied before positive edge of Clock, the initial status of the D flip-flops
from leftmost to rightmost will be Q2Q1Q0=011Q2Q1Q0=011. So, the binary information “011” is
obtained in parallel at the outputs of D flip-flops before applying positive edge of clock.
Therefore, the 3-bit PIPO shift register requires zero clock pulses in order to produce the valid output.
Similarly, the N-bit PIPO shift register doesn‟t require any clock pulse in order to shift „N‟ bit
information.