RS3859 - Grade - 9 Fundamentals of Digital System
RS3859 - Grade - 9 Fundamentals of Digital System
Government of Nepal
Ministry of Education, Science and Technology
Curriculum Development Centre
Sanothimi, Bhaktapur
Phone : 5639122/6634373/6635046/6630088
Website : www.moecdc.gov.np
Feedback Copy
Secondary Level
Computer Engineering
Government of Nepal
Ministry of Education, Science and Technology
Curriculum Development Centre
Sanothimi, Bhaktapur
Publisher : Government of Nepal
Ministry of Education, Science and Technology
Curriculum Development Centre
Sanothimi, Bhaktapur
© Publisher
The curriculum and curricular materials have been developed and revised on a regular basis
with the aim of making education objective-oriented, practical, relevant and job oriented. It
is necessary to instill the feelings of nationalism, national integrity and democratic spirit in
students and equip them with morality, discipline and self-reliance, creativity and
thoughtfulness. It is essential to develop in them the linguistic and mathematical skills,
knowledge of science, information and communication technology, environment, health and
population and life skills. it is also necessary to bring in them the feeling of preserving and
promoting arts and aesthetics, humanistic norms, values and ideals. It has become the need
of the present time to make them aware of respect for ethnicity, gender, disabilities,
languages, religions, cultures, regional diversity, human rights and social values so as to
make them capable of playing the role of responsible citizens with applied technical and
vocational knowledge and skills. This Learning Resource Material for Computer
Engineering has been developed in line with the Secondary Level Computer Engineering
Curriculum with an aim to facilitate the students in their study and learning on the subject
by incorporating the recommendations and feedback obtained from various schools,
workshops and seminars, interaction programs attended by teachers, students and parents.
In bringing out the learning resource material in this form, the contribution of the
Director General of CDC Dr. Lekhnath Poudel, Pro, Dr. Subarna Shakya, Bibha
Sthapit, Anil Barma, Bhuwan Panta, Arun Roka, Lina Maharjan, Trimandir Prajapati
is highly acknowledged. The book is written by Sankar Kumar Yadav, Bishnuraj
Bhandari, Satyaram Suwal and Bimal Thapa and the subject matter of the book was
edited by Badrinath Timalsina and Khilanath Dhamala. CDC extends sincere thanks
to all those who have contributed in developing this book in this form.
This book is a supplimentary learning resource material for students and teachrs. In
addition they have to make use of other relevnt materials to ensure all the learning
outcomes set in the curriculum. The teachers, students and all other stakeholders are
expected to make constructive comments and suggestions to make it a more useful
learning resource material.
UNIT-2 ....................................................................................................................29
BINARY ARITHMETIC OPERATIONS .......................................................................29
Objectives: .......................................................................................................29
Two's Complement Subtraction .......................................................................34
Overflow Problems. .........................................................................................41
Multiplication and Division .............................................................................42
Binary Coded Decimal (BCD) .........................................................................43
UNIT-3 ....................................................................................................................47
LOGIC GATE CONCEPTS ........................................................................................47
Learning Outcomes ..........................................................................................47
Introduction......................................................................................................47
Practical on Digital Logic gates ......................................................................66
UNIT 4.....................................................................................................................70
BOOLEAN ALGEBRA AND KARNAUGH MAP ..........................................................70
Learning Outcomes ..........................................................................................70
Introduction......................................................................................................70
Venn Diagram ..................................................................................................70
Boolean Relationship on Venn Diagram .........................................................71
Sum of Products (SOP) ....................................................................................76
Algebraic Simplification ..................................................................................81
The Concept of K-Maps ...................................................................................85
Karnaugh Maps - Rules of Simplification ........................................................90
UNIT- 5 ...................................................................................................................98
BINARY ARITHMETIC LOGIC .................................................................................98
Learning Outcomes ..........................................................................................98
Introduction......................................................................................................98
Half Substractor .............................................................................................106
Full Substractor .............................................................................................107
UNIT-6 ..................................................................................................................110
COMBINATIONAL LOGIC CIRCUIT .......................................................................110
Objectives .......................................................................................................110
Introduction....................................................................................................110
Applications of Demultiplexer .......................................................................125
UNIT:- 7 ................................................................................................................150
SEQUENTIAL LOGIC ............................................................................................150
Introduction:- .................................................................................................150
Clock Pulse Transition ...................................................................................153
Flip Flop .......................................................................................................156
Truth Table.....................................................................................................164
UNIT-1
Number System
Objectives:
At the end of this unit, you will able to
1. to obtain formalism of logic enabling you to analyse logical processes
2. implement simple logical operations using combinational logic circuits
3. understand common forms of number representation in digital electronic
circuits and to convert between different representations
4. understand the logical operation of simple arithmetic and other MSI circuits
(Medium Scale Integrated Circuits)
5. develop concepts of sequential circuits enabling you to analyse sequential
systems in terms of state machines
6. implement synchronous state machines using flip-flops.
Introduction
Number Systems
In a positional number system, there are only a few symbols, called digits, and these
symbols represent different values depending on the position they occupy in the
number. Data are stored in a binary format, which cannot be easily read by human
beings. This is the reason why input and output (I/O) interfaces are required. Every
computer stores numbers, character letters, and other special characters in coded form.
The value of each digit in such number is determined by
7. The digit itself
8. The position of the digit in the number and
9. The base of the number system where base is defined as the total number of
digits available in the number system.
The number system which we are using in our day-to-day life is called the decimal
number system. The Number systems follow the same pattern, the values can be
written with single character and then a new column is used to count the highest value
in the counting system. The Numerical value is called the base of the system like
Fundamentals of Digital System : Grade 9 1
Binary has base 2, Octal has 8, Decimal has 10, and Hexadecimal has decimal plus
alphabet up to F letters.
For example:
The binary system has 2 numerical characters and so has a base of 2:
01
Similarly, the Decimal system has 10 numerical characters and so has a base of 10:
0123456789
For writing numbers greater than 9 a second column is added to the left, and this
column has 10 times the value of the column immediately to its right.
For example:
The octal number 437 (written as 4378) consists of the digit 7 in the unit position, 3
in the tens position, 4 in the hundreds position and its value can be shown as:
(4×82) + (3×81) + (7×80)
= (4 64 3 8 7 1
= 256+24+7
= 287
It may also be observed that the same digit signifies different values, depending on
the position it occupies in the number.
For example the decimal value twenty-seven is written 33 in octal (3 eights + 3 ones).
Table 1.1
Some column values of different number system
Decimal 1000 100 10 1
Binary 8 4 2 1
Octal 512 64 8 1
Hexadecimal 4096 256 16 1
Each of these different number systems works in the same way, it is just that each
system has a different base, and the column values in each system increase by
multiples of the base number as columns are added to the left.
Because this module describes several different number systems, it is important to
know which system is being described. Therefore, if there is some doubt which system
a number is in, the base of the system, written as a subscript immediately after the
value, is used to identify the number system.
For example:
1010 represents the decimal value ten. (1 ten + 0 units)
102 represent the binary value two. (1 two + 0 units)
108 represent the octal value eight. (1 eight + 0 units)
1016 represents the hexadecimal value sixteen. (1 sixteen + 0 units)
Fundamentals of Digital System : Grade 9 5
Table 1.2
Decimal Binary Octal Hexadecimal
Radix (Base) 10 Radix (Base) 2 Radix (Base) 8 Radix (Base) 16
0 0 0 0
1 1 1 1
2 2 2
3 3 3
4 4 4
5 5 5
6 6 6
7 7 7
8 8
9 9
A
B
C
D
E
F
Exponents
A decimal number such as 618.510 can be considered as the sum of the values of its
individual digits, where each digit has a value dependent on its position within the
number (the value of the column):
= 618.510
Table 1.3
Column 2 Column 1 Column 0 Column -1
6 hundreds +1 tens +8 units +5 tenths
(6×102) (1×101) (8×100) (5×10-1)
600 +10 8 +0.5
For example
It is all done by changing the radix exponent.
902.610 = 902.6 x 100 = 90.26 x 101 = 9.026 x 102 = .9026 x 103
The radix point is moved one place to the left by increasing the exponent by one.
It is also possible to move the radix point to the right by decreasing the exponent. In
this way the radix point can be positioned wherever it is required, in any number
system, simply by changing the exponent. This is called floating point notation and
then calculate by calculator or yourself.
Normalised Form
Putting the radix point at the front of the number, and keeping it there by changing the
exponent we can make, calculations easier for any radix.
The same method (multiplying each digit by its column value) can be applied to
convert any system to decimal.
Decimal to Octal
Decimal to Binary
Quick Conversions
The most commonly encountered number systems are binary and hexadecimal, and a
quick method for converting to decimal is to use a simple table showing the column
weights, as shown in tables.
Table
Bit 27 26 25 24 23 22 21 20
8 bit Binary 0 1 0 0 0 0 1 1
To convert from binary to decimal, write down the binary number giving each bit its
correct ‘weighting’ i.e. the value of the columns, starting with a value of one for the
right hand (least significant) bit. Giving each bit twice the value of the previous bit as
you move left.
Example:
To convert the binary number 010000112 to decimal, write down the binary number
and assign a ‘weighting’ to each bit as in Table
Now simply add up the values of each column containing a 1 bit, ignoring any
columns containing 0.
Applying the appropriate weighting to 01000011 gives 64 + 2 + 1 = 67
Therefore: 010000112 = 6710
Converting Hexadecimal to Decimal
Table
Hex value 2 5 C B
A similar method can be used to quickly convert hexadecimal to decimal, using Table:
The hexadecimal digits are entered in the bottom row and then multiplied by the
weighting value for that column.
Binary to Hexadecimal
Converting between binary and hexadecimal is a much simpler process; hexadecimal
is really just a system for displaying binary in a more readable form.
Binary is normally divided into Bytes (of 8 bits) it is convenient for machines but
quite difficult for humans to read accurately. Hexadecimal groups each 8-bit byte into
two 4-bit nibbles, and assigns a value of between 0 and 15 to each nibble. Therefore
each hexadecimal digit (also worth 0 to 15) can directly represent one binary nibble.
This reduces the eight bits of binary to just two hexadecimal characters.
Table
Binary Hexadecimal
0000 0
0001 1
0010 2
0011 3
For example:
111010012 is split into 4 bits from the LSB (least significant bits) and if there
wouldn't have 4 bits on MSB (most significant bits) you can add zero in front
of MSB for making 4 bits group.
Otherwise, 111010012 is split into 2 nibbles 11102 and 10012 then each nibble
is assigned a hexadecimal value between 0 and F.
The bits in the most significant nibble (11102) add up to 8+4+2+0 = 1410 = E16
The bits in the least significant nibble (10012) add up to 8+0+0+1 = 910 = 916
Therefore 111010012 = E916
Converting hexadecimal to binary of course simply reverses this process.
For example: BAD16 to binary
Here, Binary value of B (11) = 10112
Binary value of A (10) = 10102
Binary value of D (13) = 11012
Then concatenate the nibble value as like B A D has 1011 1010 11012
Therefore, BAD16= 1011101011012
Binary Octal
000 0
001 1
010 2
011 3
100 4
101 5
110 6
111 7
For example:
111010012 is split into 3 bits from the LSB (least significant bits) and if there
wouldn't have 3 bits on MSB (most significant bits) you can add zero in front
of MSB for making 3 bits group as 112 1012 0012 is equal to 0112 1012
0012 then each group is assigned a octal value between 0 and 7.
The bits in the most significant 3 bits group (0112) add up to 0+2+1 = 310 and
next 3 bits group (1012) add up to 4+0+1 = 510
The bits in the least significant nibble (0012) add up to 0+0+1 = 110
Therefore 111010012 = 3518
Converting hexadecimal to binary of course simply reverses this process.
For example: 7018to binary
Here, Binary value of 7 in octal = 1112
Binary value of 0in octal = 0002
Binary value of 1in octal = 0012
Then concatenate the 3 bit group value as like 7 0 1 has 111 000 0012
Therefore, 7018= 1110000012
Signed Binary
Signed Binary Notation
There are a number of ways in which binary numbers can represent both positive and
negative values, 8 bit systems for example normally use one bit of the byte to represent
either + or − and the remaining 7 bits to give the value. One of the simplest of these
systems is SIGNED BINARY, also often called ‘Sign and Magnitude’, which exists
in several similar versions, but is commonly an 8 bit system that uses the most
significant bit (MSB) to indicate a positive or a negative value. By convention, a 0 in
this position indicates that the number given by the remaining 7 bits is positive, and a
most significant bit of 1 indicates that the number is negative.
For example:
+4510 in signed binary is (0)01011012
-4510 in signed binary is (1)01011012
Table 2.3.1
Binary Decimal Signed Binary
11111111 255 -127
11111110 254 -126
11111101 253 -125
10000010 130 -2
10000001 129 -1
10000000 128 -0
01111111 127 +127
00000011 3 +3
00000010 2 +2
00000001 1 +1
00000000 0 +0
Note:
The brackets around the MSB (the sign bit) are included here for clarity but
brackets are not normally used. Because only 7 bits are used for the actual
number, the values the system can represent range from are −12710 or
111111112, to +12710.
A comparison between signed binary, pure binary and decimal numbers is
shown in Table2.3.1 Notice that in the signed binary representation of positive
numbers between +010 and +12710, all the positive values are just the same as in
pure binary. However the pure binary values equivalents of +12810 to +25510 are
now considered to represent negative values −0 to −127.
This also means that 010 can be represented by 000000002 (which is also 0 in
pure binary and in decimal) and by 100000002 (which is equivalent to 128 in
pure binary and in decimal).
Summary:
Electronic systems may use a variety of different number systems, (e.g. Decimal,
Hexadecimal, Octal, and Binary).
The number system in use can be identified by its radix (10, 16, 8, 2).
The individual digits of a number are scaled by the Radix Point.
The Exponent is the system radix raised to a power dependent on the column
value of a particular digit in the number.
In Floating Point Notation the radix point can be moved to a new position without
changing the value of the number if the Exponent of the number is also changed.
Figure. 1.5.1 shows the result of adding −4 to +6, using ones complement, (this is the
same as subtracting +4 from +6, and so it is crucial to arithmetic).
The result, 000000012 is 110 instead of 210.
This is better than subtraction in signed binary, but it is still not correct. The result
should be +210 but the result is +1 (notice that there has also been a carry into the
none existent 9th bit).
Figure. shows another example, this time adding two negative numbers −4 and −3.
Because both numbers are negative, they are first converted to ones complement
notation.
+410 is 00000100 in pure 8 bit binary, so complementing gives 11111011.
Table
Decimal Signed Binary 1's complement
+45 00101101 00101101
-45 10101101 11010010
Binary sum 11011010 11111111
Decimal 010 -9010 -12710
This is not good enough, however there is a system that overcomes this difficulty and
allows correct operation using both positive and negative numbers. This is the Twos
Complement system.
Table
Producing a Two's complement Negative Number
+5 in 8 bit binary (or 8-bit signed Binary) is 00000101
Complementing to produce the One's complement 11111010
With 1 added 1
So -5 in two's complement is 11111011
Table
2's complement (8 bits) Decimal values
01111111 +127
01111110 +126
011111101 +125
00000010 +2
00000001 +1
00000000 0
11111111 -1
11111110 -2
1000010 -126
1000001 -127
1000000 -128
Ignore
If a final carry is generated discard the carry and the answer is given by the
remaining
Bits which is positive i.e., (0001.1011)2 = (+ 1.68625)10
(ii) First convert the two numbers 25 and 15 into its 8-bit binary equivalent and
find out
the 2’s complement of 15, then add +25 to -15.
15 = 0 0 0 0 1 1 1 1 (8-bit binary equivalent of 15)
15 = 1 1 1 1 0 0 0 0 (1’s complement)
+1
------------------------------
15 = -15 = 1 1 1 1 0 0 0 1 (2’s complement of 15)
+25 = 0 0 0 1 1 0 0 1 (8-bit binary equivalent of 25)
------------------------------
Addition of -15 to +25
= +10 = 0 0 0 0 1 0 1 0
-------------------------------
Hence -15 to +25 = (10)10 = (1010)2.
100010
Ignore carry to get answer as 00010 = 2.
23 010111
- (- 48) + 010000
71 100111
1 1 0 1 1 1 0 0 1 = -71
Carry is discarded
Overflow Problems.
Steps can be taken to accommodate large numbers, by breaking a long binary word
down into byte sized sections and carrying out several separate calculations before
assembling the final answer. However this doesn’t solve all the cases where errors can
occur.
A typical overflow problem that can happen even with single byte numbers is
illustrated in Figure.
BCD Codes
The BCD8421 code is so called because each of the four bits is given a ‘weighting’
according to its column value in the binary system. The least significant bit (lsb) has
Table
MSB BCD8421 LSB
Decimal 8 4 2 1
0 0 0 0 0
1 0 0 0 1
2 0 0 1 0
3 0 0 1 1
4 0 1 0 0
5 0 1 0 1
6 0 1 1 0
7 0 1 1 1
8 1 0 0 0
9 1 0 0 1
So the 8421BCD code for the decimal number 610 is 01108421. Check this from
Table.
For numbers greater than 9 the system is extended by using a second block of 4 bits
to represent tens and a third block to represent hundreds etc.
2410 in 8 bit binary would be 00011000 but in BCD8421 is 0010 0100.
99210 in 16 bit binary would be 00000011111000002 but in BCD8421 is 1001 1001
0010.
Therefore BCD acts as a half way stage between binary and true decimal
representation, often preparing the result of a pure binary calculation for display on a
decimal numerical display. Although BCD can be used in calculation, the values are
not the same as pure binary and must be treated differently if correct results are to be
obtained. The facility to make calculations in BCD is included in some
microprocessors.
Summary:
The one's complement of a binary number is defined as the value obtained by
inverting all the bits in the binary representation of the number (swapping 0s for
1s and vice versa). The ones' complement of the number then behaves like the
negative of the original number in some arithmetic operations.
Two's complement is a mathematical operation on binary numbers, as well as a
binary signed number representation based on this operation. Its wide use in
computing makes it the most important example of a radix complement.
The two's complement of an N-bit number is defined as the complement with
respect to 2N; This is also equivalent to taking the ones' complement and then
adding one
Two’s complement is found by first finding 1’s complement and then adding 0001
b.
Two’s complement gives negative of a given number
Adding a number with its two’s complement gives all bits = 0s
In subtraction by 1’s complement we subtract two binary numbers using carried
by 1’s complement.
The steps to be followed in subtraction by 1’s complement are:
To write down 1’s complement of the subtrahend.
To add this with the minuend.
If the result of addition has a carryover then it is dropped and an 1 is added in the
last bit.
If there is no carry over, then 1’s complement of the result of addition is obtained
to get the final result and it is negative.
With the help of subtraction by 2’s complement method we can easily subtract
two binary numbers.
Self-Evaluation:
(Short Answer Questions)
Add the binary numbers 1011 and 101 in both decimal and binary forms.
Add the binary numbers 1010110 and 1011010.
Add the binary numbers 10111 and 1011.
Find the complements of the following numbers:
49510 b)2910 c) 48 d)c16 e) 25 324
Find the complements of the following binary numbers:
a) 10 b) 101 c)101101 d) 011100
e) 10110001 f) 001101001110
Subtract 01101112 from 11011102.
Subtract 0110112 from 100002.
Subtract 2510 from 5010 using complementary method.
Subtract 23410 from 58810 using complementary method.
Subtract 010102 from 100002 using complementary method.
Multiply the binary numbers 1100 and 1010.
Multiply the binary numbers 101111 and 111.
Divide 110012 by 1012.
Divide 01101112 by 01112.
What are the primary advantages of performing subtraction by the complementary
method in digital computers?
Introduction
Digital Logic Gates
The Digital Logic Gate is the basic building block from which all digital
electronic circuits and microprocessor based systems are constructed from. Basic
digital logic gates perform logical operations of AND, OR and NOT on binary
numbers.
In digital logic design only two voltage levels or states are allowed and these states
are generally referred to as Logic “1” and Logic “0”, High and Low,
or True and False. These two states are represented in Boolean Algebra and standard
truth tables by the binary digits of “1” and “0” respectively.
A good example of a digital state is a simple light switch as it is either “ON” or “OFF”
but not both at the same time. Then we can summarize the relationship between these
various digital states as being:
table 1
Most digital logic gates and digital logic systems use “Positive logic”, in which a logic
level “0” or “LOW” is represented by a zero voltage, 0v or ground and a logic level
“1” or “HIGH” is represented by a higher voltage such as +5 volts, with the switching
Truth Table
Truth table is the representation of inputs and outputs of Boolean variables and
calculation by using Boolean operators in tabular format. It simply takes possible
combination of inputs (in T and F or 1 and 0 formats) and generates only one
corresponding output by using Boolean operators. For example:
A B O=A.B
F F F
F T F
T F F
T T T
Table 2
Where A and B are inputs variables which only has one of the two possible values T
or F(1 or 0) and only one output 0.
Notations
Gates are identified by their function: AND, OR, NOT, NAND, NOR, X-OR and X-
NOR. Capital letters are normally used to make it clear that the term refers to a logic
gate. The above said logic gates can be classified into following categories:
Fig 2
Here input is A output is x=A'
A B'
0 1
1 0
Table 2
Fig 3
Venn Diagram of NOT Gate
Fig 4
AND Gate
AND gate is the physical realization of logical multiplication. It is an electronic circuit
that generates an output signal of 1, only if all input signals are also 1. Two or more
switches connected in series behave as an AND gate.
A.B=C
Where. represent AND gate
Logical Diagram
Truth Table
OR Gate:
An OR gate is the physical realization of logical addition. It is an electronic circuit
that generates an output signal of 1, if any of the input signals is also 1.
Two or more switches connected in parallel behave as an OR gate. Observe from
Figure that the input current will reach the output point when any one or both switches
(A and B) are in ON(1) state . There will be no output only when both the switches
are in OFF (0) state.
Mathematically it is denoted as
A+B= C
Where + denote as OR Gate
𝑨. 𝑩=C
Logical Diagram of NAND
𝑨 𝑩=C
Logical diagram
Truth Table
Ven Diagram of NOR
XOR Gate
Fundamentals of Digital System : Grade 9 55
It stands for exclusive OR Gate. XOR Gate has two inputs and only one output. The
output of XOR Gate is 1 (true) only when both inputs are different otherwise output
is 0 (false). XOR Gate is represented by
Mathematically it is represented as
A B =C
Logical Diagram
Truth Table
𝑨 𝑩=C
Logical Diagram
Truth Table
De Morgan has suggested two theorems which are extremely useful in Boolean
Algebra. The two theorems are discussed below.
Theorem 1
The complements of the sum of the Boolean variables are equal to the product of their
individual complements. i.e.
The left hand side (LHS) of this theorem represents a NAND gate with inputs A
and B, whereas the right hand side (RHS) of the theorem represents an OR gate
with inverted inputs.
This OR gate is called as Bubbled OR.
since the values in the 𝐴. 𝐵 and 𝐴̅+ 𝐵 are the same for all input combination, we can
conclude that the two expression are logically equivalent. Hence 𝐴. 𝐵 = 𝐴̅ + 𝐵 ,
theorem 1 is proved.
Theorem 2
The complements of the product of the Boolean variables are equal to the sum of their individual
complements
i.e
The LHS of this theorem represents a NOR gate with inputs A and B, whereas the
RHS represents an AND gate with inverted inputs.
This AND gate is called as Bubbled AND.
Since the values in the 𝐴 𝐵 and 𝐴̅. 𝐵 are the same for all input combination .We
can conclude that the two expressions are logically equivalent. Hence 𝐴 𝐵 = 𝐴̅. 𝐵
Summary
In logic gates 'OR' operator used for logical addition is represented by the symbol
'+' ;
AND operator used for logical multiplication is represented by the symbol '.'
NOT operator used for complement is represented by the symbol " - ".
NOR operator is the combine form of OR and NOT Gates.
Self-Evaluation
Very short question
what will be the output of NOT gate when input is 1 ?
The output of an AND gate with three inputs, A, B, and C, is HIGH when ________.
A. A = 1, B = 1, C = 0
B. A = 0, B = 0, C = 0
C. A = 1, B = 1, C = 1
D. A = 1, B = 0, C = 1
1. If a 3-input NOR gate has eight input possibilities, how many of those
possibilities will result in a HIGH output?
A. 1
B. 2
C. 7
D. 8
2. If a signal passing through a gate is inhibited by sending a LOW into one of the
inputs, and the output is HIGH, the gate is a(n):
A. AND
B. NAND
C. NOR
D. OR
P X P Q X
0 0 0
1 0 1
1 0
1 1
Short questions
1. Define logic gates .
2. What is truth table?
3. Draw the logical diagram of XOR Gate.
4. Construct the truth table of NAND Gate.
5. List the Universal Gates.
6. State De Morgan's first theorem.
7. State De Morgan's second theorem.
Long Questions
1. Explain OR Gate with its truth table.
2. Describe the AND Gate with its electrical diagram.
3. Explain the statement "NOT Gate is inverter".
4. Define Truth table, operators and operands with examples.
5. Construct truth table, logic diagram, Venn diagram and use of AND, OR and
NOT gates.
6. State and prove the De-Morgan's theorems.
Web Resources
There are a number of resources available on the Internet and the Websites that
support this book and help readers keep up with developments in this field.
https://www.tutorialspoint.com/computer_logical_organization/logic_gates.htm
References
Computer Fundeamentals- sixth Edition
Pradeep Kr. Sinha
Priti Sinha
http://www.tutorialspoint.com
http://www.allaboutcircuits.com/textbook/digital/chpt-3/digital-signals-gates/
Glossary
Digital =It is a signal or data expressed as series of the digits 0 and 1, typically
represented by values of a physical quantity such as voltage or magnetic
polarization.
Boolean Algebra = A division of mathematics which deals with operations on
logical values. Boolean algebra traces its origins to an 1854 book by
mathematician George Boole.
Digital Logic= It is the representation of signals and sequences of a digital circuit
through numbers
electronic circuit= It is a complete course of conductors through which current can
travel. Circuits provide a path for current to flow.
AND Gate
AND gate produces an output as 1, when all its inputs are 1; otherwise the output is
0. This gate can have minimum 2 inputs but output is always one. Its output is 0 when
any input is 0.
IC 7408
---------------------------------------------------------------------------------------------------
IC 7432
---------------------------------------------------------------------------------------------------
NOT Gate
NOT gate produces the complement of its input. This gate is also called an
INVERTER. It always has one input and one output. Its output is 0 when input is 1
and output is 1 when input is 0.
IC 7404
IC 7400
---------------------------------------------------------------------------------------------------
NOR Gate
NOR gate is actually a series of OR gate with NOT gate. If we connect the output of
an OR gate to the input of a NOT gate, this combination will work as NOT-OR or
NOR gate. Its output is 0 when any or all inputs are 1, otherwise output is 1.
IC 7402
68 Fundamentals of Digital System : Grade 9
Exclusive OR (X-OR) Gate
X-OR gate produces an output as 1, when number of 1’s at its inputs is odd, otherwise
output is 0. It has two inputs and one output.
IC 7486
---------------------------------------------------------------------------------------------------
Exclusive NOR (X-NOR) Gate
X-NOR gate produces an output as 1, when number of 1’s at its inputs is not odd,
otherwise output is 0. It has two inputs and one output.
---------------------------------------------------------------------------------------------------
Procedure:
1. Connect the trainer kit to ac power supply.
2. Connect the inputs of any one logic gate to the logic sources and its output to
the logic indicator.
3. Apply various input combinations and observe output for each one.
4. Verify the truth table for each input/ output combination.
5. Repeat the process for all other logic gates.
6. Switch off the ac power supply.
Learning Outcomes
After completion of this unit students will be able to
Define boolean expressions and their simplification.
Define Karnaugh and establish the correspondence between Karnaugh maps and
truth tables and logical expressions.
Demonstrate how to use Karnaugh maps to derive minimal sumof- products and
product-of-sums expressions.
Introduce the concept of "don't care" entries
Introduction
Boolean Algebra, which was invented by George Boole in 1854 is used to analyze
and simplify the digital (logic) circuits. It uses only the binary numbers i.e. 0 and 1. It
is also called as Binary Algebra or logical Algebra. The Karnaugh map provides a
simple and straight forward method of minimizing Boolean expressions. With the
Karnaugh map Boolean expressions having up to four and even six variables can be
simplified.
Venn Diagram
A Venn diagram is a representation of a Boolean operation using shaded overlapping
regions. There is one region for each variable, all circular in the examples here. The
interior and exterior of region x corresponds respectively to the values 1 (true) and 0
(false) for variable x. The shading indicates the value of the operation for each
combination of regions, with dark denoting 1 and light 0. We will adopt the terms OR
and AND instead of union and intersection since that is the terminology used in digital
electronics.
Above left, we have a Venn diagram showing the set A in the circle within the
universe U, the rectangular area. If everything inside the circle is A, anything outside
of the circle is not A. Thus, above center, we label the rectangular area outside of the
circle A as A-not instead of U. We show B and B-not in a similar manner.
What happens if both A and B are contained within the same universe? We show four
possibilities.
Let’s take a closer look at each of the four possibilities as shown above.
In the second example in the above Venn diagram, set A is totally contained within
set B How can we explain this situation? Suppose that sets A and B contain the
following members:
set A = {1,2} set B = {1,2,3,4,5,6,7,8}
All members of set A are also members of set B. Therefore, set A is a subset of Set B.
Since all members of set A are members of set B, set A is drawn fully within the
boundary of set B.
There is a fifth case, not shown, with the four examples. Hint: it is similar to the last
(fourth) example. Draw a Venn diagram for this fifth case.
The fourth example above shows that there is something in common between set A
and set B in the overlapping region. For example, we arbitrarily select the following
sets to illustrate our point:
If we look at the whole area of both, regardless of the hatch style, the sum total of all
hatched areas, we get the illustration above right which corresponds to the
inclusive OR function of A, B. The Boolean expression is A+B. This is shown by the
45o hatched area. Anything outside of the hatched area corresponds to (A+B)-not as
shown above. Let’s move on to next part of the fourth example.
The other way of looking at a Venn diagram with overlapping circles is to look at just
at the part common to both A and B, the double hatched area below left. The Boolean
expression for this common area corresponding to the AND function is AB as shown
below right. Note that everything outside of double hatched AB is AB-not.
We have repeated the second example above left. Your fifth example, which you
previously sketched, is provided above right for comparison. Later we will find the
occasional element, or group of elements, totally contained within another group in a
Karnaugh Map.
Next, we show the development of a Boolean expression involving a complemented
variable below.
Example :
If we have two variables X and Y then,
Following is a canonical expression consisting of minterms XY + X’Y’ and
Following is a canonical expression consisting of maxterm (X+Y) . (X’ + Y’)
Now we will create a column for the minterm using the variables A and B. If input is
0 we take the complement of the variable and if input is 1 we take the variable as it is.
To get the desired canonical SOP expression we will add the minterms (product
terms) for which the output is 1.
F = A’B + AB’ + AB
Example
Suppose, we have a boolean function F defined on two variables A and B. So,
A and B are the inputs for F and lets say, output of F is true i.e., F = 1 when only
one of the input is true or 1.
Now we draw the truth table for F.
Now we will create a column for the maxterm using the variables A and B. If input is
1, we take the complement of the variable and if input is 0, we take the variable as is.
To get the desired canonical POS expression we will multiply the maxterms (sum
terms) for which the output is 0.
F = (A+B) . (A’+B’)
We saw the conversion of POS to shorthand notation. Lets check the conversion of
shorthand notation to POS.
This rule may be proven symbolically by factoring an “A” out of the two terms, then
applying the rules of A + 1 = 1 and 1A = A to achieve the final result:
Here are some examples of Boolean algebra simplifications. Each line gives a form
of the expression, and the rule or rules used to derive it from the previous one.
Generally, there are several ways to reach the result. Here is the list of simplification
rules.
Simplify: C + BC:
The cells are arranged so that each cell’s input combination differs from adjacent
cells by only a single bit.
This is called Gray code ordering – it ensures that physical neighbours in the array
are logical neighbours as well. (In other words, neighbouring bit patterns are
nearly the same, differing by only 1 bit).
Consider the following arrangements of cells:
2-input
a’. b’ a’. b
00 01
a .b’ a.b
10 11
The cells are arranged as above, but we write them empty, like this:
Also, in general, it is easier to order the inputs to a K-map so that they can be read
like a binary number.
(Show example.)
So, we have this grid. What do we do with it?
We put 1's in all the cells that represent minterms in the SSoP .
(In other words, we find the 1's in the truth table output, and put 1's in the cells
corresponding to the same inputs.)
Let’s do this in relation to the 2-input multiplexer example:
S A B Y
0 0 1 0
0 1 0 1
0 1 1 1
1 0 0 0
1 0 1 1
1 1 0 0
1 1 1 1
If there are two neighboring 1's in the grid, it means that the input bit change between
the two cells has no effect on the output, and thus there is redundancy. This leads to a
basic strategy.
Basic Strategy:
Group adjacent 1's together in square or rectangular groups of 2, 4, 8, or 16, such that
the total number of groups and isolated 1's is minimized, while using as large groups
as possible. Groups may overlap, so that a particular cell may be included in more
than one group.
(Recall that adjacency wraps around edges of grid.)
Applying this to the multiplexer example:
So, considering the best option above (i), notice the following:
(2)
(1)
So, we write out Boolean expressions for each group, leaving out the redundant
elements. That is, for each group, we write out the inputs that don’t change. The
multiplexer example, with two groups, gives us two terms, Y = S.B + S’.A
which is the same as what we achieved through using Boolean algebra to reduce the
circuit. So, we can summarize this process into a basic set of rules:
Examples
A B Y
0 0 1
0 1 1
1 0 1
1 1 0
There should be as few groups as possible, as long as this does not contradict any
of the previous rules.
Summary
SOP and POS –useful forms of Boolean equations
Design of a comb. Logic circuit
construct its truth table, (2) convert it to a SOP, (3)
simplify using Boolean algebra or K mapping, (4)
SOP and POS –useful forms of Boolean equations
Design of a comb. Logic circuit
(1) construct its truth table, (2) convert it to a SOP, (3)
simplify using Boolean algebra or K mapping, (4)
Implement
K map: a graphical method for representing a circuit’s
truth table and generating a simplified expression
“Don’t cares” entries in K map can take on values of 1
or 0. Therefore can be exploited to help simplification
Self Evaluation
Very short question
Q.1 Define Venn diagram.
Q.2 Draw venn diagram of A'
Q.3 List out different canonical forms.
Q.4 What do you mean by sum of product
Q.5 Define minterms.
Q.6 What is maxterms mean ?
Q.7 Complete following boolean expression
A+AB=
A+A'B=
(A+B)(A+C)=
Q.8 Define K-maps in short.
Resources
1 www.wikipedia.com
Computer Fundeamentals- sixth Edition
Pradeep Kr. Sinha Priti Sinha
http://www.tutorialspoint.com
http://www.allaboutcircuits.com/textbook/digital/chpt-3/digital-signals-gates/
Learning Outcomes
After completion of this unit you will be able to
To explain/describe the formalism of binary arithmetic logic
To explain/describe binary adder, half adders, full adders, half subtractors, full
subtractors.
Introduction
Binary arithmetic is essential part of all the digital computers and many other digital
systems. Binary logic deals with variables that assume discrete values and with
operators that assume logical meaning.
While each logical element or condition must always have a logical value of either
"0" or "1", we also need to have ways to combine different logical signals or
conditions to provide a logical result.
For example, consider the logical statement: "If I move the switch on the wall up, the
light will turn on." At first glance, this seems to be a correct statement. However, if
we look at a few other factors, we realize that there's more to it than this. In this
example, a more complete statement would be: "If I move the switch on the wall up
and the light bulb is good and the power is on, the light will turn on."
If we look at these two statements as logical expressions and use logical terminology,
we can reduce the first statement to:
Light = Switch
This means nothing more than that the light will follow the action of the switch, so
that when the switch is up/on/true/1 the light will also be on/true/1. Conversely, if the
switch is down/off/false/0 the light will also be off/false/0.
Looking at the second version of the statement, we have a slightly more complex
expression:
Adder
An adder is a digital circuit that performs addition of numbers. In
many computers and other kinds of processors adders are used in the arithmetic logic
units. They are also utilized in other parts of the processor, where they are used to
calculate addresses, table indices, increment and decrement operators, and similar
operations.
Half Adder
Before designing a binary adder, let us know some basic rules of binary addition. The
most basic binary addition is addition of two single bit binary numbers i.e. addition of
two binary digits.
i. 0+0 =0
ii. 0+1 =1
iii. 1+0 =1
iv. 1+1 = 10
The binary digits are 0 and 1. Hence, there must be four possible combinations of
binary addition of two binary bits. In the above list, first three binary operations result
in one bit but fourth one results in two bits. In one bit binary addition, if augend
and addend are 1, the sum will have two digits. (Augend is the number to which
Full Adder
The full adder is a conditional circuit which performs full binary addition. It means it
adds two bits and a carry and outputs a sum bit and a carry bit. Any bit of augend can
either be 1 or 0 and we can represent it with variable A, similarly any bit of addend
we represent with variable B. The carry after addition of same significant bit of augend
and addend can be represented by C. Hence truth table for all combinations of A, B
and C is as follows,
1) 0–0=0
2) 0–1=1
3) 1–0=1
4) 1–1=0
number we get, Now by adding first number, 110011 and 2's complement of second
number i.e. 11011. We get, Hence, 4 bit substractor can be drawn like,
Half Substractor
Half substractor is a combinational circuit which performs substraction of single bit
binary numbers. The substraction combinations of two single bit binary numbers can
be,
i. 0 - 0 = 0
ii. 0 - 1 = 1 with borrow 1
iii. 1 - 0 = 1
iv. 1 - 1 = 0
Now if we draw a truth table for that, with all differences (D) and borrow (b), we get,
Full Substractor
This is not practical to perform substraction only between two single bit binary
numbers. Instead binary numbers are always multi bits. The substraction of two binary
numbers is performed bit by bit from right (LSB) to left (MSB). During substraction
of same significant bit of minuend and subtrahend, there may be one borrow bit along
with difference bit. This borrow bit (either 0 or 1) is to be added to the next higher
significant bit of minuend and then next corresponding bit of subtrahend to be
subtracted from this. It will continue up to MSB. The combinational logic circuit
performs this operation is called full substractor. Hence, full substractor is similar to
half substractor but inputs in full substractor are three instead of two.
Two inputs are for the minuend and subtrahend bits and third input is for borrowed
which comes from previous bits substraction. The outputs of full adder are similar to
that of half adder, these are difference (D) and borrow (b). The combination of
minuend bit (A), subtrahend bit (B) and input borrow (bi) and their respective
differences (D) and output borrows (b) are represented in a truth table, as follow
Objectives
After competitions of this unit students will be able to
1. Define and design the different types of combinational logic circuit.
2. Design BCD to Seven Segment Decoder circuit.
Introduction
The digital Logic circuit may be combinational or sequential. A combinational circuit
consists of logic gates whose output at any time is determined directly from the present
combinations of inputs without regard for previous inputs. A combinational circuit
consists of input variables, logic gates and output variables. The logic gates accept
signals from the input and generate signals to the outputs. This process transforms
binary information from the given input data to the required output data. Clearly, both
input and output data are represented by binary signals; i.e. they exist in two possible
values one representing logic-1 and the other logic-0.
S1 S0 Y
0 0 I0
0 1 I1
1 0 I2
1 1 I3
Table 6.1.2
(b) Truth Table of 4:1 Multiplexer
This multiplexer has four input lines, two select lines and one output line. This
particular multiplexer consists of input lines I0 through I3, select lines S0 and S1 and
output line Y. the output depends on the value of selection lines S0 and S1 which is
control inputs. The control inputs determine which of the input line is transmitted to
the output line. For example, in the figure when S0S1=00, I0 appears at the output
line Y while all the other inputs are disabled. Similarly when S0S1=11 then bottom
AND gate is enabled and input I3 is transmitted to the output line Y and so on. An
example of 1-to-4 multiplexer is IC 74153 in which output is same as the input.
Another example of 4-to-1 line multiplexer is 45352 in which the output is the
complement of input. IC 74150 is a 16-to-1 multiplexer.
0 0 0 I0
0 0 1 I1
0 1 0 I2
0 1 1 I3
1 0 0 I4
1 0 1 I5
1 1 0 I6
1 1 1 I7 Table 6.1.3
(b) Truth Table of 8:1 Multiplexer
Logical Expression:
Y= S 2 . S1 . S 0 . I0 + S 2 . S1 .S0 .I1+ S 2 . S1. S 0 .I2+ S 2 .S1.S0.I3 + S2. S1 . S 0 I4 +
S2 . S1 . S0 .I5 + S2.S1. S 0 . I6 +S2.S1.S0.I7
We can draw the logic diagram of 8-to-1 multiplexer using the Boolean expression,
eight AND gates and three NOT gates in the figure 6.1.3 (c).
Minterms A B C F
0 0 0 0 0
1 0 0 1 1
2 0 1 0 0
3 0 1 1 1
4 1 0 0 0
5 1 0 1 1
6 1 1 0 1
7 1 1 1 0
A B C F
0 0 0 0
0 0 1 1
0 1 0 1
0 1 1 0
1 0 0 1
1 0 1 1
1 1 0 0
1 1 1 0
Table 6.1.5
(b) Truth Table of implementations
of 4:1 Mux
Applications of Multiplexer
Multiplexer is used where multiple data can be transmitted using a single transmission
line. Following are some of the areas where multiplexer can be implemented.
1. Communication system.
2. Telephone network.
3. Computer memory
4. Transmission from computer system to the satellite
Demultiplexer
It is a combinational circuit which
performs the reverse operations of
the multiplexer i.e. it receives one
input and transmits it to over
several output lines. It has only
one input, n outputs and m select
input lines. At a time only one
output line is selected by the
select lines and the input is
transmitted to the selected output
line. In short it is also called as
DMUX. The enable input decides whether the circuits is operational or not, if this
enable is zero the circuit is not operational and we will have zero at all the output
There are different types of demultiplexer based on the output configuration such as
1:4, 1:8, and 1:16. These multiplexers are available in different ic packages and some
of the most commonly used demultiplexers IC includes 74139 (Dual 1:4 DEMUX),
73136(1:8 DEMUX), 74154(1:16 DEMUX), 74159(1:16 open controller type) etc.
E S0 Y0 Y1
0 0 0 0
0 1 0 0
1 0 I 0
1 1 0 I
The truth table of 1:2 Demultiplexer is shown in the table 7.1.1 (b), when E =0 and
S=0, demultiplexer is not operational so both the output Y0 and Y1 is 0. In the same
way, when E=0 and S=1, both outputs are zero. When E=1 and S=0, demultiplexer is
operational and data input is transferred to Y0. When E=1 and S=1, data input is
transferred to Y1.
Now we can find the Boolean expression from the above truth table 7.1.1 (b) as
follows.
Inputs Outputs
E S1 S0 Y0 Y1 Y2 Y3
0 X X 0 0 0 0
1 0 0 I 0 0 0
1 0 1 0 I 0 0
1 1 0 0 0 I 0
1 1 1 0 0 0 I
Y0=I S1 . S 0
Y1= S1 .S0.I
Y2=S1. S 0 .I
Y3=S1.S0.I
Where" I" is the input data line S0 and S1 are the select lines and Y0 to Y3 are output
lines.
Now, we can draw the logic circuit of 1:4 demultiplexers using four AND gates and
two NOT gates in the figure 7.1.2 (c).
This type of demultiplexer is available in IC form and a typical IC 74139 is the most
commonly used dual 1:4 demultiplexer.
The truth table of the 1:8 demultiplexer is shown in the table 7.1.3 (b).
1. Y0=I. S 2 . S1 . S 0
2. Y1=I. S 2 . S1 .S0
3. Y2=I. S 2 .S1. S 0
4. Y3=I. S 2 .S1.S0
5. Y4=I.S2. S1 . S 0
6. Y5=I.S2. S1 .S0
7. Y6=I.S2.S1. S 0
8. Y7=I.S2.S1.S0
On the basis of these Boolean expressions, we can clearly draw the logic circuit of 1:8
demultiplexer using eight AND gates and three NOT gates in the figure 7.1.3 (c)
below.
Code Converters
A code converter is a logic circuit that converts one form of digital code to another
form i.e. it converts BCD code to Binary code, HEX code to Binary etc.
Combinational circuit performs this transformation by means of logic gates.
Decoders
A decoder is a combinational circuit that converts binary information from n input
lines to a maximum of 2n unique output lines. If the n-bit decoded information has
unused or don’t care combinations, the decoder output will have fewer than 2noutputs.
The decoder presented here is called n-to–m line decoders, where m≤2n .Their
purpose is to generate the 2n or fewer minterms of n input variables. Consider the 3-
to-8line circuit of fig.( … ). The three inputs are decoded into eight outputs, each
output representing one of the minterms of the 3-input variable. The three inverters
provide the complements of the inputs, and each one of the AND gates one of the
minterms. The application of this Decoder is to convert binary- to-octal. The input is
in the form of binary numbers, and the outputs will be represent eight digit octal
number system.
A decoderwith an enable input can function as a demultiplexer. A demultiplexer is a
circuit that receives information on a single line and transmits this information on one
of 2n output lines. The selection of a specific output line is controlled by the bit value
Binary Decoder
Abinary decoder is a combinational circuit that converts binary code of n input lines
to the one of the 2n output lines depending on the combinations of input lines. It is
used when there is needed to activate exactly one of 2n output lines based on the n
input values.
The Figure(8.2) shows the general structure of Binary Decoder in which encoded
information is accepted at n input lines and the output is produced at 2n possible
output lines.
For the given input, the outputs D0 through D3 are active high if the enable input E=1.
When E=0 and X=Y=0, the decoder is on the off state. So we simply use don’t care
condition.
When E=1 and XY=00, the decoder output D0 is high while all the other outputs are
low. When X=0 and Y=1 then D1 is active. The relationship between inputs and
outputs are clearly shown in the truth table 8.2 (b).
E X Y D0 D1 D2 D3
0 X X 0 0 0 0
1 0 0 1 0 0 0
1 0 1 0 1 0 0
1 1 0 0 0 1 0
1 1 1 0 0 0 1
Inputs Outputs
X Y Z D0 D1 D2 D3 D4 D5 D6 D7
0 0 0 1 0 0 0 0 0 0 0
0 0 1 0 1 0 0 0 0 0 0
0 1 0 0 0 1 0 0 0 0 0
0 1 1 0 0 0 1 0 0 0 0
1 0 0 0 0 0 0 1 0 0 0
1 0 1 0 0 0 0 0 1 0 0
1 1 0 0 0 0 0 0 0 1 0
1 1 1 0 0 0 0 0 0 0 1
Using the above minterms we can draw the logic diagram of 3-to-8 line decoder using
eight AND gates and there NOT gates in the figure 8.3 (b). Only one output is high at
a given time for particular combinations of inputs. A particular application of this
Inputs Outputs
W X Y Z D0 D1 D2 D3 D4 D5 D6 D7 D8 D9
0 0 0 0 1 0 0 0 0 0 0 0 0 0
0 0 0 1 0 1 0 0 0 0 0 0 0 0
0 0 1 0 0 0 1 0 0 0 0 0 0 0
0 0 1 1 0 0 0 1 0 0 0 0 0 0
0 1 0 0 0 0 0 0 1 0 0 0 0 0
0 1 0 1 0 0 0 0 0 1 0 0 0 0
0 1 1 0 0 0 0 0 0 0 1 0 0 0
0 1 1 1 0 0 0 0 0 0 0 1 0 0
1 0 0 0 0 0 0 0 0 0 0 0 1 0
1 0 0 1 0 0 0 0 0 0 0 0 0 1
1 0 1 0 0 0 1 0 0 0 0 0 1 0
1 0 1 1 0 0 0 1 0 0 0 0 0 1
1 1 0 0 0 0 0 0 1 0 0 0 1 0
1 1 0 1 0 0 0 0 0 1 0 0 0 1
1 1 1 0 0 0 0 0 0 0 1 0 1 0
1 1 1 1 0 0 0 0 0 0 0 1 0 1
Table 8.4 (a) Truth Table BCD to Decimal Decoders
Inputs Outputs
D0 D1 D2 D3 D4 D5 D6 D7 B2 B1 B0
1 0 0 0 0 0 0 0 0 0 0
0 1 0 0 0 0 0 0 0 0 1
0 0 1 0 0 0 0 0 0 1 0
0 0 0 1 0 0 0 0 0 1 1
0 0 0 0 1 0 0 0 1 0 0
0 0 0 0 0 1 0 0 1 0 1
0 0 0 0 0 0 1 0 1 1 0
0 0 0 0 0 0 0 1 1 1 1
Inputs Outputs
D0 D1 D2 D3 D4 D5 D6 D7 D8 D9 D C B A
1 0 0 0 0 0 0 0 0 0 0 0 0 0
0 1 0 0 0 0 0 0 0 0 0 0 0 1
0 0 1 0 0 0 0 0 0 0 0 0 1 0
0 0 0 1 0 0 0 0 0 0 0 0 1 1
0 0 0 0 1 0 0 0 0 0 0 1 0 0
0 0 0 0 0 1 0 0 0 0 0 1 0 1
0 0 0 0 0 0 1 0 0 0 0 1 1 0
0 0 0 0 0 0 0 1 0 0 0 1 1 1
0 0 0 0 0 0 0 0 1 0 1 0 0 0
0 0 0 0 0 0 0 0 0 1 1 0 0 1
Table 9.3 (a) Truth Table of Decimal to BCD Encoder
Inputs Outputs
D0 D1 D2 D3 X Y V
0 0 0 0 X X 0
1 0 0 0 0 0 1
X 1 0 0 0 1 1
X X 1 0 1 0 1
X X X 1 1 1 1
Table 9.4 (a) Truth Table of Priority Encoder
Outputs
In- B B B B
put 3 2 1 0
0 0 0 0 0
1 0 0 0 1
2 0 0 1 0
3 0 0 1 1
4 0 1 0 0
5 0 1 0 1
6 0 1 1 0
7 0 1 1 1
8 1 0 0 0
9 1 0 0 1
A 1 0 1 0
B 1 0 1 1
C 1 1 0 0
D 1 1 0 1
Table: 9.5: (a) Logic circuit of HEX to Binary Encoder
E 1 1 1 0
F 1 1 1 1
Summary
A combinational circuit consists of logic gates whose output at any time is
determined directly from the present combinations of inputs irrespective of
previous inputs.
Multiplexing means transmitting a large numbers of information units over a
smaller number of channels or lines.
There are varieties of multiplexers. Some of them are as follows:
4:1 multiplexer
8:1 multiplexer
16:1 multiplexer
Self- Evaluation
(Group A)
Short Answer Questions
1. Consider the following statements
2. A multiplexer
3. Selects one of the several inputs and transmit it to a single output.
4. Routes the data from a single input to one of the many outputs.
5. Converts parallel data into serial data.
6. Is a combinational circuit.
(Group B)
Long Answer Questions
1. Design a combinational circuit whose input is a four bit number and whose
output is the 2's complement of the input number.
2. Design a combinational circuit with four input lines that represent a decimal
digit in BCD and four output lines that generate the 9's complement of the
input digit.
3. Design a combinational circuit that converts a decimal digit from the 8, 4,-2,-
1 code to BCD.
4. Design a combinational circuit that converts a decimal digit from the 2,4,2,1,
code to the 8, 4,-2,-1.
5. Design a combinational circuit that accepts a three bit number and generate an
output equal to the square of the input number.
6. The circuit shown doesn't represent
a. S(A,B)=Σ(1,2) b. Ex-OR gate with A and B as input
c. S (A, B) =ᴨ (0, 3) d. A . B +AB
Questions:
a) obtain the truth table
b) find the simplified output function in sum of product
c) find the simplified output function in Product of sum.
d) Draw the logic diagram.
1. What is an encoder? Draw the logic circuit of Decimal to BCD encoder and
explain its working.
2. What is a Decoder? Compare a decoder and a demultiplexer with suitable
block diagrams.
3. What is a digital multiplexer? Illustrate its functional diagram. Write the
scheme of a 4- input multiplexer using basic gates (AND/OR/NOT) and
explain its operation.
4. Implement the following function using 8 to 1 multiplexer Y( ,A ,B ,C D) =
∑ ( 0,1,2,5,9,11,13,15 ).
5. Implement the following function using 4-to-1 multiplexer. Y (, A, B C) = ∑
(2, 3, 5, 6).
6. A combinational circuit has 3 inputs A, B, C and output F. F is true for
following input combinations
A is False, B is true
A is False, C is true
A, B, C are False
A, B, C are True
(i) Write the Truth table for F. Use the convention True=1 and False = 0.
(ii) Write the simplified expression for F in SOP form.
(iii) Write the simplified expression for F in POS form.
(iv) Draw logic circuit using minimum number of 2-input NAND gates.
Learning Outcomes
After completion of this unit you will be able to
to impart to you a formalism of sequential logic.
to enable you to understand different type of sequential logic.
to enable you to implement RS or SR, T,D,JK, JK Master Slaves Flip Flop.
to enable you to understand the latch,level clocking,trigger and its different types
likes low, high level triggering etc.
Introduction:-
Sequential logic circuit consists of combinational circuit to which memory elements
are connected to form a feedback path.
4. Level Clocking
A clock is a control signal that periodically makes a transition from a 0 to 1
and then back to 0 again we usually denote the clock by the symbol clk or cp.
Trigger
The number of trigger pulses that is applied to the input of the circuit determines the
number in a counter. A single pulse makes the bit move one position, when it is
applied onto a register that stores multi-bit data.
In the case of SR Flip Flops, the change in signal level decides the type of trigger that
is to be given to the input. But the original level must be regained before giving a
second pulse to the circuit.
If a clock pulse is given to the input of the flip flop at the same time when the output
of the flip flop is changing, it may cause instability to the circuit. The reason for this
instability is the feedback that is given from the output combinational circuit to the
memory elements. This problem can be solved to a certain level by making the flip
flop more sensitive to the pulse transition rather than the pulse duration.
Types of Trigger
There are mainly four types of pulse-triggering methods. They differ in the manner in
which the electronic circuits respond to the pulse. They are
Flip Flop
Flip-flops are binary cells capable of storing one bit information. A flip-flop circuit
has two outputs one for the normal value and one for the complement value of the bit
stored in it. Binary information can enter in a flip-flop in a variety of ways, a fact
which give rise to different types of flip flops.
Flip-flop is a sequential circuit which generally samples its inputs and changes its
outputs only at particular instants of time and not continuously. Flip-flop is said to be
edge sensitive or edge triggered rather than being level triggered like latches.
Circuit Diagram
Truth Table
Block Diagram
Fig.7.3. T Flip-Flop
Truth Table
Operation
Block Diagram
Circuit Diagram
Truth Table
JK Flip-flop
Input Output
Description
J K Q Q
0 0 0 0
Memory
no change
same as 0 0 0 1
for the
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
162 Fundamentals of Digital System : Grade 9
clock input is pulsed either “HIGH”, the circuit will “toggle” from its SET state to a
RESET state, or vice-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.
The master-slave flip-flop eliminates all the timing problems by using two SR flip-
flops connected together in a series configuration. One flip-flop acts as the “Master”
circuit, which triggers on the leading edge of the clock pulse while the other acts as
the “Slave” circuit, which triggers on the falling edge of the clock pulse. This results
in the two sections, the master section and the slave section being enabled during
opposite half-cycles of the clock signal.
Circuit Diagram
Operation
SUMMARY
Sequential Logic: Sequential logic is a form of binary circuit design that employs
one or more inputs and one or more outputs, whose states are related by defined
rules that depend, in part, on previous states.
Synchronous: In this system, signals that affect the memory elements only at
discrete instants of time.
Asynchronous: In this sequential logic system depends upon the order in which
its input signals change and can be affected at any instant of time.
Latch: A latch is a class of flip-flop in place of clock-edge instance at which output
changes, a clock interval exists during which that output changes.
Clock: It is a control signal that periodically makes a transition from a 0 to 1 and
then back to 0 again we usually denote the clock by the symbol clk or cp.
High Level Triggering: When a flip flop is required to respond at its HIGH state,
a high level triggering method is used.
Low Level Triggering: When a flip flop is required to respond at its LOW state, a
Low Level Triggering method is used.
Positive Edge Triggering: When a flip flop is required to respond at a LOW to
HIGH transition state, positive edge triggering method is used.
Self-Evaluation
1. What is meant by sequential logic circuits? Draw a block diagram of sequential
logic circuits.
2. What is clock? Write its different clock levels.
3. What is trigger? Explain its types.
4. What is flip flop? List basic flip flop circuits.
5. What is SR or RS flip flop? Draw a block diagram, circuit diagram and truth table.
6. What is Toggle (T) flip flop? Draw a block diagram and truth table with operation.
7. What is the use of T flip flop?
8. What is Delay (D) flip flop? Draw a block diagram, circuit diagram and truth table
with operation.
9. What is a JK flip flop? Write its symbol diagram and circuit diagram with its
operation.
10. What is master slave flip flop? Draw its circuit diagram and truth table with
operation.