Class 10 Digital and Microprocessor Notes
Class 10 Digital and Microprocessor Notes
Number System:- In digital electronics, the number system is used for representing the
information. The number system has different bases and the most common of them are the
decimal, binary, octal, and hexadecimal. The base or radix of the number system is the
total number of the digit used in the number system. Suppose if the number system
representing the digit from 0 – 9 then the base of the system is the 10.
Types of Number Systems:-
1. Decimal Number System
2. Binary Number System
3. Octal Number System
4. Hexadecimal Number System
Binary Number System :- Number System with base or radix value 2 is termed as
Binary number system. It uses 2 digits i.e. 0 and 1 for the creation of numbers. The
modern computers do not process decimal number; they work with another number system
that is binary number system. The digital electronic equipments are works on the binary
number system and hence the decimal number system is converted into binary system. The
binary number system is very useful in electronic devices and computer systems because
it can be easily performed using just two states ON and OFF or True and False or High
and Low i.e. 0 and 1. The Binary number system is represented by (1100) 2 , (0011)2 .
The numbers in this system may possess both integer and fraction are
separated by a dot (.). The part of the number , which lies to the left of the binary point is
known as integer part. Similarly , the part of the number which lies to the right of the
binary point is known as fractional part.
The successive positions to the integer part of the binary point have weights of
0 1 2
2 , 2 , 2 and so on. Similarly , the successive positions to the fractional part of the
binary point having weights of 2 -1 , 2-2 , 2-3 and so on. That means , each positions has
specific weight, which is power of base 2.
For example, Suppose A = 100.101 be a binary number. The integer part of this number
is 100 and the fractional part of this number is 0.101. the digits 1, 0 and 0 of integer part
have weights of 20 , 21 and 22 respectively. Similarly ,the digits 1, 0 and 1 of fractional part
have weights of 2-1 , 2-2 and 2-3 respectively.
Mathematically , we can express it as,
(100.101)2 = (1x22)+( 0x21 )+ (0x20 )+ (1x2-1 )+ (0x2-2 )+ (1x2-3)
Characteristics of Binary Number System :-
1. It holds only two values, i.e., either 0 or 1.
2. It is also known as the base 2 number system.
3. The position of a digit represents the 0 power of the base(2). Example: 20
4. The position of the last digit represents the x power of the base(2). Example: 2 x,
where x represents the last position, i.e., 1
1. The main advantage of using binary is that it is a base which is easily represented by
electronic devices.
2. The Binary Number System are also ease of use in coding, fewer computations and
less computational errors.
Disadvantage of Binary Number System :-
1. The major disadvantage of binary number is difficult to read and write for humans
because of large number of binary of a equivalent decimal number.
Application /Uses of Binary Number System:-
1. Useful in computer technology and computer programming languages.
2. Helpful in digital encoding.
3. The binary number system can also be used in Boolean algebra.
Decimal Number System:- Number system with a base value of 10 is termed a Decimal
number system. It uses 10 digits i.e. 0 to 9 for the creation of numbers. Here, each digit in
the number is at a specific place with place value of a product of different powers of 10.
Here, the place value is termed from right to left as first place value called units, second
to the left as Tens, so on Hundreds, Thousands, etc. the Decimal number are represented
by (10264)10 , (156)10.
The numbers in this system may possess both integer and fraction are
separated by a dot (.). The part of the number , which lies to the left of the decimal point
is known as integer part. Similarly , the part of the number which lies to the right of the
decimal point is known as fractional part.
The successive positions to the integer part of the decimal point have weights
of 10 , 10 , 102 and so on. Similarly , the successive positions to the fractional part of
0 1
the decimal point having weights of 10 -1 , 10-2 , 10-3 and so on. That means , each
positions has specific weight, which is power of base 10.
Example:- The number 250.36 is interpreted as,
(250.36)10 = 2x102+5x10x1+0x100 +3x10-1+6x10-2
Characteristics of Decimal Number System :-
1. A Decimal number system carries Ten digits starting from 0, 1, 2, 3, 4, 5, 6, 7, 8,
and 9.
2. It is also known as the base 10 number system.
3. The position of a digit represents the 0 power of the base(10). Example: 100
4. The position of the last digit represents the x power of the base(10). Example: 10x,
where x represents the last position, i.e., 1
1. Wastage of space.
2. Wastage of time.
Octal Number System :- Octal Number System is one in which the base value is 8. It
uses 8 digits i.e. 0 to 7 for the creation of Octal Numbers. Octal Numbers can be
converted to Decimal values by multiplying each digit with the place value and then
adding the result. Here the place values are 80, 81, and 82. Octal Numbers are useful for
the representation of UTF8 Numbers. It is represented by (234) 8 , (543)8 etc.
The numbers in this system may possess both integer and fraction are
separated by a dot (.). The part of the number , which lies to the left of the octal point is
known as integer part. Similarly , the part of the number which lies to the right of the
octal point is known as fractional part.
The successive positions to the integer part of the octal point have weights of
0 1 2
8 , 8 , 8 and so on. Similarly , the successive positions to the fractional part of the octal
point having weights of 8 -1 , 8-2 , 8-3 and so on. That means , each positions has specific
weight, which is power of base 8.
For Example:- The number 255.36 is interpreted as,
(255.36)8 = 2x82+5x81+5x80 +3x8-1+6x8-2
Characteristics of Octal Number System :-
1. An octal number system carries eight digits starting from 0, 1, 2, 3, 4, 5, 6, and 7.
2. It is also known as the base 8 number system.
3. The position of a digit represents the 0 power of the base(8). Example: 80
4. The position of the last digit represents the x power of the base(8). Example: 8 x,
where x represents the last position, i.e., 1.
1. It uses less digits than decimal and Hexadecimal number system. So, it has fewer
computations and less computational errors.
2. It uses only 3 bits to represent any digit in binary and easy to convert from octal to
binary and vice-versa.
3. It is easier to handle input and output in the octal form.
1. The major disadvantage of Octal number system is that computer does not
understand octal number system directly, so we need octal to binary converter.
Application /Uses of Octal Number System:-
The numbers in this system may possess both integer and fraction are
separated by a dot (.). The part of the number , which lies to the left of the hexa-decimal
point is known as integer part. Similarly , the part of the number which lies to the right of
the hexa-decimal point is known as fractional part.
The successive positions to the integer part of the hexa-decimal point have
weights of 160 , 161 , 162 and so on. Similarly , the successive positions to the fractional
part of the hexa-decimal point having weights of 16 -1 , 16-2 , 16-3 and so on. That means ,
each positions has specific weight, which is power of base 16.
For Example:- The number 25A.36 is interpreted as,
(25A.36)8 = 2x162+5x161+Ax160 +3x16-1+6x16-2
1. It uses less memory to store more numbers, for example it store 256 numbers in two
digits whereas decimal number stores 100 numbers in two digits.
2. This number system is also used to represent Computer memory addresses.
3. It uses only 4 bits to represent any digit in binary and easy to convert from
hexadecimal to binary and vice-versa.
4. It is easier to handle input and output in the hexadecimal form.
5. There is wide number of advantages in data science field, artificial intelligence and
machine learning.
Disadvantage Hexa-decimal Number System:-
1. It may not an easy to read and write for people, and also difficult to perform
operations like multiplications, divisions using hexadecimal number system.
2. Hexadecimal numbers is most difficult number system for dealing with Computer’s
data.
Base Conversion:-
Rule 4 ( For fractional Part) :- We can multiply the fractional part and note down the
carry till the result is zero and write from top to bottom
Step2:- By placing all the remainders in order in such a way, the Least Significant Bit
(LSB) at the top and Most Significant Bit (MSB) at the bottom, the required binary number
will be obtained from MSB to LSB.
Now, let us convert the given decimal number (294)10 into a binary number.
147 ÷ 2 73 1 1
73 ÷ 2 36 1 1
36 ÷ 2 18 0 0
18 ÷ 2 9 0 0
9÷2 4 1 1
4÷2 2 0 0
2÷2 1 0 0
1÷2 0 1 1 (MSB)
Therefore, the binary equivalent for the given decimal number (294)10 is (100100110)2
29410 =1001001102
Step 1 :- Divide the integer part by 2 and write the bottom to top.
Step 2 :- Multiply the fractional part by 2 and note down the carry till the result is
zero and write the carry from top to bottom.
Step 3 :- Combine the result of Step 1 and Step 2.
Note: Keep multiplying the fractional part with 2 until decimal part 0.00 is obtained.
(0.25)10 = (0.01)2
Answer: (10.25)10 = (1010.01)2
224 ÷8 28 0
28 ÷8 3 4
3 ÷8 0 3
Step 1 :- Divide the integer part by 8 and write the MSB to LSB.
Step 2 :- Multiply the fractional part by 8 and note down the carry till the result is
zero and write the carry from top to bottom.
Step 3 :- Combine the result of Step 1 and Step 2.
Integer part : 10
8 10 2
1
(10)10 = (12)8
Fractional part:
0.25 x 8 = 2.00
Note: Keep multiplying the fractional part with 8 until decimal part .00 is obtained.
(.25)10 = (.2)8
Answer: (10.25)10 = (12+0.2)8 = (12.2)8
Solution:
1228 ÷ 16 76 12 C
76 ÷ 16 4 12 C
4 ÷ 16 0 4 4
Step 1:- Divide the integer part by 16 and write the MSB to LSB.
Step 2:- Multiply the fractional part by 16 and note down the carry till the result is
zero and write the carry from top to bottom.
Step 3 :- Combine the result of Step 1 and Step 2.
16 32 0
(32)10 = (20)16
(0.16)10 = (0.28F5C)16
Answer: (32.16)10 = (20+0.28F5C)16 = (20. 28F5C)16
For example, Convert the binary number (1101)2 into a decimal number.
Solution:
Now, multiplying each digit starting from right side with n=0.
1 × 23 + 1 × 2 2 + 0 × 2 1 + 1 × 2 0
=8+4+0+1
= 13
Thus, the equivalent decimal number for the given binary number (1101)2 is (13)10
For example, Convert the binary number (1101.11)2 into a decimal number.
= 8+4+0+1+0.5+0.25
= (13.75)10
Thus, the equivalent decimal number for the given binary number (1101.11)2 is (13.75)10
0 000
1 001
2 010
3 011
4 100
5 101
6 110
7 111
Solution,
0000 0
0001 1
0010 2
0011 3
0100 4
0101 5
0110 6
0111 7
1000 8
1001 9
1010 A
1011 B
1100 C
1101 D
1110 E
1111 F
Rules For Octal Number to other Bases Conversion:-
For example, Convert the octal number (232)8 into a decimal number.
Solution:
Now, multiplying each digit by 8n starting from right side with n=0.
= 2 × 82 + 3 × 81 + 2 × 80
= 128+24+2
= 154
Thus, the equivalent decimal number for the given octal number (232)8 is (154)10
For example, Convert the octal number (244.21)8 into a decimal number.
Solution ,
= 2x64+4x8+4x1+0.25+0.02
= 128+32+4+0.25+0.02
(13164.27)10
Thus, the equivalent decimal number for the given octal number (244.21)8 is (13164.27)10 .
answer
Step 1 :- Convert each octal digit to a 3 digit binary number (the octal digits may be
treated as decimal for this conversion).
Step 2 :- Combine all the resulting binary groups (of 3 digits each) into a single binary
number.
For example, Convert the hexadecimal number (32B)16 into a decimal number.
Solution:
Now, multiplying each digit by 16n starting from right side with n=0.
= (811) 10
Thus, the equivalent decimal number for the given hexadecimal number (32B) 16 is (811)10
For example, Convert the hexadecimal number (32B.38)16 into a decimal number.
Thus, the equivalent decimal number for the given binary number (32B.38)16 is (811.221)10
0 0000
1 0001
2 0010
3 0011
4 0100
5 0101
6 0110
7 0111
8 1000
9 1001
A 1010
B 1011
C 1100
D 1101
E 1110
F 1111
Binary Addition:- The result of the addition of two binary numbers is also a binary
number. To obtain the result of the addition of two binary numbers, we have to add
the digit of the binary numbers by digit. The table added below shows the rule of
binary addition.
A B Addition Carry
0 0 0 0
0 1 1 0
1 0 1 0
1 1 0 1
For example,
101
(+) 101
————-
1010
Binary Subtraction:- The result of the subtraction of two binary numbers is also a binary
number. To obtain the result of the subtraction of two binary numbers, we have to
subtract the digit of the binary numbers by digit. The table added below shows the rule of
binary subtraction.
A B Subtraction Borrow
0 0 0 0
0 1 1 1
1 0 1 0
1 1 0 0
(-) 1000
10111
Binary Multiplication:- The multiplication process of binary numbers is similar to
the multiplication of decimal numbers. The rules for multiplying any two binary
numbers are given in the table,
A B Multiplication
0 0 0
0 1 0
1 0 0
1 1 1
For example,
Binary Division: The division method for binary numbers is similar to that of the
decimal number division method. Let us go through an example to understand the
concept better.
Example: Divide (101101)2 by (110)2
Solution:
Logic operator :- A logic operator is a symbol that is used to represent a logic gate, for
example ' & ' represents of the AND operator, ' | ' represents the OR operator, ' ~ '
represents the NOT operator etc.
1. AND Operator:
The AND operator represents the logical multiplication.
It is denoted by a dot (.) between the two variables to be multiplied, i.e. A.B.
However, sometimes, this dot is not used and we simply represent logical
multiplication of A and B as AB. It is read as A and B.
2. OR Operator :
The OR operator represents the logical addition.
It is denoted by a plus (+) sign between the two variables to be added. i.e.
A+B
It is read as A OR B.
3. NOT Operator ( Inverter) :
The NOT Operator represents the logical inversion or complementing.
It is denoted by the bar ( --- ) over the variable to be inverted, i.e. y-.
It is read as inversion of y.
Truth table : A truth table is a table that shows all possible combinations of inputs and
outputs for a logic gate. All variations of the inputs or arguments are listed to the left,
while the output is usually placed in the last columns to the right.
1. OR Gate :
A OR gate has a Two or more inputs and one output.
The logic of this gate is that if at least one of the inputs is 1 ( High, True,
ON, CLOSED ), the output will be 1. If all the input are 0 ( Low, False, OFF,
OPEN ) , then output will be 0.
The logical OR is represented with the symbol ' + '.
The OR gate’s output will be given by the following mathematical
procedure if there are two inputs A and B and output Y, i.e. Y=A+B.
A B Y= A+B
0 0 0
0 1 1
1 0 1
1 1 1
Table: Truth table for OR gate with 2 inputs.
A Venn diagram is a visual representation of the outputs of a logic gate with different
inputs. A Venn diagram can be easily created with the truth tables. Here, using the Venn-
diagram , the OR gate operation can be verified. The Venn-diagram shows that output Y
exist whenever any of the input A or B is high.
VCC
GND
The OR gate is available in the monolithic integrated circuit form. IC 7432 is a logic gate
IC which consist of four OR Gates with a 14 pin TTL IC. The OR gate performs logical
OR operation. The OR gates come in form of DIP package ICs. Therefore, it is called as
Quad OR gate IC. Each gate has three terminal, two inputs and one output. So 3, 6, 8, 11
are output pins for OR gate. Pin 14 is for input voltage supply ( +5 v) and pin 7 is for
grounding. The four OR gates are completely independent to each other The ICs are made
by CMOS, TTL ( Transistor Transistor Logic ) technology.
1 A Input Gate 1
2 B Input Gate 1
3 Y Output Gate 1
4 A Input Gate 2
5 B Input Gate 2
6 Y Output Gate 2
7 Ground
8 Y Output Gate 3
9 A Input Gate 3
10 B Input Gate 3
11 Y Output Gate 4
12 A Input Gate 4
13 B Input Gate 4
2. AND Gate:-
A B Y= A.B
0 0 0
0 1 0
1 0 0
1 1 1
Logic Diagram for AND Gate:
This electrical circuit representing two input AND gate operates as follows:-
When A = 0 (open) and B = 0 (open), the lamp will be OFF, no current can flow
through the circuit. Hence, the output Y = 0.
When A = 0 (open) and B = 1 (close), the lamp will be OFF, because no current can
flow through the circuit due to an open at switch A. Hence, the output Y = 0.
When A = 1 (close) and B = 0 (open), the lamp will be OFF, and no current flows
through the circuit due to an open at switch B. Thus, the output Y = 0.
When A = 1 (close) and B = 1 (close), the lamp will be ON as there is no break in
the circuit, so current can flow. Thus, the output Y = 1.
A Y= A'
0 1
1 0
A Venn diagram is a visual representation of the outputs of a logic gate with different
inputs. A Venn diagram can be easily created with the truth tables.. Here, using the Venn
diagram, the NOT gate operation can be verified. The diagram shows that the output Y is
opposite of input A
This electrical circuit representing two input NOT gate operates as follows:-
When A = 0 (open), the current flows through the lamp making it ON. Hence, the
output Y = 1.
When A = 1 (close), the current will bypass through the switch A making the lamp
OFF. Hence, the output Y = 0.
Universal gate :- A universal gate is a gate which can implement any Boolean function
without need to use any other gate type. The NAND and NOR gates are
universal gates.
1. NOR Gate :-
This gate’s output is 1 only when all of its inputs are 0. Alternatively, when
all of the inputs are low, the output is high.
A NOR gate, sometimes known as a “NOT-OR” gate.
This gate is an inversion of logical OR.
It consists of an OR gate followed by a NOT gate.
The Boolean statement for the NOR gate is Y=(A+B)’ if there are two inputs
A and B and output Y.
A B Y= (A+B)'
0 0 1
0 1 0
1 0 0
1 1 0
A
A
'
Y=(A+B) Y=(A+B)'
OR OR
B
B
Venn- diagram for NOR gate:
This electrical circuit representing two input NOR gate operates as follows:-
When A = 0 (open) and B = 0 (open), the current will pass through the lamp making
it ON. Hence, the output Y = 1.
When A = 0 (open) and B = 1 (close), the current will pass through short-circuited
path provided by the switch B and no current will flow through the lamp making it
OFF. Hence, the output Y = 0.
When A = 1 (close) and B = 0 (open), the current will pass through short-circuited
path provided by the switch A, and no current will flow through the lamp making it
OFF. Hence, the output Y = 0.
When A = 1 (close) and B = 1 (close), the current will pass through short-circuited
paths provided by switches A & B, and no current will flow through the lamp
making it OFF. Hence, the output Y = 0.
It is 14 pin DIP package IC. 7402 is a logic gate TTL IC which consist of four NOR
Gates. The NOR gate performs logical NOR operation. The NOR gates come in form of
DIP ( Dual Inline Packaged ) package ICs. So, it is called Quad 2- input NOR gate. Each
gate has three terminal, two inputs and one output. So 1, 4, 10,13 are output pins and
(2,3), (5,6), (8,9), (11,12) are inputs pin for NOR gate. Pin 14 is for input voltage supply
( +5 v) and pin 7 is for grounding. The Four NOR gates are completely independent to
each other.
2. NAND Gate:-
This gate’s output is 0 only if none of the inputs is 0. Alternatively, when all
of the inputs are not high and at least one is low, the output is high.
A NAND gate, sometimes known as a “NOT-AND” gate.
This gate is an inversion of logical AND.
It consists of an AND gate followed by a NOT gate.
It is Combination of AND gate and NOT gate.
The Boolean statement for the NAND gate is Y=(A.B)’ if there are two
inputs A and B and output Y.
A B Y= (A.B)'
0 0 1
0 1 1
1 0 1
1 1 0
Y=(A.B)' OR Y=(A.B)'
Venn- diagram for NAND gate:
This electrical circuit representing two input NAND gate operates as follows:-
When A = 0 (open) and B = 0 (open), the current will pass through the lamp making
it ON. Hence, the output Y = 1.
When A = 0 (open) and B = 1 (close), the current will pass through the lamp making
it ON. Hence, the output Y = 1.
When A = 1 (close) and B = 0 (open), the current will pass through the lamp making
it ON. Thus, the output Y = 1.
When A = 1 (close) and B = 1 (close), the current will follow the short-circuited path
provided by closed switches A and B, and no current will flow through the lamp
making it OFF. Therefore, the output Y = 0.
If any of the inputs is ‘High,’ the output of the XOR Gate is ‘High.’ If both
inputs are ‘High,’ the output is ‘Low.’ If both inputs are ‘Low,’ the output is
‘Low.’
The Boolean equation for the XOR gate is Y= (A ⊕ B) = A'.B + A.B' if there
are two inputs A and B with output Y.
The output of the XOR gate is also called as an odd function.
7486 is a logic gate TTL IC which consist of four XOR Gates. It is 14 pin DIP package
IC. The XOR gate performs logical XOR operation. The XOR gates come in form of DIP
( Dual Inline Packaged ) package ICs. So, it is called Quad 2- input XOR gate. Each gate
has three terminal, two inputs and one output. So 3, 6, 8,11 are output pins and (1,2),
(4,5), (9,10), (12,13) are inputs pin for XOR gate. Pin 14 is for input voltage supply ( +5 v)
and pin 7 is for grounding. The Four XOR gates are completely independent to each
other.
As a magnitude comparator.
In parity generator.
In adder and subtractor circuit
In binary to gray code converter circuit
X-NOR Gate:
The Exclusive-NOR or ‘EX-NOR’ gate is a digital logic gate that accepts more
than two inputs and produces only one outputs.
If both inputs are ‘High,’ the output of the XNOR Gate is ‘High.’ If both inputs are
‘Low,’ the output is ‘High.’ If one of the inputs is ‘Low,’ the output is ‘Low.’
If there are two inputs A and B, then the XNOR gate’s Boolean equation is: Y= (A
⊙ B) = (A ⊕ B)' =A.B+A’B’.
The output of the XNOR gate is also called as an even function.
A B Y= A.B+A’B’
0 0 1
0 1 0
1 0 0
1 1 1
The Venn diagram represents the different inputs and outputs of the gate. The color part
shows the even function and 11 represents the both input is high.
74266 is a logic gate TTL IC which consist of four XNOR Gates. It is 14 pin DIP package
IC. The XNOR gate performs logical XNOR operation. The XNOR gates come in form of
DIP ( Dual Inline Packaged ) package ICs. So, it is called Quad 2- input XNOR gate. Each
gate has three terminal, two inputs and one output. So 3, 4, 10,11 are output pins and
(1,2), (5,6), (8,9), (12,13) are inputs pin for XNOR gate. Pin 14 is for input voltage supply
( +5 v) and pin 7 is for grounding. The Four XNOR gates are completely independent to
each other.
As a comparator
To check the even parity
As even parity generator
1st Theorem : - It states that "The complement of the product of the variables ( Variables A
and B) is equal to the sum of their individual complements of a variable.
(A.B)' = A'+B'
NAND = Bubbled OR
Here is a table that shows the verification of the first theorem of De Morgan:
Inputs Output For Each Term
0 0 0 1 1 1 1
0 1 0 1 1 0 1
1 0 0 1 0 1 1
1 1 1 0 0 0 0
Table: Verification table for 1st Law
2nd Theorem: It states that "The complement of the sum of variables ( A and B) is
equal to the product of their individual complements of a variable.
(A+B)' = A'.B'
NOR =Bubbled AND
0 0 0 1 1 1 1
0 1 1 0 1 0 0
1 0 1 0 0 1 0
1 1 1 0 0 0 0
Table: Verification table for 2nd Law
Boolean Expression:-
A logical statement that results in a Boolean value, either be True or False, is a
Boolean expression. Sometimes, synonyms are used to express the statement such as
‘Yes’ for ‘True’ and ‘No’ for ‘False’. Also, 1 and 0 are used for digital circuits for
True and False, respectively.
Boolean expressions are the statements that use logical operators, i.e., AND, OR,
XOR and NOT. Thus, if we write X AND Y = True, then it is a Boolean expression.
Truth Table:- The truth table is a table that gives all the possible values of logical
variables and the combination of the variables. It is possible to convert the Boolean
equation into a truth table. The number of rows in the truth table should be equal to 2 n,
where “n” is the number of variables in the equation. For example, if a Boolean equation
consists of 3 variables, then the number of rows in the truth table is 8. (i.e.,) 23 = 8.
Logic Gates:- A logic gate is a virtual or physical device that performs a Boolean
function. These are used to make logic circuits. Logic gates are the main components of
any digital system. This electrical circuit can have only one output and 1 or more inputs.
The relation between the input and the output is governed by specific logic. AND, OR,
NOT gate, etc are the examples of logic gates.
Variable used can have only two values. Binary 1 for HIGH and Binary 0 for LOW.
The complement of a variable is represented by an overbar. Thus, the complement of
B is represented by B’ . Thus if B = 0 then B’= 1 and if B = 1 then B’= 0.
OR-ing of the variables is represented by a plus (+) sign between them. For example,
the OR-ing of A, B, and C is represented as A + B + C.
Logical AND-ing of the two or more variables is represented by writing a dot
between them, such as A.B.C. Sometimes, the dot may be omitted like ABC.
Laws of Boolean Algebra:
The basic laws of Boolean algebra, The commutative laws for addition and
multiplication, the associative laws for addition and multiplication, and the
distributive law-are the same as in ordinary algebra.
Commutative Laws:-
This law states that the order in which the variables are ORed
makes no difference. Remember, in Boolean algebra as applied
to logic circuits, addition and the OR operation are the same.
Fig.(1) illustrates the commutative law as applied to the OR
gate and shows that it doesn't matter to which input each
variable is applied. (The symbol ≡ means "equivalent to.
Associative Laws:-
This law states that when ORing more than two variables, the result is
the same regardless of the grouping of the variables. Fig.(3), illustrates
this law as applied to 2-input OR gates.
Fig.(3) Application of associative law of addition.
A(BC) = (AB)C.
This law states that it makes no difference in what order the variables are
grouped when ANDing more than two variables. Fig.(4) illustrates this law
as applied to 2-input AND gates.
Distributive Law:-
The distributive law is written for three variables as follows:
A(B + C) = AB + AC
This law states that ORing two or more variables and then
ANDing the result with a single variable is equivalent to
ANDing the single variable with each of the two or more
variables and then ORing the products. The distributive law
also expresses the process of factoring in which the common
variable A is factored out of the product terms, for example,
AB + AC = A(B + C).
Fig.(5) Application of distributive law.
AND Law: These laws use the AND operation. Therefore they are called AND laws.
A .0 = 0
A.1=A
A. A = A
A. A' =0
OR Law: These laws use the OR operation. Therefore they are called OR laws.
A +0=A
A+1=1
A+A=A
A.+A'=1
Inversion Law: In Boolean algebra, the inversion law states that double inversion of
variable results in the original variable itself.
A'' = A
Fig.(1)
Rule 2:- A + 1 = 1
A variable ORed with 1 is always equal to 1. A 1 on an input to an OR gate
produces a 1 on the output, regardless of the value of the variable on the
other input, where the lower input is fixed at 1.
Rule 3:- A . 0 = 0
Fig.(2)
Rule 4:- A . 1 = A
A variable ANDed with 1 is always equal to the variable. If A is 0 the output
of the AND gate is 0. If A is 1, the output of the AND gate is 1 because both
inputs are now 1s. This rule is shown in Fig.(3), where the lower input is
fixed at 1.
Fig.(3)
Rule 5:- A + A = A
A variable ORed with itself is always equal to the variable. If A is 0, then 0
+ 0 = 0; and if A is 1, then 1 + 1 = 1. This is shown in Fig.(4), where both
inputs are the same variable.
Fig.(4)
Rule 6:- A + A = 1
A variable ORed with its complement is always equal to 1. If A is 0, then 0
+ 0 = 0 + 1 = 1. If A is l, then 1 + 1 = 1+ 0 = 1. See Fig.(5), where one input
is the complement of the other.
Fig.(5)
Rule 7:- A . A = A
A variable ANDed with itself is always equal to the variable. If A = 0,
then 0.0 = 0; and if A = 1. then 1.1 = 1. Fig.(6) illustrates this rule.
Fig.(6)
Rule 8:- A . A = 0
A variable ANDed with its complement is always equal to 0. Either A or A will
always be 0: and when a 0 is applied to the input of an AND gate. the output will be 0
also. Fig.(7) illustrates this rule.
Fig.(7)
Rule 9: A = A
The double complement of a variable is always equal to the variable. If you
start with the variable A and complement (invert) it once, you get A. If you
then take A and complement (invert) it, you get A, which is the original
variable. This rule is shown in Fig.(8) using inverters.
Fig.(8)
Rule 10: A + AB = A
This rule can be proved by applying the distributive law, rule 2, and rule 4 as
follows:
A + AB = A( 1 + B) Factoring (distributive law)
=A.l Rule 2: (1 + B) = 1
=A Rule 4: A . 1 = A
= (A + A)(A + B) Factoring
= 1. (A + B) Rule 6: A + A = 1
=A + B Rule 4: drop the 1
Representation of Boolean expression can be primarily done in two ways. They are
as follows:
1. Sum of Products (SOP) form
2. Product of Sums (POS) form
Sum of products(SOP) form:-
It is one of the ways of writing a boolean expression. As the name suggests, it is
formed by adding (OR operation) the product terms.
These product terms are also called as ‘min-terms’. Min-terms are represented with
‘m’, they are the product(AND operation) of boolean variables either in normal
form or complemented form.
In SOP, value taken only when function(F)=1.
A = 1, A’ = 0.
Therefore, SOP is sum of min-terms and is represented as:
F in SOP = ∑m (0, 3)
Here, F is sum of minterm0 and minterm3.
How to write,
00 , 01
A’B’ + A’B
Express function F in sum of products(SOP) form:-
A B Function F
m0 0 0 0
m1 0 1 1
m2 1 0 1
m3 1 1 1
F(A,B) = 01 + 10 + 11
F(A,B) = A’B + AB’ + AB --------------- [ This is a Standard or Canonical SOP form]
F(A,B) = m1 + m2 + m3
F(A,B) = ∑m ( 1,2,3) -------------- [This is Sum of Min-term]
Notes : Steps to make standard SOP form Multiply by (A+ A’) term of missing
variable. For example , A’ + B’ = A’(B+ B’) + B’(A+ A’)
Notes: Steps to make standard POS form Add (A A’) term of missing variable. For
example, A’ ( B+C) = (A’+BB’+CC’) . ( B + C + AA’)
Example 1:- Represent / Expand F ( A,B) = A’ + B’ in SOP and POS form and find
min-terms and max-terms.
Solution:-
F ( A,B) = A’ + B’ ----------[ In 1st term B is missing and In 2nd term A is missing]
F ( A,B) = A’(B+ B’) + B’(A + A’ ) ------[ A + A’ or B+ B’=1, just multiply by 1]
F ( A,B) = A’B + A’B’ +B’A +B’A’ -------[A’B’+ B’A’= A’B’, take any one]
F ( A,B) = A’B + A’B’ +A B’ ------[ SOP standard form]
F ( A,B) = 01 + 00 +10 [ In min-term, the ‘1’ input is written as such and the input ‘0’
is complimented.]
F ( A,B) = m1 + m0 +m2
F ( A,B) = ∑m ( 0, 1, 2) ----------------------- [Sum of min-term]
Now , The min-term m3 is missing in SOP, so m3 will be max-term.
Hence , POS form = (A’ + B’)
= πM ( 3 ) -------------- [POS max-term]
Example 2:- Find the min-terms and max-term of function F=A +BC’ +ABD’
+ABCD
Solution:
F( A,B,C,D) = A +BC’ +ABD’ +ABCD [ This is SOP so we have to make it standard
SOP form, that why we multiply by (A+A’) term ]
=A( B+B’) (C+C’) (D+D’) + BC’(A+A’) (D+D’) +ABD’ ( C+C’)+ABCD
= ( AB+A B’) ( CD+CD’+C’D+C’D’) +(BC’A+BC’A’) (D+D’)
+ABCD’+ABC’D’ +ABCD
= AB(CD+CD’+C’D+C’D’) + A B’(CD+CD’+C’D+C’D’)
+D(BC’A+BC’A’) + D’(BC’A+BC’A’) +ABCD’+ABC’D’ +ABCD
= ABCD+ABCD’+ABC’D+ABC’D’+AB’CD+AB’CD’+AB’C’D+
AB’C’D’+ABC’D+A’BC’D+ABC’D’+A’BC’D’+ ABCD’+ABC’D’+ABCD
= ABCD+ABCD’+ABC’D+ ABC’D’+ AB’CD + AB’CD’+ AB’C’D+ AB’C’D’+
A’BC’D + A’BC’D’[when two or more equation are same then take only one of them]
= 1111+ 1110+1101 +1100+1011 + 1010 + 1001 +1000 +0101 + 0100
F( A,B,C,D) = m15 + m14 + m13 + m12 + m11 + m10 + m9 + m8 + m5 + m4
F(A,B,C,D) = ∑m ( 4, 5, 8, 9, 10, 11, 12, 13, 14, 15) [ This is Sum of min-terms]
Now, The min-term 0, 1, 2, 3, 6, 7 is missing in SOP, so 0, 1, 2, 3, 6, 7 will be max-term.
Hence , POS form = (A+B+C+D) (A+B+C+D’) (A+B+C’+D) (A+B+C’+D’)
(A+B’+C’+D) (A+B’+C’+D’)
= (0+0+0+0) ( 0+0+0+1) ( 0+0+1+0) ( 0+0+1+1) ( 0+1+1+0) (0+1+1+1)
= ( M0 , M1 , M2 , M3, M6 , M7)
F(A,B,C,D) = πM ( 0, 1, 2, 3, 6, 7 ) -------------- [POS max-term]
Example 3: Find min-terms and max-terms of A ( B’ +A) B .
Solution :
F(A,B) = A ( B’ +A) B [ This is POS, so we have to make it standard POS form,
that why we Add (A A’ and BB’) term ]
F(A,B) = (A + BB’) ( B’ +A) (B + A A’)
= ( A + B ) (A + B’) (B’ + A) ( B +A ) ( B + A’)
= ( A + B ) (A + B’) ( A + B’) ( A +B ) (A’ + B)
= ( A + B ) (A + B’) (A’ + B) [when two or more equation are same then take
only one of them]
= ( 0+ 0 ) ( 0+ 1) ( 1+ 0) [In Maxterm the input ‘0’ is written as such and the
input ‘1’ is complemented.]
= ( M 0 , M1 , M2 )
F(A,B) = πM ( 0, 1, 2 ) -------------- [POS max-term]
Now , the max-term M3 is missing in POS form, so M3 will be min-term.
Hence, SOP form = AB
= (11)
= ∑m ( 3 ) ----------------------- [Sum of min-term]
Solution,
F= A(B+B')(C+C')+BC(A+A')
F= ABC+ ABC'+AB'C+ AB'C'+ A'BC [ In min-term the ‘1’ input is written as such and
the input ‘0’ is complimented.]
F= 111+110+101+100+011
F= m7+m6+m5+m4+m3
F=A+(BC)
Solution,
F= (A+B).(A+C)
F= (A+B+CC').(A+C+BB')
F= (A+B+C).(A+B+C').(A+C+B).(A+C+B')
F= (A+B+C).(A+B+C').( A+B'+C) In Maxterm the input ‘0’ is written as such and the
input ‘1’ is complemented.
F=(0+0+0).(0+0+1).(0+1+0)
F= M0.M1.M2
1 SOP stands for Sum of Products. POS stands for Product of Sums.
4 In the case of SOP, the minterms are In the case of POS, the Maxterms are
defined as ‘m’. defined as ‘M’
K-Map simplification:-
Karnaugh Maps:
The Karnaugh map (K–map), introduced by Maurice Karnaugh in 1953.
It is a grid like representation of a truth table which is used to simplify boolean
algebra expressions.
A Karnaugh map has zero and one entries at different positions.
It provides grouping together Boolean expressions with common factors and
eliminates unwanted variables from the expression.
In a K-map, crossing a vertical or horizontal cell boundary is always a change of
only one variable.
A Karnaugh map provides a systematic method for simplifying Boolean expressions.
Karnaugh maps can be used for expressions with two, three, four and five variables.
The number of cells in a Karnaugh map is equal to the total number of possible input
variable combinations as is the number of rows in a truth table. For three variables,
the number of cells is 23 = 8. For four variables, the number of cells is 24 = 16.
There are the following steps used to solve the expressions using K-map:
4 Variable K-Map: The number of cells in 4 variable K-map is sixteen, since the number
of variables is four. The following figure shows 4 variable K-Map.
Here, we got three prime implicants X + Y, Y + Z & Z + X. All these prime implicants
are essential because one zero in each grouping is not covered by any other groupings
except with their individual groupings.
Therefore, the simplified Boolean function is
f = X+Y, Y+Z, Z+X
In this way, we can easily simplify the Boolean functions up to 5 variables using K-map
method. For more than 5 variables, it is difficult to simplify the functions using K-Maps.
Because, the number of cells in K-map gets doubled by including a new variable.
Minterm:-
Minterm is the product of various different literals in which each literal occurs exactly
once. The output result of the minterm functions is 1. It is represented by m. To represent
a function, we perform a sum of minterms also called the Sum Of Products (SOP).
Maxterm:-
Maxterm is the sum of various different literals in which each literal occurs exactly once.
The output result of the maxterm functions is 0. It is represented by M. To represent a
function, we perform product of maxterms also called Product of Sum (POS).
Minterm is the term with the product of N Maxterm is the term with the sum of N
literals occurring exactly once. literals occurring exactly once.
It is represented by m. It is represented by M.
The sum of minterms forms SOP (Sum of The product of maxterms forms POS
Minterm Maxterm
a) There is no such thing. b) It can be used only with the aid of a computer.
c) It is made of two 4-variable K- map. d) It is made of 2-variable and 3-variable K-
map.
16: When four 1s are taken as a group on a Karnaugh map, the number of variables
eliminated from the output expression is ________.
a) 1 b) 2 c) 3 d) 4
17: Which of the examples below expresses the distributive law of Boolean algebra?
a) (A + B) + C = A + (B + C) b) A(B + C) = AB + AC
c) A + (B + C) = AB + AC d) A(BC) = (AB) + C
18: The expression W(X + YZ) can be converted to SOP form by applying which law?
a) Associative law b) Commutative law c) Distributive law d) None of the above
19: An AND gate with schematic "bubbles" on its inputs performs the same function
as a(n)________ gate.
a) NOT b) OR d) NOR d) NAND
20: Use Boolean algebra to find the most simplified SOP expression for F = ABD +
CD + ACD + ABC + ABCD.
a) F = ABD + ABC + CD b) F = CD + AD c) F = BC + AB d) F = AC + AD
21: The output of an exclusive-NOR gate is 1. Which input combination is correct?
a) 1 b) 2 c) 3 d) 4
23: A 4-variable AND-OR circuit produces a 0 at its Y output. Which combination of
inputs is correct?
a) A = 0, B = 0, C = 1, D = 1 b) A = 1, B = 1, C = 0, D = 0
c) A = 1, B = 1, C = 1, D = 1 d) A = 1, B = 0, C = 1, D = 0
24. A gate can drive a number of load gate inputs up to its specified ________
Sequential circuits:- Sequential circuits are those which are dependent on clock cycles
and depends on present as well as past inputs to generate any output.
Adder :- An adder is a Combinational circuit that performs the addition of two or more
binary number is called an Adder. Each computer has an adder located in its CPU(ALU)
that is responsible for the process of addition. They are also used in other parts of the
processor, where they are used to calculate addresses, table indices, increment and
decrement operators, and similar operations.
Types of adder :-
1. Half Adder :- A combinational circuit that performs the addition of two bits is
called a Half Adder. It receives two inputs A and B and produces two outputs Sum
(S) and Carry (C).
The block diagram for a half adder:-
From above truth table, Sum = A'B + AB' (0= complement & 1= general)
Carry = AB
We can also obtain the logical diagram for Sum and Carry by using the Exclusive OR
gate:-
The sum (S) is generated by an XOR gate which output's '1' if exactly one of its inputs are
'1'. The carry (C) is generated by an AND gate, which outputs '1' if both inputs are '1'.
Full Adder:- A combinational circuit that performs the addition of three bits (inputs)
and produces two outputs. The first two inputs are A and B and the third input is an input
carry as C-IN. The output carry is designated as C-OUT and the normal output is
designated as S which is SUM.
K-map for Sum (S): A' B' C + A' B C' + A B' C' + A B C
Implementation of Full Adder using NAND Gates:-As mentioned earlier, a NAND gate
is one of the universal gates and can be used to implement any logic design. The circuit of
full adder using only NAND gates is shown below.
Subtractor:- A subtractor is a combinational logic circuit that can perform the subtraction
of two number (binary numbers) and produce the difference and borrow. It is a
combinational circuit that means its output depends on its present inputs only.
Types of Subtractor
Binary Adder:- A Binary Adder is a digital circuit that implements the arithmetic sum of
two binary numbers supported with any length is known as a binary adder. It is generated
using full-adder circuits connected in sequence. The output carries from one full-adder
linked to the input carry of the next full-adder.
A multiplexer is a combinational circuit that has 2 n input lines and a single output
line.
Simply, Multiplexer is a circuit that accept many inputs but gives only one output.
Multiplexer means many into one
The binary information is received from the input lines and directed to the output
line. On the basis of the values of the selection lines, one of these data inputs will be
connected to the output.
there are n selection lines and 2n input lines
A multiplexer is also treated as Mux.
Multiplexers can handle two type of data i.e., analog and digital.
Used in multi-position switch.
Types of multiplexer :
1) 2 to 1 Multiplexer :
In 2×1 multiplexer, there are only two inputs, i.e., A 0 and A1, 1 selection line,
i.e., S0 and single outputs, i.e., Y.
On the basis of the combination of inputs which are present at the selection
line S0, one of these 2 inputs will be connected to the output.
Block diagram of 2x1 Mux:-
From truth table, The logical expression of the term Y = S0'.A0 + S0.A1
2) 4 to 1 Multiplexer:-
In the 4×1 multiplexer, there are four inputs, i.e., A 0, A1, A2, and A3, 2
selection lines, i.e., S0 and S1 and single output, i.e., Y.
On the basis of the combination of inputs that are present at the selection lines
S0 and S1, one of these 4 inputs are connected to the output.
- - - A0 0 0 A0
- - A1 - 0 1 A1
- A2 - - 1 0 A2
A3 - - - 1 1 A3
OR
From truth table, the logical expression of the term Y=S 1' S0' A0+S1' S0 A1+S1 S0'
A2+S1 S0 A3
If both the select inputs S0=1, S1=1,then the bottom-most AND gate is enabled and all other
AND gate is disabled. So, the data input A3 is selected and transmitted as output. Hence,
we get output Y = D3.
3) 8 to 1 Multiplexer:-
In the 8 to 1 multiplexer, there are total eight inputs, i.e., A0, A1, A2, A3, A4, A5,
A6, and A7, 3 selection lines, i.e., S0, S1and S2 and single output, i.e., Y.
On the basis of the combination of inputs that are present at the selection lines S 0,
S1, and S2, one of these 8 inputs are connected to the output.
OR
To implement the 8×1 multiplexer, we need two 4×1 multiplexers and one
2×1 multiplexer.
The 4×1 multiplexer has 2 selection lines (S 0 and S1), 4 inputs , and 1 output.
The 2×1 multiplexer has only 1 selection line.
For getting 8 data inputs, we need two 4×1 multiplexers. The 4×1 multiplexer
produces one output. So, in order to get the final output, we need a 2×1
multiplexer.
4) 16 x 1 Multiplexer:-
In the 16 to 1 multiplexer, there are total of 16 inputs, i.e., A 0, A1, …, A15, 4 selection
lines, i.e., S0, S1, S2, and S3 and single output, i.e., Y.
On the basis of the combination of inputs that are present at the selection lines S 0, S1,
and S2, one of these 16 inputs will be connected to the output.
Inputs Selector Ou
tpu
t
A15 A14 A13 A12 A11 A10 A9 A8 A7 A6 A5 A4 A3 A2 A1 A0 S3 S2 S1 S0 Y
- - - - - - - - - - - - - - A0 0 0 0 0 A0
- - - - - - - - - - - - - - A1 - 0 0 0 1 A1
- - - - - - - - - - - - - A2 - - 0 0 1 0 A2
- - - - - - - - - - - - A3 - - - 0 0 1 1 A3
- - - - - - - - - - - A4 - - - - 0 1 0 0 A4
- - - - - - - - - - A5 - - - - - 0 1 0 1 A5
- - - - - - - - - A6 - - - - - - 0 1 1 0 A6
- - - - - - - - A7 - - - - - - - 0 1 1 1 A7
- - - - - - - A8 - - - - - - - - 1 0 0 0 A8
- - - - - - A9 - - - - - - - - - 1 0 0 1 A9
- - - - - A10 - - - - - - - - - - 1 0 1 0 A10
- - - - A11 - - - - - - - - - - - 1 0 1 1 A11
- - - A12 - - - - - - - - - - - - 1 1 0 0 A12
- - A13 - - - - - - - - - - - - - 1 1 0 1 A13
- A14 - - - - - - - - - - - - - - 1 1 1 0 A14
A15 - - - - - - - - - - - - - - 1 1 1 1 A15
OR
From truth table,
The logical expression of Y=A0.S0'.S1'.S2'.S3'+A1.S0'.S1'.S2 '.S3+A2.S0'.S1'.S2.S3'+A3.S0'.S1 '.
S2.S3+A4.S0'.S1.S2'.S3'+A5.S0 '.S1.S2'.S3+A6.S1.S2.S3'+A7.S0 '.S1.S2.S3+A8.S0.S1'.S2'.S3'+A9 .S0.
S1'.S2'.S3+Y10.S0.S1'.S2.S3 '+A11.S0.S1'.S2.S3+A12
S0.S1.S2 '.S3'+A13.S0.S1.S2'.S3+A14.S0.S1 .S2.S3'+A15.S0.S1.S2'.S3
To implement the 8×1 multiplexer, we need two 8×1 multiplexers and one 2×1
multiplexer. The 8×1 multiplexer has 3 selection lines, 4 inputs, and 1 output. The
2×1 multiplexer has only 1 selection line.
For getting 16 data inputs, we need two 8 ×1 multiplexers. The 8×1 multiplexer
produces one output. So, in order to get the final output, we need a 2×1 multiplexer.
The block diagram of 16×1 multiplexer using 8×1 and 2×1 multiplexer is given
below.
( Note: Truth table and Logical circuit are same as above 16 x 1 Mux )
Disadvantages:
1] Added delays in switching ports.
2] Limitations on which ports can be used simultaneously.
3] Extra IO many require to control multiplexer.
4] Added delays in I/O signals propagating through the multiplexer.
5] Potential for Interference
6] Limited Capacity
7] Synchronization Issues
Applications of Multiplexers:
A De-multiplexer is a combinational circuit that has only 1 input line and 2 N output
lines.
data from one input can be passed to one of the many output data lines..
On the basis of the values of the selection lines, the input will be connected to one of
these outputs.
The Demultiplexer ICs are also called as Decoder ICs. For example, 74159 is a 4-
line to 16-line Decoder IC.
Selection lines
2n Outputs line
Types of De-multiplexer
1) 1 x 2 De- Mux:-
In the 1 to 2 De-multiplexer, there are only two outputs, i.e., Y 0, and Y1, 1 selection
lines, i.e., S0, and single input, i.e., A.
On the basis of the selection value, the input will be connected to one of the outputs.
The figure below shows the block diagram of a 1-to-2 De-multiplexer with additional
enable input.
The block diagram of 1 x 2 De-Mux:-
In the figure, there are only two possible ways to connect the input to output lines, thus
only one select signal is enough to do the demultiplexing operation. When the select
input is LOW, then the input will be passed to Y0 and if the select input is HIGH, then
the input will be passed to Y1.
From the above truth table, the output Y0 is active when the combination of select
line and input line are active low and high respectively, i.e., S0 A = 0 1 .
Similarly, the output Y1 is active when the combination of select line and input line
are active high, i.e., S0 A = 1 1 .
In 1 to 4 De-multiplexer, there are total of four outputs, i.e., Y 0, Y1, Y2, and Y3, 2
selection lines, i.e., S0 and S1 and single input, i.e., A.
On the basis of the combination of inputs which are present at the selection lines
S0 and S1, the input be connected to one of the outputs. The block diagram and the
truth table of the 1×4 multiplexer are given below.
The outputs are active only when the ‘E’ bit is HIGH.
From truth table, it is clear that, when S0 = 0 and S1 = 0, the data input is connected
to output Y0 and when S0 = 0 and s1=1, the data input is connected to output
Y1.Similarly, other outputs are connected to the input for the other two combinations of
select lines.
The logical expression of the term Y is :
Y0=S1'S0'A
y1=S1'S0 A
y2=S1 S0'A
y3=S1 S0 A
3) 1 x 8 De-mux:-
In 1 to 8 De-multiplexer, there are total of eight outputs, i.e., Y 0, Y1, Y2, Y3, Y4, Y5,
Y6, and Y7, 3 selection lines, i.e., S0, S1and S2 and single input, i.e., A.
On the basis of the combination of inputs which are present at the selection lines S 0,
S1 and S2, the input will be connected to one of these outputs.
It is also called as 3-to-8 demultiplexer due to its three select input lines and 8 output
lines.
The block diagram and the truth table of the 1×8 de-multiplexer are given below.
The truth table of the 1×8 de-multiplexer:
The input ‘A’ is connected with one of the eight outputs from Y0 to Y7 based on the
select lines S2, S1 and S0.
For example, if S2 S1 S0 = 0 0 0, then the input D is connected to the output Y0 and
so on.
The logical expression of the term Y is:
Y0=S0'.S1'.S2'.A
Y1=S0.S1'.S2'.A
Y2=S0'.S1.S2'.A
Y3=S0.S1.S2'.A
Y4=S0'.S1'.S2 A
Y5=S0.S1'.S2 A
Y6=S0'.S1.S2 A
Y7=S0.S1.S3.A
To implement the 1×8 de-multiplexer, we need two 1×4 de-multiplexer and one 1×2
de-multiplexer.
The 1×4 multiplexer has 2 selection lines, 4 outputs, and 1 input. The 1×2 de-
multiplexer has only 1 selection line.
For getting 8 data outputs, we need two 1×4 de-multiplexer. The 1×2 de-multiplexer
produces two outputs. So, in order to get the final output, we have to pass the outputs
of 1×2 de-multiplexer as an input of both the 1×4 de-multiplexer.
The block diagram of 1×8 de-multiplexer using 1×4 and 1×2 de-multiplexer is given
below.
4) 1 x 16 De-multiplexer:-
In 1×16 de-multiplexer, there are total of 16 outputs, i.e., Y 0, Y1, …, Y15, 4 selection
lines, i.e., S0, S1, S2, and S3 and single input, i.e., A.
On the basis of the combination of inputs which are present at the selection lines S 0,
S1, and S2, the input will be connected to one of these outputs.
The block diagram and the truth table of the 1×16 de-multiplexer are given below.
Block Diagram for 1 x 16 De-multiplexer:-
To implement the 1×16 de-multiplexer, we need two 1×8 de-multiplexer and one
1×2 de-multiplexer.
The 1×8 multiplexer has 3 selection lines, 1 input, and 8 outputs. The 1×2 de-
multiplexer has only 1 selection line.
For getting 16 data outputs, we need two 1×8 de-multiplexer. The 1×8 de-
multiplexer produces eight outputs. So, in order to get the final output, we need a
1×2 de-multiplexer to produce two outputs from a single input. Then we pass these
outputs into both the de-multiplexer as an input.
The block diagram of 1×16 de-multiplexer using 1×8 and 1×2 de-multiplexer is
given below.
Applications of Demultiplexers
Demultiplexers are used in clock data recovery solutions.
Demultiplexer along with multiplexer is necessary for any communication system for
data transmission.
Demultiplexers are used in ATM packets broadcasting.
The output of Arithmetic Logic Unit is stored in respective registers using
Demultiplexers.
They act as Serial to Parallel converter.
They are also used in Wavelength routers.
Advantages & Disadvantages of De-Multiplexer:
The advantages of Demultiplexer include the following.
The efficiency of the communication system can be improved with the help of the
Multiplexer & Demultiplexer combination
A demultiplexer separates back the mutual signals into streams.
Its function is quite opposite to multiplexer
It can be used as a decoder in the security systems
The combination of Mux & Demux is used for the transmission of Audio or Video
signals.
The disadvantages of demultiplexer include the following.
Information It processes the digital data and It collects digital data and info
Processing info by collecting them from from one single source/channel and
multiple sources and integrating then converts it into a set of
them into a single source as the multiple sources as the outputs.
output.
Type of Digital The multiplexer acts as a digital The demultiplexer acts as a digital
Setup switch. circuit.
Decoder: -
a binary decoder is a digital circuit that converts a binary code into a set of
outputs. Binary decoders are the inverse of encoders and are widely used in
digital systems to convert serial codes into parallel outputs.
In the 2 to 4 line decoder, there are total of two inputs, i.e., A 0, and A1 single
enable line E and four outputs, i.e., Y0, Y1, Y2, and Y3.
For each combination of inputs, when the enable 'E' is set to 1, one of these four
outputs will be 1.
The block diagram and the truth table of the 2 to 4 line decoder are given below.
The logical expression of the term Y0, Y0, Y2, and Y3 is as follows:
Y3=E.A1.A0
Y2=E.A1.A0'
Y1=E.A1'.A0
Y0=E.A1'.A0'
In a 3 to 8 line decoder, there is a total of eight outputs, i.e., Y 0, Y1, Y2, Y3, Y4, Y5,
Y6, and Y7 and three inputs, i.e., A0, A1, and A2 and single line Enable E.
For each combination of inputs, when the enable 'E' is set to 1, one of these Eight
outputs will be 1.
The block diagram and the truth table of the 3 to 8 line encoder are given below.
The logical expression of the term Y0, Y1, Y2, Y3, Y4, Y5, Y6, and Y7 is as follows:
Y0=A0'.A1'.A2'
Y1=A0.A1'.A2'
Y2=A0'.A1.A2'
Y3=A0.A1.A2'
Y4=A0'.A1'.A2
Y5=A0.A1'.A2
Y6=A0'.A1.A2
Y7=A0.A1.A2
There is the following formula used to find the required number of lower-order
decoders.
When A3 = 0, the lower decoder will be activated (enabled) and upper decoder will
be deactivated. At that time, the lower decoder will generate the minterms from 0000
to 0111 i.e. m0 to m7.
When A3 = 1, the lower decoder will be deactivated and upper decoder will be
activated. At that time, the upper decoder will generate the Minterms from 1000 to
1111 i.e. m8 to m15.
Truth Table:
The logical expression of the term A0, A1, A2,…, A15 are as follows:
Y0=A0'.A1'.A2'.A3'
Y1=A0'.A1'.A2'.A3
Y2=A0'.A1'.A2.A3'
Y3=A0'.A1'.A2.A3
Y4=A0'.A1.A2'.A3'
Y5=A0'.A1.A2'.A3
Y6=A0'.A1.A2.A3'
Y7=A0'.A1.A2.A3
Y8=A0.A1'.A2'.A3'
Y9=A0.A1'.A2'.A3
Y10=A0.A1'.A2.A3'
Y11=A0.A1'.A2.A3
Y12=A0.A1.A2'.A3'
Y13=A0.A1.A2'.A3
Y14=A0.A1.A2.A3'
Y15=A0.A1.A2'.A3
Encoder:-
An encoder is a digital circuit that converts a set of binary inputs into a unique
binary code.
Types of Encoder:
1) 4 to 2 line Encoder:-
In 4 to 2 line encoder, there are four inputs, i.e., Y0, Y1, Y2, and Y3, and two outputs,
i.e., A0 and A1.
In 4-input lines, one input-line is set to true at a time to get the respective binary
code in the output side.
The block diagram and the truth table of the 4 to 2 line encoder shown below.
A1=Y3+Y2
A0=Y3+Y1
2) 8 to 3 line Encoder:
In 8 to 3 line encoder, there are eight inputs, i.e., Y 0, Y1, Y2, Y3, Y4, Y5, Y6, and
Y7 and three outputs, i.e. A0, A1, and A2.
In 8-input lines, one input-line is set to true at a time to get the respective binary
code in the output side.
The block diagram and the truth table of the 8 to 3 line encoder shown below.
The logical expression of the term A0, A1, and A2 are as follows:
A2=Y4+Y5+Y6+Y7
A1=Y2+Y3+Y6+Y7
A0=Y7+Y5+Y3+Y
In 10 to 4 line encoder, there are ten inputs, i.e., Y 0, Y1, Y2, Y3, Y4, Y5, Y6, Y7, Y8,
and Y9 and four outputs, i.e., A0, A1, A2, and A3.
In 10-input lines, one input-line is set to true at a time to get the respective BCD
code in the output side.
The block diagram and the truth table of the decimal to BCD encoder are given
below.
Truth Table:
The logical expression of the term A0, A1, A2, and A3 is as follows:
A3=Y9+Y8
A2=Y7+Y6+Y5+Y4
A1=Y7+Y6+Y3+Y2
A0 = Y9 + Y7 +Y5 +Y3 + Y1
Priority Encoder:
4 to 2 line Priority Encoder:
In this priority encoder, there are 4 inputs, i.e., Y 0, Y1, Y2, and Y3, and two outputs,
i.e., A0 and A1.
When more than one input is '1' at the same time, the output will be the (binary) code
corresponding to the higher priority input.
Truth Table:
The logical expression of the term A0 and A1 can be found using K-map as:
A1=Y3+Y2
A0=Y3+Y2'.Y1
Disadvantages of an encoder:
The subject of magnetic radio interference.
Susceptible to dirt, oil and dust contaminate.
Direct light source interference.
Application of an encoder:
Automatic health monitoring systems.
RF-based home automation system.
Robotics vehicle with the metal detector.
War field flying robot with a using night-vision flying camera.
Speed synchronization of multiple motors in industries.
Encoder for CNC machines.
Encoder for the medical industry most common for breast cancer treatment in the
world.
Encoder for the electronics industry.
ENCODER DECODER
Encoder circuit basically converts the Decoder performs reverse operation and
applied information signal into a coded recovers the original information signal from
digital bit stream. the coded bits.
In case of encoder, the applied signal is Decoder accepts coded binary data as its
the active signal input. input.
The output lines for an encoder is n. The output lines of an decoder is 2n.
The encoder generates coded data bits as The decoder generates an active output
its output. signal in response to the coded data bits.
The encoder circuit is installed at the The decoder circuit is installed at the
transmitting end. receiving side.
OR gate is the basic logic element used AND gate along with NOT gate is the basic
in it. logic element used in it.
Code Converter: The Code converter is used to convert one type of code to another.
Some common types of code converters are Binary to Gray code converter, Gray to Binary
code converter, BCD to Excess-3 code converter, 7- Segment display code converter etc.
Different codes are used for different types of digital system and computer based
application to perform data representation and manipulation tasks.
BCD to Excess-3 code converter: The Excess-3 code is an important 4-bit code,
sometimes used with Binary-coded decimal ( BCD ) number. To convert any decimal
number into its excess-3 form, add 3 to each decimal digit and then convert the sum to a
BCD number.
Binary to Gray code conversion:- The Binary to Gray code converter is a logical circuit
that is used to convert the binary code into its equivalent Gray code. By putting the MSB
of 1 below the axis and the MSB of 1 above the axis and reflecting the (n-1) bit code about
an axis after 2n-1 rows, we can obtain the n-bit gray code.
ABCD G1G2G3G4
0 0000 0000
1 0001 0001
2 0010 0011
3 0011 0010
4 0100 0110
5 0101 0111
6 0110 0101
7 0111 0100
8 1000 1100
9 1001 1101
10 1010 1111
11 1011 1110
12 1100 1010
13 1101 1011
14 1110 1001
15 1111 1000
In 4-bit gray code, the 3-bit code is reflected against the axis drawn after the 2 4-1-
1th =8th row.
Example:-
Suppose we have a binary number 01101, which we want to convert into Gray code. There
are the following steps which need to perform this conversion:
o As we know that the 1st bit of the Gray code is the same as the MSB of the binary
number. In our example, the MSB is 0, so the MSB or 1st bit of the gray code is 0.
o Next, we perform the XOR operation of the 1'st and the second binary number. The
1st bit is 0, and the 2nd bit is 1. Both the bits are different, so the 2 nd bit of the Gray
code is 1.
o Now, we perform the XOR of the 2 nd bit and 3rd bit of the binary number. The 2nd bit
is 1, and the 3rd bit is also 1. These bits are the same, so the 3 rd bit of the Gray code is
0.
o Again perform the XOR operation of the 3rd and 4th bit of binary number. The 3rd bit
is 1, and the 4th bit is 0. As these are different, the 4th bit of the Gray code is 1.
o Lastly, perform the XOR of the 4 th bit and 5th bit of the binary number. The 4 th bit is
0, and the 5th bit is 1. Both the bits are different, so that the 5 th bit of the Gray code is
1.
o The gray code of the binary number 01101 is 01011.
The Gray to Binary code converter is a logical circuit that is used to convert the gray code
into its equivalent binary code. There is the following circuit used to convert the Gray code
to binary number.
Just like Binary to Gray code conversion; it is also a very simple process. There are the
following steps used to convert the Gray code into binary.
o Just like binary to gray, in gray to binary, the 1 st bit of the binary number is similar
to the MSB of the Gray code.
o The 2nd bit of the binary number is the same as the 1 st bit of the binary number when
the 2nd bit of the Gray code is 0; otherwise, the 2 nd bit is altered bit of the 1st bit of
binary number. It means if the 1st bit of the binary is 1, then the 2 nd bit is 0, and if it
is 0, then the 2nd bit be 1.
o The 2nd step continues for all the bits of the binary number.
Suppose we have the Gray code 01011, which we want to convert into a binary number.
There are the following steps which we need to perform for the conversion:
o The 1'st bit of the binary number is the same as the MSB of the Gray code. The
MSB of the Gray code is 0, so the MSB of the binary number is 0.
o Now, for the 2nd bit, we check the 2nd bit of the Gray code. The 2 nd bit of the Gray
code is 1, so the 2nd bit of the binary number is one that is altered number of 1st
o The next bit of the Gray code is 0; the 3 rd bit is the same as the 2 nd bit of the Gray
code, i.e., 1.
o The 4th bit of the Gray code is 1; the 4th bit of the binary number is 0 that is the
altered number of the 3rd
o The 5th bit of the Gray code is 1; the 5 th bit of the binary number is 1; that is the
altered number of the 4th bit of the binary number.
o So, the binary number of the Gray code 01011 is 01101.
Initially, the instructions are stored in the storage memory of the computer in sequential
order. The microprocessor fetches those instructions from the stored area (memory), then
decodes it and executes those instructions till STOP instruction is met. Then, it sends the
result in binary form to the output port. Between these processes, the register stores the
temporary data and ALU (Arithmetic and Logic Unit) performs the computing functions.
Features of a Microprocessor:-
Low Cost - Due to integrated circuit technology microprocessors are available at
very low cost. It will reduce the cost of a computer system.
High Speed - Due to the technology involved in it, the microprocessor can work at
very high speed. It can execute millions of instructions per second.
Small Size - A microprocessor is fabricated in a very less footprint due to very large
scale and ultra large scale integration technology. Because of this, the size of the
computer system is reduced.
Versatile - The same chip can be used for several applications, therefore,
microprocessors are versatile.
Low Power Consumption - Microprocessors are using metal oxide semiconductor
technology, which consumes less power.
Less Heat Generation - Microprocessors uses semiconductor technology which will
not emit much heat as compared to vacuum tube devices.
Reliable - Since microprocessors use semiconductor technology, therefore, the
failure rate is very less. Hence it is very reliable.
Portable - Due to the small size and low power consumption microprocessors are
portable.
Application of microprocessor:-
Smartphones:Smartphones, tablets, and other mobile devices all rely on microprocessors
to function. They execute instructions, process data, and perform various operations to
make these devices work.
Every Computer:- It is used in every computer, ranging from personal computers to
supercomputers. All the instruction execution and operational execution work are done
by microprocessors present inside them.
Automobile: It is used in automobiles to control a wide range of functions including
engine management, and entertainment systems.
lift control: It is used in lift control, Traffic light control, fuel control of furnaces in
power plants, etc.
In robots: It is used in robots, video games, smart cameras, etc.
Aerospace: Microprocessors are used in various aerospace applications, including
aircraft navigation, guidance systems, and flight control systems.
Server management: It plays an important role in server management where it executes
millions of data stores and retrieves instructions in milliseconds.
Household Devices: The programmable thermostat allows the control of temperature at
homes. In this system, a microprocessor works with the temperature sensor to determine
and adjust the temperature accordingly. High-end coffee makers, Washing machines, and
radio clocks contain microprocessor technology.
Industrial Applications: Some industrial items which use microprocessors technology
include: cars, boats, planes, trucks, heavy machinery, elevators, gasoline pumps, credit-
card processing units, traffic control devices, computer servers, most high tech medical
devices, surveillance systems, security systems, and even some doors with automatic entry.
In Medicals: Many medical devices, like an insulin pump, are typically controlled by a
microprocessor. The microprocessors perform various functions, such as processing data
from bio-sensors, storing measurements, and analyzing results.
Instrumentation: Microprocessor is also very useful in the field of instrumentation.
Function generators, frequency counters, frequency synthesizers, spectrum analyses and
many other instruments are available, when microprocessors are used as controller.
Entertainment: The use of microprocessor in entertainment equipment, toys and home
entertaining applications is making them more useful and full of features.
Office Automation and Publication: Microprocessor based system with software
packages has changed the office environment. Microprocessors based systems are being
used for spread sheet operations, word processing, storage etc.The Publication technology
has revolutionized by the microprocessor.
Communication: In communication the telephone industry is most important. In this
industry, microprocessors are used in digital telephone sets, telephone exchanges and
modem etc. The use of microprocessor in satellite communication, television, has made
teleconferencing possible. Railway reservation and airline reservation system also uses
microprocessor technology. WAN (Wide Area Network) and LAN (Local Area Network)
for communication of vertical information through computer network.
Disadvantages of microprocessors :
1. Overheating occurs due to overuse
2. Performance depends on the size of the data
3. Large board size than microcontrollers
4. Most microprocessors do not support floating-point operations
Types of Microprocessor:
A microprocessor can be classified into three categories −
RISC Processor: RISC stands for Reduced Instruction Set Computer. RISC or Reduced
Instruction Set Computer is a computer architecture where instruction is simple and
designed to get executed quickly. Instructions get completed in one clock cycle this is
because of the optimization of instructions and pipelining (a technique that allows for
simultaneous execution of parts, or stages, of instructions more efficiently process
instructions). RISC makes use of multiple registers to avoid large interactions with
memory. It has few addressing nodes.
Some of the RISC processors are −
Power PC: 601, 604, 615, 620
DEC Alpha: 210642, 211066, 21068, 21164
MIPS: TS (R10000) RISC Processor
PA-RISC: HP 7100LC
IBM RS6000
MC88100
Architecture of RISC:
RISC microprocessor architecture uses highly-optimized set of instructions. It is used in
portable devices like Apple iPod due to its power efficiency.
Characteristics of RISC:
The major characteristics of a RISC processor are as follows −
It consists of simple instructions.
It supports various data-type formats.
It utilizes simple addressing modes and fixed length instructions for pipelining.
It supports register to use in any context.
One cycle execution time.
“LOAD” and “STORE” instructions are used to access the memory location.
It consists of larger number of registers.
It consists of less number of transistors.
1. One cycle execution time: For executing each instruction in a computer, the RISC
processors require one CPI (Clock per cycle). And each CPI includes the fetch,
decode and execute method applied in computer instruction.
2. Pipelining technique: The pipelining technique is used in the RISC processors to
execute multiple parts or stages of instructions to perform more efficiently.
3. A large number of registers: RISC processors are optimized with multiple registers
that can be used to store instruction and quickly respond to the computer and
minimize interaction with computer memory.
4. It supports a simple addressing mode and fixed length of instruction for executing
the pipeline.
5. It uses LOAD and STORE instruction to access the memory location.
6. Simple and limited instruction reduces the execution time of a process in a RISC
CISC Processor: CISC stands for Complex Instruction Set Computer. CISC or Complex
Instruction Set Computer is a computer architecture where instructions are such that a
single instruction can execute multiple low-level operations like loading from memory,
storing into memory, or an arithmetic operation, etc. It has multiple addressing nodes
within a single instruction.CISC makes use of very few registers.
Some of the CISC Processors are,
IBM 370/168
VAX 11/780
Intel 80486
Intel 386
Intel 486
Architecture of CISC:
Its architecture is designed to decrease the memory cost because more storage is needed in
larger programs resulting in higher memory cost. To resolve this, the number of
instructions per program can be reduced by embedding the number of operations in a single
instruction.
Characteristics of CISC:
Variety of addressing modes.
Larger number of instructions.
Variable length of instruction formats.
Several cycles may be required to execute one instruction.
Instruction-decoding logic is complex.
One instruction is required to support multiple addressing modes.
2. The number of instructions is less as compared The number of instructions is more as compared
to CISC. to RISC.
3. The addressing modes are less. The addressing modes are more.
5. The RISC consumes low power. The CISC consumes high power.
6. The RISC processors are highly pipelined. The CISC processors are less pipelined.
Bit-Slice Processors: The processor of desired word length is developed using the building
blocks. The basic building block is called Bit-Slice where the building blocks include 4-bit
ALUs, micro programs sequencers, carry look-ahead generators, etc. The word 'slice' was
used because the desired number of ALUs and other components were used to build an 8-
bit, 16-bit or 32-bit CPU.
Graphic Processors: Graphics Processors are specially designed processors for graphics.
Intel has developed Intel 740-3D graphics chip. It is optimized for Pentium II PCs, using a
hyper pipelined 3D architecture with additional 2D acceleration. Like most 3D graphics
chips, the I-740 will be marketed in performance, not the main stream category. It is
designed mostly for such heavy multimedia uses as games and movies.
Working of Microcontroller :
The microcontroller chip is a high-speed device, yet it is slow when compared to a
computer. As a result, each command will be executed quickly within the
microcontroller. The quartz oscillator is enabled and through control logic register once
the supply is powered on. Parasite capacitors will be recharged for a few seconds while
the early preparation is taking place. Once the voltage level reaches its maximum value
and the oscillator’s frequency stabilizes, the operation of writing bits through special
function registers becomes stable. Everything is controlled by the oscillator’s CLK, and
the whole electronics will begin to function. All of this happens in a matter of
nanoseconds.
A microcontroller’s major role is that it can be thought of as a self-contained system with
a processor memory. Its peripherals can be used in the same way that an 8051
microcontroller can. The bulk of microcontrollers in use today are embedded in other
types of machinery such as telephones, appliances, vehicles, and computer system
peripherals.
Architecture of Microcontroller:
CPU: Basically, the CPU is the central part of a microcontroller. It is a brain that follows
out an action given by the user. The CPU fetches the instruction from the memory (ROM),
decodes it and executes it. This technique is known as pipelining. The pipelining is done
with the help of the data bus and address bus.
The CPU operates instructions at a speed of MegaHertz (MHz) or GigaHertz (GHz).
Clock: The MCU requires the clock to do any task. To provide a clock to the
microcontroller, a crystal oscillator is driven to the CPU.
The crystal selection determines the speed at which microcontroller want to operate. The
frequency range of the crystal oscillator is generally in the range of MHz.
Registers: Register is a data storing an element. It stores a binary word of 8-bit length. The
microcontrollers are equipped with various general purpose and peripheral registers.
General purpose registers include Program Counter (PC) and the stack pointer for storing
the data and instructions. Whereas Peripheral registers are useful to configure the
hardware in a microcontroller.
Input-Output Ports: Input/output ports are commonly called as GPIO (General purpose
Input output) ports. This means these ports can be used either as input or output. Some
micro MCU supports alternate GPIO. They can be used for multiple functions.
They are required for connecting the external devices like Display interfaces (LED, LCD,
and touch screen), motors, etc. I/O ports are also used for input sensing and switching
purposes.
Memory: RAM (Random access memory) is for storing the temporary storage of data and
ROM (Read Only Memory) is for permanent storage.
To store the data in a microcontroller, the processor architecture is divided into Harvard
and Von-Neumann architecture. Harvard has separate memory buses (address bus and data
bus) to store the instructions and data, whereas Von-Neumann has a common memory for
both instructions and data.
Timers: Timers are the most innovative peripherals that can produce precise time delay. It
can repeat a pre-defined task at a known time period.
Some of the applications of timer include motor control, to turn on/off relay
circuit, GPS (Global Position System), home appliance control etc.
Counters: The Counter is a peripheral that counts the events happening outside the MCU.
Applications of counters include pulse measurement, object detection, etc. They are used in
frequency measurement, to count the rise or fall in temperature in microwave ovens, to
measure the set time in washing machine and electric heaters.
Serial Interfaces: In electronics, different devices talk to each other using serial
communication. To achieve serial communication, interfaces like UART (Universal
Asynchronous receiver-transmitter), I2C, and SPI etc. are used.
Moreover, advanced protocols like Ethernet, USB are also incurred in latest
microcontrollers.
Types of Microcontroller :
Here are some of the most common types of microcontrollers:
1) 8-bit Microcontrollers: These are the most basic type of microcontrollers,
typically used in simple applications such as toys, small appliances, and remote
controls. They have a limited processing power and memory capacity, but they are
easy to use and cost-effective. This type of microcontroller is used to execute
arithmetic and logical operations like addition, subtraction, multiplication division, etc.
For example, Intel 8031 and 8051 are 8 bits microcontroller.
2) 16-bit Microcontrollers: These are more advanced than 8-bit microcontrollers and
are capable of performing more complex tasks. They are commonly used in
applications such as medical devices, automotive systems, and industrial control
systems.This type of microcontroller is used to perform arithmetic and logical
operations where higher accuracy and performance is required. For example, Intel 8096
is a 16-bit microcontroller
3) 32-bit Microcontrollers: These are the most powerful and feature-rich
microcontrollers, capable of handling large amounts of data and performing high-
speed processing. They are used in applications such as gaming systems, multimedia
devices, and high-end industrial automation. This type of microcontroller is generally
used in automatically controlled appliances like automatic operational machines,
medical appliances, etc.
4) ARM Microcontrollers: These microcontrollers are based on the ARM
architecture and are widely used in a variety of applications, including mobile devices,
automotive systems, and industrial control systems.
5) PIC Microcontrollers: These microcontrollers are manufactured by Microchip
Technology and are commonly used in a wide range of applications, including home
appliances, automotive systems, and medical devices.
6) AVR Microcontrollers: These microcontrollers are manufactured by Atmel
Corporation and are commonly used in applications such as robotics, industrial control
systems, and consumer electronics.
7) FPGA-based Microcontrollers: These microcontrollers use field-programmable
gate arrays (FPGAs) to provide highly customizable and flexible processing
capabilities. They are commonly used in applications such as digital signal processing,
video processing, and high-speed networking.
Applications of Microcontroller :
In contrast to microprocessors, which are used in personal computers and other devices,
microcontrollers are mostly employed in embedded devices. These are mostly utilized in
a variety of products such as implantable medical devices, machine tools, automotive
engine control systems, office equipment, remote-controlled appliances, and so on. The
following are some of the most common uses for microcontrollers.
Properties of Microcontroller :
Microcontroller devices are capable of having words longer than 64 bits.
Microcontroller consist of RAM , ROM , Timer , I/O Ports.
Microcontroller ROM is used for program storage and RAM is used for data storage.
It is designed by using CISC architecture.
The power consumption of modern microcontrollers is significantly lower and have
operating voltage range from 1.8V to 5.5V
The latest feature of microcontroller is flash memory like EPROM and EEPROM.
The most recent feature of a microcontroller is flash memory, such as EPROM and
EEPROM.
Uses of Microcontroller :
Microcontrollers are used in a wide range of electronic devices and systems, including:
1. Home Appliances: Many home appliances, such as washing machines, refrigerators,
and air conditioners, use microcontrollers to perform various functions, such as
temperature control, timing, and monitoring.
2. Automotive Systems: Microcontrollers are used in automotive systems, such as
engine control units, anti-lock braking systems, and airbag systems, to control various
functions and ensure safe and efficient operation.
3. Medical Devices: Medical devices, such as insulin pumps, heart monitors, and blood
glucose meters, use microcontrollers to perform various functions and provide
accurate and reliable results.
4. Industrial Control Systems: Microcontrollers are used in industrial control systems,
such as robotics, process control systems, and manufacturing equipment, to control
and monitor various processes and operations.
5. Consumer Electronics: Many consumer electronics devices, such as digital cameras,
gaming systems, and audio players, use microcontrollers to perform various functions
and provide advanced features and capabilities.
6. IoT Devices: Internet of Things (IoT) devices, such as smart home systems,
wearables, and environmental sensors, use microcontrollers to connect to the internet
and perform various functions.
7. Aerospace and Defense Systems: Microcontrollers are used in aerospace and
defense systems, such as satellites, avionics, and missiles, to control and monitor
various functions and ensure safe and efficient operation.
Difference between Microcontroller and Microprocessor:-
Integration
Highly integrated Less integrated
level
System
Single-chip system CPU + support chips
architecture
Processing
Lower power Higher power
power
Instruction
Fixed instruction set More flexible
set
On-board
On-chip memory No on-board memory
memory
Input/Output
More I/O ports Fewer I/O ports
(I/O)
Peripheral
On-board peripherals External peripherals
devices
Power
Lower power Higher power
consumption
Standard development
Integrated development environment (IDE)
tools and languages
provided by manufacturers, with
Development such as C, C++, and
specialized programming languages and
assembly
tools
Evolution of Microprocessors:
The first generation microprocessors were introduced in the year 1971-1972 by Intel
Corporation. It was named Intel 4004 since it was a 4-bit processor.
It was a processor on a single chip. It could perform simple arithmetic and logical
operations such as addition, subtraction, Boolean OR and Boolean AND.
I had a control unit capable of performing control functions like fetching an
instruction from storage memory, decoding it, and then generating control pulses to
execute it.
Fifth Generation (64 - bit Microprocessors): From 1995 to now we are in the fifth
generation. After 80856, Intel came out with a new processor namely Pentium processor
followed by Pentium Pro CPU, which allows multiple CPUs in a single system to achieve
multiprocessing.Other improved 64-bit processors are Celeron, Dual, Quad, Octa Core
processors.
Where,
Limited Bandwidth: The bus organization used in the 8085 microprocessor has a limited
bandwidth, which can limit the performance of the processor in high-performance
applications.
Latency: The bus organization can introduce latency, which is the delay between the
time a command is issued and the time the response is received. This latency can be a
problem in real-time applications that require immediate responses.
Data Integrity: The bus organization used in the 8085 microprocessor is vulnerable to
data corruption due to electromagnetic interference and other sources of noise. This can
lead to errors in data transmission and processing.
Complexity: The bus organization used in the 8085 microprocessor can be complex to
implement and troubleshoot, which can increase the cost and time required to develop
and maintain computer systems.
Registers in 8085:
(a) General Purpose Registers – The 8085 has six general-purpose registers to store 8-
bit data; these are identified as- B, C, D, E, H, and L. These can be combined as register
pairs – BC, DE, and HL, to perform some 16-bit operation. These registers are used to
store or copy temporary data, by using instructions, during the execution of the program.
(b) Specific Purpose Registers –
Accumulator: The accumulator is an 8-bit register (can store 8-bit data) that is the
part of the arithmetic and logical unit (ALU). After performing arithmetical or logical
operations, the result is stored in accumulator. Accumulator is also defined as register
A.
Flag registers: The Flag register is a Special Purpose Register. Depending upon the
value of the result after any arithmetic and logical operation, the flag bits become set
(1) or reset (0). In 8085 microprocessor, the flag register consists of 8 bits and only 5
of them are useful. The 5 flags are:
What is Flag register ?
The Flag register is a 5-bit register in the 8085 microprocessor that contains
information about the status of the arithmetic and logic operations performed by the
processor. The bits in the Flag register are used to indicate whether the result of an
operation is zero, positive, negative, or if there was a carry or borrow during the
operation.
Efficient error detection: The flag register can be used to efficiently detect errors and
other conditions during program execution. For example, the carry flag can be used to
detect overflow or underflow during arithmetic operations.
Simplifies branching: The flags can be used to make decisions about branching and
other control flow operations. For example, the zero flag can be used to determine if a
value is zero, and the sign flag can be used to determine if a value is negative.
Saves memory: The flag register can help reduce the amount of memory required for
storing status information.
Faster execution: By using flags instead of performing additional operations to check
conditions, the 8085 microprocessor can execute programs more quickly.
Limited information: The flag register provides a limited set of status information that
may not be sufficient for all applications.
Limited control: The flags in the flag register are set or cleared automatically by the
processor and cannot be directly manipulated by the programmer.
Complexity: The use of flags can add complexity to programming and debugging,
particularly when multiple flags are used in conjunction with one another.
Overwriting: Since the flag register is also used for other purposes, such as storing the
stack pointer, the status flags can be accidentally overwritten during program execution.
(c) Memory Registers – There are two 16-bit registers used to hold memory addresses.
The size of these registers is 16 bits because the memory addresses are 16 bits. They
are :-
Program Counter: This register is used to sequence the execution of the instructions.
The function of the program counter is to point to the memory address from which the
next byte is to be fetched. When a byte (machine code) is being fetched, the program
counter is incremented by one to point to the next memory location.
Stack Pointer: It is used as a memory pointer. It points to a memory location in
read/write memory, called the stack. It is always incremented/decremented by 2
during push and pop operation.
1. All of the registers in the 8085 microprocessor are directly accessible by the arithmetic
and logic unit (ALU), allowing for efficient processing of data.
2. The accumulator register is used as a default destination for most arithmetic and logic
instructions, which simplifies programming.
3. The general purpose registers can be used for storing data during computations, but
they can also be used to hold memory addresses, making them useful for accessing
memory locations.
4. The program counter and stack pointer registers are crucial for managing the flow of
instructions and data within a program.
5. The flag register provides valuable information about the results of arithmetic and
logic operations, allowing for efficient decision-making in programs.
6. The instruction register stores the current instruction being executed, allowing for
efficient decoding and control signal generation by the control unit.
Advantages of registers in 8085 microprocessor
1. Fast access: Registers provide a fast and efficient way to access data and perform
operations. Since the registers are located inside the processor, they can be accessed
quickly without having to wait for data to be fetched from memory.
2. Reduced memory access: The use of registers can help reduce the number of memory
accesses required, which can improve the overall performance of the system.
3. Specialized functionality: Each register in the 8085 microprocessor has a specific
function, such as the accumulator for arithmetic operations and the program counter
for storing the address of the next instruction. This specialized functionality can make
programming and debugging easier.
4. Reduced complexity: By providing dedicated registers for specific purposes, the
8085 microprocessor reduces the complexity of the programming and execution
process.
1. Complexity: The various addressing modes can be complex, making it difficult for
programmers to choose the correct mode for a given task.
2. Overhead: The use of different addressing modes can result in additional overhead, as
the microprocessor must perform additional operations to access memory.
3. Debugging difficulties: Debugging programs that use multiple addressing modes can
be difficult, as the programmer must keep track of the different modes used in each
memory access.
4. Limitations: The addressing modes are limited by the size of the program counter and
the memory address space, which can impact the performance of large programs.
A) AD0 to AD7 : The 8 bit data bus (D0 – D7) is multiplexed with the lower half (A 0 – A7)
of the 16 bit address bus. During first part of the machine cycle (T1), lower 8 bits of
memory address or I/O address appear on the bus. During remaining part of the machine
cycle (T2 and T3) these lines are used as a bi-directional data bus.
B) A8 to A15 : The upper half of the 16 bit address appears on the address lines A 8 to A15.
These lines are exclusively used for the most significant 8 bits of the 16 bit address lines.
a) ALE (Address Latch Enable) : We, know that AD0 to AD7 lines are multiplexed and
the lower half of address (A0 – A7) is available only during T1 of the machine cycle. This
lower half of address is also necessary during T 2 and T3 of machine cycle to access specific
location in memory or I/O port. This means that the lower half of an address must be
latched in T1 of the machine cycle, so that it is available throughout the machine cycle. The
latching of lower half of an address bus is done by using external latch and ALE signal
from 8085 Pin Diagram.
b) RD and WR : These signals are basically used to control the direction of the data flow
between processor and memory or I/O device/port. A low on RD indicates that the data
must be read from the selected memory location or I/O port via data bus. A low on WR
indicates that the data must be written into the selected memory location or I/O port via
data bus.
c) IO/M, S0 and S1 : IO/M indicates whether I/O operation or memory operation is being
carried out. S1 and S0 indicate the type of machine cycle in progress.
d) READY : It is used by the microprocessor to sense whether a peripheral is ready or not
for data transfer. If not, the processor waits. It is thus used to synchronize slower
peripherals to the microprocessor.
4. Interrupt Signals:
The 8085 Pin Diagram has five hardware interrupt signals : RST 5.5, RST 6.5, RST 7.5,
TRAP and INTR. The microprocessor recognises interrupt requests on these lines at the
end of the current instruction execution.
The INTA (Interrupt Acknowledge) signal is used to indicate that the processor has
acknowledged an INTR interrupt.
a) SID (Serial I/P Data) : This input signal is used to accept serial data bit by bit from the
external device.
b) SOD (Serial O/P Data) : This is an output signal which enables the transmission of
serial data bit by bit to the external device.
6. DMA Signal:
a) HOLD : This signal indicates that another master is requesting for the use of address
bus, data bus and control bus.
7. Reset Signals:
Need for frequent blood tests: To create a timing diagram of INR, patients need to
undergo frequent blood tests, which can be inconvenient and uncomfortable.
Cost: Frequent blood tests can also be expensive for patients, especially those who are not
covered by insurance.
Inaccuracy: The timing diagram of INR may not always accurately reflect the level of
anticoagulation in the patient’s bloodstream, as it is based on a single point in time and
does not take into account any fluctuations in the patient’s INR level.
Bit :- A bit (binary digit) is the smallest unit of data that a computer can process and store.
A bit is always in one of two physical states, similar to an on/off light switch. The state is
represented by a single binary value, usually a 0 or 1.
Byte :- a unit of computer information or data-storage capacity that consists of a group of
eight bits and that is used especially to represent an alphanumeric character
Word :- A word is the natural unit of data used by a particular microprocessor, although it
must be bigger than a byte, which is 8 bit.
Nibble :- A nibble is a unit of measurement for digital files that consists of four bits or
half of a byte.
Instruction :- An instruction is a binary pattern designed inside the microprocessor to
perform a specific function. In other words, it is actually a command to the microprocessor
to perform a given task on specified data.
Von Neumann Architecture:
Von Neumann Architecture is a digital computer architecture whose design is based on the
concept of stored program computers where program data and instruction data are stored in
the same memory. This architecture was designed by the famous mathematician and
physicist John Von Neumann in 1945.
Harvard Architecture:
Harvard Architecture is the digital computer architecture whose design is based on the
concept where there are separate storage and separate buses (signal path) for instruction
and data. It was basically developed to overcome the bottleneck of Von Neumann
Architecture.
Difference between Von Neumann and Harvard Architecture :
VON NEUMANN ARCHITECTURE HARVARD ARCHITECTURE
Same physical memory address is used for Separate physical memory address is used
instructions and data. for instructions and data.
There is common bus for data and Separate buses are used for transferring data
instruction transfer. and instruction.
CPU can not access instructions and CPU can access instructions and read/write
read/write at the same time. at the same time.
It is used in personal computers and small It is used in micro controllers and signal
computers. processing.