CSC 209 Notes Split
CSC 209 Notes Split
CSC 209 Notes Split
BINARY SYSTEMS
Analog Vs Digital
Digital Systems
Binary numbers
Number base conversions
Compliments
Octal and Hexadecimal Numbers
Signed Binary Numbers
ANALOG Vs DIGITAL:
To learn and understand about the digital logic design, the initial knowledge we require is to
differentiate between analog and digital. The following are fews that differentiate between
analog and digital.
• At its most basic, digital information can assume only one of two possible
values: one/zero, on/off, high/low, true/false, etc.
• Digital Information is less susceptible to noise than analog information
• Exact voltage values are not important, only their class (1 or 0)
• The complexity of operations is reduced, thus it is easier to implement them with
high accuracy in digital form.
DIGITAL SYSTEMS
Digital means electronic technology that generates, stores, and processes data in terms of two
states: positive and non-positive. Positive is expressed or represented by the number 1 and
non-positive by the number 0.
A „digital system‟ is a data technology that uses discrete (discontinuous) values represented
by high and low states known as bits. By contrast, non-digital (or analog) systems use a
continuous range of values to represent information. Although digital representations are
discrete, the information represented can be either discrete, such as numbers, letters or icons,
or continuous, such as sounds, images, and other measurements of continuous systems.
BINARY
Binary describes a numbering scheme in which there are only two possible values for each
digit: 0 and 1. The term also refers to any digital encoding/decoding system in which there are
exactly two possible states. In digital data memory, storage, processing, and communications,
the 0 and 1 values are sometimes called "low" and "high," respectively.
The binary number system is a numbering system that represents numeric values using two
unique digits (0 and 1). Most of the computing devices use binary numbering to represent
electronic circuit voltage state, (i.e., on/off switch), which considers 0 voltage input as off and
1 input as on.
This is also known as the base-2 number system (The base-2 system is a positional notation
with a radix of 2), or the binary numbering system. Few examples of binary numbers are as
follows:
• 10
• 111
• 10101
• 11110
COMPLIMENTS
Compliments are used in digital computers to simplify the subtraction operation and for logical
manipulation. Simplifying operations leads to simpler, less expensive circuits to implement the
operations.
OCTAL NUMBERS
The Octal Number System is another type of computer and digital base number system. The
Octal Numbering System is very similar in principle to the previous hexadecimal numbering
system except that in Octal, a binary number is divided up into groups of only 3 bits, with each
group or set of bits having a distinct value of between 000 (0) and 111 ( 7 ). Octal numbers
therefore have a range of just “8” digits, (0, 1, 2, 3, 4, 5, 6, 7) making them a Base-8
numbering system and therefore, q is equal to “8”.
Being a Base-16 system, the hexadecimal numbering system therefore uses 16 (sixteen)
different digits with a combination of numbers from 0 through to 15. In other words, there are
16 possible digit symbols.
Decima Binar Octal Hexadeci
l y mal
0 0000 0 0
1 0001 1 1
2 0010 2 2
3 0011 3 3
4 0100 4 4
5 0101 5 5
6 0110 6 6
7 0111 7 7
8 1000 10 8
9 1001 11 9
10 1010 12 A
11 1011 13 B
12 1100 14 C
13 1101 15 D
14 1110 16 E
15 1111 17 F
In mathematics, positive numbers (including zero) are represented as unsigned numbers. That
is we do not put the +ve sign in front of them to show that they are positive numbers.
However, when dealing with negative numbers we do use a -ve sign in front of the number to
show that the number is negative in value and different from a positive unsigned value and the
same is true with signed binary numbers. However, in digital circuits there is no provision
made to put a plus or even a minus sign to a number, since digital systems operate with binary
numbers that are represented in terms of “0‟s” and “1‟s”.
So to represent a positive (N) and a negative (-N) binary number we can use the binary
numbers with sign. For signed binary numbers the most significant bit (MSB) is used as the
sign. If the sign bit is “0”, this means the number is positive. If the sign bit is “1”, then the
number is negative. The remaining bits are used to represent the magnitude of the binary
number in the usual unsigned binary number format.
BINARY CODES
In the coding, when numbers, letters or words are represented by a specific group of symbols,
it is said that the number, letter or word is being encoded. The group of symbols is called as a
code. The digital data is represented, stored and transmitted as group of binary bits. This group
is also called as binary code. The binary code is represented by the number as well as
alphanumeric letter.
Weighted Codes
Non-Weighted Codes
Binary Coded Decimal Code
Alphanumeric Codes
Error Detecting Codes
Error Correcting Codes
Weighted Codes
Weighted binary codes are those binary codes which obey the positional weight principle.
Each position of the number represents a specific weight. Several systems of the codes are
used to express the decimal digits 0 through 9. In these codes each decimal digit is represented
by a group of four bits.
Non-Weighted Codes
In this type of binary codes, the positional weights are not assigned. The examples of non-
weighted codes are Excess-3 code and Gray code.
Excess-3 code
The Excess-3 code is also called as XS-3 code. It is non-weighted code used to express decimal
numbers. The Excess-3 code words are derived from the 8421 BCD code words adding (0011)2
or (3)10 to each code word in 8421. The excess-3 codes are obtained as follows.
Gray Code
It is the non-weighted code and it is not arithmetic codes. That means there are no specific
weights assigned to the bit position. It has a very special feature that, only one bit will change
each time the decimal number is incremented as shown in fig. As only one bit changes at a
time, the gray code is called as a unit distance code. The gray code is a cyclic code. Gray code
cannot be used for arithmetic operation.
Application of Gray code
Gray code is popularly used in the shaft position encoders.
A shaft position encoder produces a code word which represents the angular
position of the shaft.
Binary Coded Decimal (BCD) code
In this code each decimal digit is represented by a 4-bit binary number. BCD is a way
to express each of the decimal digits with a binary code. In the BCD, with four bits we can
represent sixteen numbers (0000 to 1111). But in BCD code only first ten of these are used
(0000 to 1001). The remaining six code combinations i.e. 1010 to 1111 are invalid in BCD.
Alphanumeric codes
A binary digit or bit can represent only two symbols as it has only two states '0' or '1'. But this
is not enough for communication between two computers because there we need many more
symbols for communication. These symbols are required to represent 26 alphabets with capital
and small letters, numbers from 0 to 9, punctuation marks and other symbols.
The alphanumeric codes are the codes that represent numbers and alphabetic characters.
Mostly such codes also represent other characters such as symbol and various instructions
necessary for conveying information. An alphanumeric code should at least represent 10 digits
and 26 letters of alphabet i.e. total 36 items. The following three alphanumeric codes are very
commonly used for the data representation.
ASCII code is a 7-bit code whereas EBCDIC is an 8-bit code. ASCII code is more commonly
used worldwide while EBCDIC is used primarily in large IBM computers.
Error Codes
There are binary code techniques available to detect and correct data during data transmission.
Calculating BCD Equivalent. Convert each digit into groups of four binary digits equivalent
Result
(11101)2 = (00101001)BCD
Calculating Decimal Equivalent. Convert each four digit into a group and get decimal
equivalent for each group.
Step 1 29 / 2 14 1
Step 2 14 / 2 7 0
Step 3 7/2 3 1
Step 4 3/2 1 1
Step 5 1/2 0 1
As mentioned in Steps 2 and 4, the remainders have to be arranged in the reverse order so that
the first remainder becomes the least significant digit (LSD) and the last remainder becomes
the most significant digit (MSD).
Result
(00101001)BCD = (11101)2
BCD to Excess-3
Steps
Result
(1001)BCD = (1100)XS-3
Step 1 -- Subtract (0011)2 from each 4 bit of excess-3 digit to obtain the
corresponding BCD code.
Result
(10011010)XS-3 = (01100111)BCD
UNIT –II
BOOLEAN ALGEBRA :
Basic Definitions
Axiomatic Definition of Boolean Algebra
Basic Theorems and properties of Boolean Algebra
Boolean Functions
Canonical and Standard Forms, Other Logic Operations
Digital Logic Gates
Integrated Circuits
Boolean Algebra: Boolean algebra, like any other deductive mathematical system, may be
defined with aset of elements, a set of operators, and a number of unproved axioms or
postulates. A set of elements is anycollection of objects having a common property. If S is a
set and x and y are certain objects, then x Î Sdenotes that x is a member of the set S, and y ÏS
denotes that y is not an element of S. A set with adenumerable number of elements is specified
by braces: A = {1,2,3,4}, i.e. the elements of set A are thenumbers 1, 2, 3, and 4. A binary
operator defined on a set S of elements is a rule that assigns to each pair ofelements from S a
unique element from S._ Example: In a*b=c, we say that * is a binary operator if it specifies a
rule for finding c from the pair (a,b)and also if a, b, c Î S.
CLOSURE: The Boolean system is closed with respect to a binary operator if for every pair
of Boolean values,it produces a Boolean result. For example, logical AND is closed in the
Boolean system because it accepts only Boolean operands and produces only Boolean results.
_ A set S is closed with respect to a binary operator if, for every pair of elements of S, the
binary operator specifies a rule for obtaining a unique element of S.
For example, the set of natural numbers N = {1, 2, 3, 4, … 9} is closed with respect to the
binary operator plus (+) by the rule of arithmetic addition, since for any a, b Î N we obtain a
unique c Î N by the operation a + b = c.
ASSOCIATIVE LAW:A binary operator * on a set S is said to be associative whenever (x *
y) * z = x * (y * z) for all x, y, z Î S, forall Boolean values x, y and z.
COMMUTATIVE LAW:
x + 0 = x
x · 0 = 0
x + 1 = 1
x · 1 = 1
x + x = x
x · x = x
x + x’ = x
x · x’ = 0
x + y = y + x
xy = yx
x + ( y + z ) = ( x + y ) + z
x (yz) = (xy) z
x ( y + z ) = xy + xz
x + yz = ( x + y )( x + z)
( x + y )’ = x’ y’
( xy )’ = x’ + y’
(x’)’ = x
DeMorgan's Theorem
AXIOMATIC DEFINITION OF BOOLEAN ALGEBRA:
1. Closure
a. Closure with respect to (wrt) OR (+)
b. Closure with respect to AND (•)
2. Identity
a. Identity element wrt to OR : 0
b. Identity element wrt to AND : 1
3. Commutative Property
a. Commutative Property wrt to OR : x + y = y + x
b. Commutative Property wrt to AND : x · y = y · x
4. Distributive Property
a. x · (y + z) = (x·y) + (x·z)
b. x + (y·z) = (x + y)(x + z)
5. Existence of Complement
a. x + x‟ = 1
b. x · x‟ = 0
LOGIC GATES
Formal logic: In formal logic, a statement (proposition) is a declarative sentence that is either
true(1) or false (0). It is easier to communicate with computers using formal logic.
• Boolean variable: Takes only two values – either true (1) or false (0). They are used as
basic units of formal logic.
• Boolean algebra: Deals with binary variables and logic operations operating on those
variables.
• Logic diagram: Composed of graphic symbols for logic gates. A simple circuit sketch that
represents inputs and outputs of Boolean functions.
INTEGRATED CIRCUIT
LEVEL OF INTEGRATION
It contains less than 500 components or have more than 10 but less than 100 gates.
Number of components is between 500 and 300000 or have more than 100gates.
Transistor–transistor logic (TTL) is a class of digital circuits built from bipolar junction
transistors (BJT) and resistors. It is called transistor–transistor logic because both the logic
gating function (e.g., AND) and the amplifying function are performed by transistors (contrast
with resistor–transistor logic (RTL) and diode–transistor logic (DTL).
Emitter-coupled logic (ECL) is the fastest logic circuit family available for conventional logic-
system design.4 High speed is achieved by operating all bipolar transistors out of saturation, thus
avoiding storage-time delays, and by keeping the logic signal swings relatively small (about 0.8
V or less), thus reducing the time required to charge and discharge the various load and parasitic
capacitances.
Complementary Metal oxide semiconductor (CMOS): Technology for constructing integrated
circuits. CMOS technology is used in microprocessors, microcontrollers, static RAM, and other
digital logic circuits. CMOS technology is also used for several analog circuits such as image
sensors (CMOS sensor), data converters, and highly integrated transceivers for many types of
communication.
INTRODUCTION
Minimization of switching functions is to obtain logic circuits with least circuit complexity. This
goal is very difficult since how a minimal function relates to the implementation technology is
important. For example, If we are building a logic circuit that uses discrete logic made of small
scale Integration ICs(SSIs) like 7400 series, in which basic building block are constructed and
are available for use. The goal of minimization would be to reduce the number of ICs and not the
logic gates. For example, If we require two 6 and gates and 5 Or gates,we would require 2 AND
ICs(each has 4 AND gates) and one OR IC. (4 gates). On the other hand if the same logic could
be implemented with only 10 nand gates, we require only 3 ICs. Similarly when we design logic
on Programmable device, we may implement the design with certain number of gates and
remaining gates may not be used. Whatever may be the criteria of minimization we would be
guided by the following:
• Karnaugh Map: A graphical technique for simplifying a Boolean expression into either
form: minimal sum of products (MSP)
K-map Simplification
• x‟y‟ + x‟y
• Both of these minterms appear in the top row of a Karnaugh map, which means that they
both contain the literal x‟
The possible combinations of grouping 2 adjacent min terms are {(m0, m1), (m2,
m3), (m0, m2) and (m1, m3)}.
3 Variable K-Map
The number of cells in 3 variable K-map is eight, since the number of variables is three. The
following figure shows 3 variable K-Map.
The possible combinations of grouping 4 adjacent min terms are {(m0, m1, m3, m2), (m4,
m5, m7, m6), (m0, m1, m4, m5), (m1, m3, m5, m7), (m3, m2, m7, m6) and (m2, m0, m6, m4)}.
The possible combinations of grouping 2 adjacent min terms are {(m0, m1), (m1, m3),
(m3, m2), (m2, m0), (m4, m5), (m5, m7), (m7, m6), (m6, m4), (m0, m4), (m1, m5), (m3, m7)
and (m2, m6)}.
Let R1, R2, R3 and R4 represents the min terms of first row, second row, third row and
fourth row respectively. Similarly, C1, C2, C3 and C4 represents the min terms of first
column, second column, third column and fourth column respectively. The possible
combinations of grouping 8 adjacent min terms are {(R1, R2), (R2, R3), (R3, R4), (R4, R1),
(C1, C2), (C2, C3), (C3, C4), (C4, C1)}.
5 Variable K-Map
The number of cells in 5 variable K-map is thirty-two, since the number of variables is 5. The
following figure shows 5 variable K-Map.
There is only one possibility of grouping 32 adjacent min terms.
There are two possibilities of grouping 16 adjacent min terms. i.e., grouping of min
terms from m0 to m15 and m16 to m31.
In the above all K-maps, we used exclusively the min terms notation. Similarly, you can use
exclusively the Max terms notation.
Similarly, if we consider the combination of inputs for which the Boolean function is „0‟, then
we will get the Boolean function, which is in standard product of sums form after simplifying
the K-map.
Example
Let us simplify the following Boolean function, f(W, X, Y, Z)= WX’Y’ + WY + W’YZ’ using
K-map.
The given Boolean function is in sum of products form. It is having 4 variables W, X, Y & Z.
So, we require 4 variable K-map. The 4 variable K-map with ones corresponding to the given
product terms is shown in the following figure.
Here, 1s are placed in the following cells of 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 3 & 4 are
corresponding to the product term, WY.
The cells, which are common to the intersection of Rows 1 & 2 and column 4 are
corresponding to the product term, W’YZ’.
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 groupings, there is no single one left
as ungrouped. So, we no need to check for grouping of 2 adjacent ones. The 4 variable K-
map with these three groupings is shown in the following figure.
f= WX’ + WY + YZ’
UNIT-III
Combinational Logic
Logic circuits for digital systems may be combinational or sequential.
A combinational circuit consists of input variables, logic gates, and output variables
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.
2. Label the gates that are a function of input variables and previously labeled gates
with other arbitrary symbols. Find the Boolean functions for these gates.
3. Repeat the process outlined in step 2 until the outputs of the circuit are obtained.
4. By repeated substitution of previously defined functions, obtain the output Boolean
functions in terms of input variables.
Design Procedure:
Binary Adder
The most basic arithmetic operation is addition. The circuit, which performs the addition of two
binary numbers is known as Binary adder. First, let us implement an adder, which performs
the addition of two bits.
Half Adder
Half adder is a combinational circuit, which performs the addition of two binary numbers A and
B are of single bit. It produces two outputs sum, S & carry, C.
Inputs Outputs
A B C S
0 0 0 0
0 1 0 1
1 0 0 1
1 1 1 0
Let, sum, S is the Least significant bit and carry, C is the Most significant bit of the resultant
sum. For first three combinations of inputs, carry, C is zero and the value of S will be either zero
or one based on the number of ones present at the inputs. But, for last combination of inputs,
carry, C is one and sum, S is zero, since the resultant sum is two.
From Truth table, we can directly write the Boolean functions for each output as
S=A⊕B
C=AB
We can implement the above functions with 2-input Ex-OR gate & 2-input AND gate.
The circuit diagram of Half adder is shown in the following figure.
In the above circuit, a two input Ex-OR gate & two input AND gate produces sum, S & carry, C
respectively. Therefore, Half-adder performs the addition of two bits.
Full Adder
Full adder is a combinational circuit, which performs the addition of three bits A, B and Cin.
Where, A & B are the two parallel significant bits and Cin is the carry bit, which is generated
from previous stage. This Full adder also produces two outputs sum, S & carry, C out, which are
similar to Half adder.
Inputs Outputs
A B Cin Cout S
0 0 0 0 0
0 0 1 0 1
0 1 0 0 1
0 1 1 1 0
1 0 0 0 1
1 0 1 1 0
1 1 0 1 0
1 1 1 1 1
Let, sum, S is the Least significant bit and carry, Cout is the Most significant bit of resultant sum.
It is easy to fill the values of outputs for all combinations of inputs in the truth table. Just count
the number of ones present at the inputs and write the equivalent binary number at outputs. If
Cin is equal to zero, then Full adder truth table is same as that of Half adder truth table.
We will get the following Boolean functions for each output after simplification.
S=A⊕B⊕Cin
cout=AB+(A⊕B)cin
he sum, S is equal to one, when odd number of ones present at the inputs. We know that Ex-OR
gate produces an output, which is an odd function. So, we can use either two 2input Ex-OR gates
or one 3-input Ex-OR gate in order to produce sum, S. We can implement carry, Cout using two
2-input AND gates & one OR gate. The circuit diagram of Full adder is shown in the following
figure.
This adder is called as Full adder because for implementing one Full adder, we require two Half
adders and one OR gate. If Cin is zero, then Full adder becomes Half adder. We can verify it
easily from the above circuit diagram or from the Boolean functions of outputs of Full adder.
4-bit Binary Adder
The 4-bit binary adder performs the addition of two 4-bit numbers. Let the 4-bit binary
numbers, A=A3A2A1A0A=A3A2A1A0 and B=B3B2B1B0B=B3B2B1B0. We can implement
4-bit binary adder in one of the two following ways.
Use one Half adder for doing the addition of two Least significant bits and three Full
adders for doing the addition of three higher significant bits.
Use four Full adders for uniformity. Since, initial carry Cinis zero, the Full adder which is
used for adding the least significant bits becomes Half adder.
For the time being, we considered second approach. The block diagram of 4-bit binary adder is
shown in the following figure.
Here, the 4 Full adders are cascaded. Each Full adder is getting the respective bits of two parallel
inputs A & B. The carry output of one Full adder will be the carry input of subsequent higher
order Full adder. This 4-bit binary adder produces the resultant sum having at most 5 bits. So,
carry out of last stage Full adder will be the MSB.
In this way, we can implement any higher order binary adder just by cascading the required
number of Full adders. This binary adder is also called as ripple carry (binary) adder because
the carry propagates (ripples) from one stage to the next stage.
Binary Subtractor
The circuit, which performs the subtraction of two binary numbers is known as Binary
subtractor. We can implement Binary subtractor in following two methods.
In second method, we can use same binary adder for subtracting two binary numbers just by
doing some modifications in the second input. So, internally binary addition operation takes
place but, the output is resultant subtraction.
We know that the subtraction of two binary numbers A & B can be written as,
A−B=A+(2′scomplimentofB)
⇒A−B=A+(1′scomplimentofB)+1
There are two differences in the inputs of Full adders that are present in Binary adder and
Binary subtractor.
The input bits of binary number B are directly applied to Full adders in Binary adder,
whereas the complemented bits of binary number B are applied to Full adders in Binary
subtractor.
The initial carry, C0 = 0 is applied in 4-bit Binary adder, whereas the initial carry
(borrow), C0 = 1 is applied in 4-bit Binary subtractor.
We know that a 2-input Ex-OR gate produces an output, which is same as that of first input
when other input is zero. Similarly, it produces an output, which is complement of first input
when other input is one.
Therefore, we can apply the input bits of binary number B, to 2-input Ex-OR gates. The other
input to all these Ex-OR gates is C0. So, based on the value of C0, the Ex-OR gates produce
either the normal or complemented bits of binary number B.
If initial borrow, 𝐶0 is one, then each full adder gets the normal bits of binary number A &
complemented bits of binary number B. So, the 4-bit binary adder / subtractor produces an
output, which is the subtraction of two binary numbers A & B.
Decoder is a combinational circuit that has „n‟ input lines and maximum of 2n output lines. One
of these outputs will be active High based on the combination of inputs present, when the
decoder is enabled. That means decoder detects a particular code. The outputs of the decoder
are nothing but the min termsof „n‟ input variables (lines), when it is enabled.
2 to 4 Decoder:
Let 2 to 4 Decoder has two inputs A1 & A0 and four outputs Y3, Y2, Y1 & Y0. The block
diagram of 2 to 4 decoder is shown in the following figure.
One of these four outputs will be „1‟ for each combination of inputs when enable, E is „1‟.
The Truth table of 2 to 4 decoder is shown below.
E A1 A0 Y3 Y2 Y1 Y0
0 x x 0 0 0 0
1 0 0 0 0 0 1
1 0 1 0 0 1 0
1 1 0 0 1 0 0
1 1 1 1 0 0 0
From Truth table, we can write the Boolean functions for each output as
Y3=E.A1.A0Y3=E.A1.A0
Y2=E.A1.A0′Y2=E.A1.A0′
Y1=E.A1′.A0Y1=E.A1′.A0
Y0=E.A1′.A0′
The circuit diagram of 2 to 4 decoder is shown in the following figure.
Therefore, the outputs of 2 to 4 decoder are nothing but the min terms of two input variables
A1 & A0, when enable, E is equal to one. If enable, E is zero, then all the outputs of decoder will
be equal to zero.
Similarly, 3 to 8 decoder produces eight min terms of three input variables A2, A1 & A0 and 4 to
16 decoder produces sixteen min terms of four input variables A3, A2, A1 & A0.
Encoder:
An Encoder is a combinational circuit that performs the reverse operation of Decoder. It has
maximum of 2n input lines and „n‟ output lines. It will produce a binary code equivalent to the
input, which is active High. Therefore, the encoder encodes 2 ninput lines with „n‟ bits. It is
optional to represent the enable signal in encoders.
4 to 2 Encoder
Let 4 to 2 Encoder has four inputs Y3, Y2, Y1 & Y0 and two outputs A1 & A0. The block
diagram of 4 to 2 Encoder is shown in the following figure.
The Truth table of 4 to 2 encoder is shown below.
Inputs Outputs
Y3 Y2 Y1 Y0 A1 A0
0 0 0 1 0 0
0 0 1 0 0 1
0 1 0 0 1 0
1 0 0 0 1 1
From Truth table, we can write the Boolean functions for each output as
A1=Y3+Y2A1=Y3+Y2
A0=Y3+Y1A0=Y3+Y1
We can implement the above two Boolean functions by using two input OR gates. The circuit
diagram of 4 to 2 encoder is shown in the following figure.
Multiplexer is a combinational circuit that has maximum of 2ndata inputs, „n‟ selection lines
and single output line. One of these data inputs will be connected to the output based on the
values of selection lines.
Since there are „n‟ selection lines, there will be 2n possible combinations of zeros and ones. So,
each combination will select only one data input.
4x1 Multiplexer:
4x1 Multiplexer has four data inputs I3, I2, I1 & I0, two selection lines s1 & s0 and one output Y.
The block diagram of 4x1 Multiplexer is shown in the following figure.
One of these 4 inputs will be connected to the output based on the combination of inputs present
at these two selection lines. Truth table of 4x1 Multiplexer is shown below.
S1 S0 Y
0 0 I0
0 1 I1
1 0 I2
1 1 I3
From Truth table, we can directly write the Boolean functionfor output, Y as
Y=S1′S0′I0+S1′S0I1+S1S0′I2+S1S0I2Y=S1′S0′I0+S1′S0I1+S1S0′I2+S1S0I2
We can implement this Boolean function using Inverters, AND gates & OR gate.
The circuit diagram of 4x1 multiplexer is shown in the following figure.
Since there are „n‟ selection lines, there will be 2n possible combinations of zeros and ones. So,
each combination can select only one output. De-Multiplexer is also called as De-Mux.
1x4 De-Multiplexer :
1x4 De-Multiplexer has one input I, two selection lines, s1 & s0and four outputs Y3, Y2,
Y1 &Y0. The block diagram of 1x4 De-Multiplexer is shown in the following figure.
The single input „I‟ will be connected to one of the four outputs, Y3 to Y0 based on the values of
selection lines s1 & s0. The Truth table of 1x4 De-Multiplexer is shown below.
Selection Inputs Outputs
S1 S0 Y3 Y2 Y1 Y0
0 0 0 0 0 I
0 1 0 0 I 0
1 0 0 I 0 0
1 1 I 0 0 0
From the above Truth table, we can directly write the Boolean functions for each output as
Y3=s1s0IY3=s1s0I
Y2=s1s0′IY2=s1s0′I
Y1=s1′s0IY1=s1′s0I
Y0=s1′s0′IY0=s1′s0′I
We can implement these Boolean functions using Inverters & 3-input AND gates. The circuit
diagram of 1x4 De-Multiplexer is shown in the following figure.
UNIT -IV
Sequential Circuits
The following figure shows the block diagram of sequential circuit .
This sequential circuit contains a set of inputs and output(s). The output(s) of sequential circuit
depends not only on the combination of present inputs but also on the previous output(s).
Previous output is nothing but the present state. Therefore, sequential circuits contain
combinational circuits along with memory (storage) elements. Some sequential circuits may not
contain combinational circuits, but only memory elements.
Following table shows the differences between combinational circuits and sequential circuits.
Clock signal
Clock signal is a periodic signal and its ON time and OFF time need not be the same. We can
represent the clock signal as a square wave, when both its ON time and OFF time are same.
This clock signal is shown in the following figure.
This signal stays at logic High (5V) for some time and stays at logic Low (0V) for equal amount
of time. This pattern repeats with some time period. In this case, the time period will be equal
to either twice of ON time or twice of OFF time.
Types of Triggering
Following are the two possible types of triggering that are used in sequential circuits.
Level triggering
Edge triggering
Level triggering
There are two levels, namely logic High and logic Low in clock signal. Following are the
two types of level triggering.
Following are the two types of edge triggering based on the transitions of clock signal.
Latches
Flip-flops
Latches operate with enable signal, which is level sensitive. Whereas, flip-flops are edge
sensitive. We will discuss about flip-flops in next chapter. Now, let us discuss about SR Latch
& D Latch one by one.
SR Latch
SR Latch is also called as Set Reset Latch. This latch affects the outputs as long as the enable,
E is maintained at „1‟. The circuit diagram of SR Latch is shown in the following figure.
This circuit has two inputs S & R and two outputs Q(t) & Q(t)‟. The upper NOR gate has two
inputs R & complement of present state, Q(t)‟ and produces next state, Q(t+1) when enable, E is
„1‟.
Similarly, the lower NOR gate has two inputs S & present state, Q(t) and produces complement
of next state, Q(t+1)‟ when enable, E is „1‟.
We know that a 2-input NOR gate produces an output, which is the complement of another
input when one of the input is „0‟. Similarly, it produces „0‟ output, when one of the input is „1‟.
The following table shows the state table of SR latch.
S R Q(t+1)
0 0 Q(t)
0 1 0
1 0 1
1 1 -
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.
The following table shows the state table of D latch.
D Q(t+1)
0 0
1 1
In first method, cascade two latches in such a way that the first latch is enabled for every
positive clock pulse and second latch is enabled for every negative clock pulse. So that the
combination of these two latches become a flip-flop.
In second method, we can directly implement the flip-flop, which is edge sensitive. In this
chapter, let us discuss the following flip-flops using second method.
SR Flip-Flop
D Flip-Flop
JK Flip-Flop
T Flip-Flop
SR Flip-Flop
SR flip-flop operates with only positive clock transitions or negative clock transitions. Whereas,
SR latch operates with enable signal. The circuit diagram of SR flip-flop is shown in the
following figure.
The following table shows the state table of SR flip-flop.
S R Q(t+1)
0 0 Q(t+1)
0 1 0
1 0 1
1 1 -
S R Q(t) Q(t+1)
0 0 0 0
0 0 1 1
0 1 0 0
0 1 1 0
1 0 0 1
1 0 1 1
1 1 0 X
1 1 1 X
D Flip-Flop
D flip-flop operates with only positive clock transitions or negative clock transitions. Whereas,
D latch operates with enable signal. That means, the output of D flip-flop is insensitive to the
changes in the input, D except for active transition of the clock signal. The circuit diagram of
D flip-flop is shown in the following figure.
D Q(t+1)
0 0
0 1
From the above state table, we can directly write the next state equation as Q(t+1)=D
JK Flip-Flop
JK flip-flop is the modified version of SR flip-flop. It operates with only positive clock
transitions or negative clock transitions. The circuit diagram of JK flip-flop is shown in the
following figure.
J K Q(t+1)
0 0 Q(t)
0 1 0
1 0 1
1 1 Q(t)'
J K Q(t) Q(t+1)
0 0 0 0
0 0 1 1
0 1 0 0
0 1 1 0
1 0 0 1
1 0 1 1
1 1 0 1
1 1 1 0
T Flip-Flop
T flip-flop is the simplified version of JK flip-flop. It is obtained by connecting the same input
„T‟ to both inputs of JK flip-flop. It operates with only positive clock transitions or negative
clock transitions. The circuit diagram of T flip-flop is shown in the following figure.
The following table shows the state table of T flip-flop.
D Q(t+1)
0 Q(t)
1 Q(t)‟
T Q(t) Q(t+1)
0 0 0
0 1 1
1 0 1
1 1 0
From the above characteristic table, we can directly write the next state equation as
Q(t+1)=T′Q(t)+TQ(t)′Q(t+1)=T′Q(t)+TQ(t)′
⇒Q(t+1)=T⊕Q(t)
shift 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.
Serial In - Serial Out shift register
Serial In - Parallel Out shift register
Parallel In - Serial Out shift register
Parallel In - Parallel Out shift register
Serial In - Serial Out (SISO) Shift Register
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.
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.
The synchronous sequential circuits change (affect) their states for every positive (or negative)
transition of the clock signal based on the input. So, this behavior of synchronous sequential
circuits can be represented in the graphical form and it is known as state diagram.
A synchronous sequential circuit is also called as Finite State Machine (FSM), if it has finite
number of states. There are two types of FSMs.
So, based on the present inputs and present states, the Mealy state machine produces outputs.
Therefore, the outputs will be valid only at positive (or negative) transition of the clock signal.
The state diagram of Mealy state machine is shown in the following figure.
In the above figure, there are three states, namely A, B & C. These states are labelled
inside the circles & each circle corresponds to one state. Transitions between these states are
represented with directed lines. Here, 0 / 0, 1 / 0 & 1 / 1 denotes input / output. In the above
figure, there are two transitions from each state based on the value of input, x.
The state diagram of Moore state machine is shown in the following figure.
In the above figure, there are four states, namely A, B, C & D. These states and the
respective outputs are labeled inside the circles. Here, only the input value is labeled on each
transition. In the above figure, there are two transitions from each state based on the value of
input, x.