Unit -3 PPT
Unit -3 PPT
3.2 Logic Gates: ANR, OR, NOT, XOR, XNOR, NAND, NOR, Universal, DeMorgan Law
3.3 Binary Arithmetic: Binary Addition
3.4 Logic Circuits: Half Adder, Full Adder , SR, JK, T & D Flip Flops
3.5 Introduction to Microprocessor and Microcontrollers (Only block Diagram)
3.6 Digital IC Design Flow, IC fabrication process flow
3
Decimal Number System
𝑁 = ⋯ (𝐷 2 × 𝑅 2 )+ (𝐷 1 × 𝑅 1 )+ (𝐷 0 × 𝑅 0 )+ (𝐷 − 1 × 𝑅 −1 )+ (𝐷 − 2 ×
𝑅 −2 )+ (𝐷 − 3 × 𝑅 −3 )…
Where,
N = decimal number with 3-digit integer and 3-digit fractional
portion
D = Decimal digits
= 0,1,2,3,4,5,6,7,8,9
R = Radix or base of the number system
For Decimal numbersystemR= 10 4
Decimal Number System
For Example:
N = (356.238)10
= (3 × 10 2 )+ (5 × 10 1 )+ (6 × 10 0 )+ (2 × 10−1 )+ (3 × 10−2 )+
(8 × 10 −3 )
5
Binary Number System
𝑁 = ⋯ (𝐵 2 × 𝑅 2 )+ (𝐵 1 × 𝑅 1 )+ (𝐵 0 × 𝑅 0 )+ (𝐵 −1 × 𝑅 −1 )+ (𝐵 −2 × 𝑅 −2 )+
(𝐵 − 3 × 𝑅 −3 )…
Where,
N = binary number with 3-digit integer and 3-digit fractional
portion
B = Binary digits
= 0,1
8
Octal Number System
𝑁 = ⋯ (𝑂 2 × 𝑅 2 )+ (𝑂 1 × 𝑅 1 )+ (𝑂 0 × 𝑅 0 )+ (𝑂 − 1 × 𝑅 −1 )+ (𝑂 − 2 × 𝑅 −2 )+
(𝑂 − 3 × 𝑅 −3 )…
Where,
N = Octal number with 3-digit integer and 3-digit fractional portion
O = Octal digits
= 0,1,2,3,4,5,6,7
1
0
Hexadecimal Number System
𝑁 = ⋯ (𝐻 2 × 𝑅 2 )+ (𝐻 1 × 𝑅 1 )+ (𝐻 0 × 𝑅 0 )+ (𝐻 − 1 × 𝑅 −1 )+ (𝐻 − 2 ×
𝑅 −2 )+ (𝐻 − 3 × 𝑅 −3 )…
Where,
N = Hexadecimal number with 3-digit integer and 3-digit
fractional portion
H = Hexadecimal digits
= 0,1,2,3,4,5,6,7,8,9,A,B,C,D,E,F
12
Number Representation
Conversions
1) Decimal Binary
2) Decimal Octal
3) Decimal Hexadecima
4) Binary l Octal
5) Binary Hexadecimal
6) Octal Hexadecimal
14
1. Decimal to Binary
• The most popular way to convert a decimal
number into the binary is the double dabble
method.
• In this method, the given decimal number is
progressively divided by 2 and writing the
remainder after each division.
• When all the remainder is read in reverse
order, the binary number is obtained.
15
1. Decimal to Binary
Steps for Decimal to Binary Conversion
Step – 1 Divide the decimal number which is to be converted by
2 which is the base of the binary number. Step – 2 The
remainder which is obtained from step 1 is the least significant
bit of the new binary number. Step – 3 Divide the quotient
which is obtained from the step 2
and the remainder obtained from this is the
significant bit of second least the
Step – 4 Repeat the process until the quotient remains
binary zero. Step
number.
– 5 The last remainder obtained from the division is the most
significant bit of the binary number. Hence arrange the number
from most significant bit to the least significant bit (i.e., from
bottom to top).
16
1. Decimal to Binary
17
1. Decimal to Binary
Conversion of Decimal to Binary for Fraction
Number
• For fractional decimal numbers, multiply it by
2 and record the carry in the integral position.
• The carries when read down produces the
equivalent binary fraction as explained by the
example given below.
18
1. Decimal to Binary
Consider the fractional decimal number 0.35
21
2. Binary to Decimal
The conversion of a fractional binary number
(0.0101)2 into its equivalent decimal number
22
3. Decimal to Octal
Steps for Decimal to Octal Conversion
Step – 1 Divide the decimal number which is to be converted by
8 which is the base of the octal number. Step – 2 The
remainder which is obtained from step 1 is the least significant
bit of the new octal number. Step – 3 Divide the quotient which
is obtained from the step 2
and the obtained from this is the
remainder of second least the
significantbit
Step – 4 Repeat the process until the quotient
octalremains zero. Step
– 5 The last remainder obtained from number.
the division is the most
significant bit of the octal number. Hence arrange the number
from most significant bit to the least significant bit (i.e., from
bottom to top).
23
3. Decimal to Octal
Consider the conversion of the decimal number (239.53)10 .
The conversion of integer part is shown below.
(239.53)𝟏𝟎 = (354.4172)𝟖
24
4. Octal to Decimal
In octal number system, each digit position has the
weight eight regarding power eight shown in the figure below.
(354.42)8= (236.531255)𝟏𝟎 23
5. Decimal to Hexadecimal
Steps for Decimal to Hexadecimal Conversion
Step – 1 Divide the decimal number which is to be converted by
16 which is the base of the hexadecimal number. Step – 2 The
remainder which is obtained from step 1 is the least significant
bit of the new hexadecimal number. Step – 3 Divide the quotient
which is obtained from the step 2 and the remainder obtained
from this is the second least significant bit of the hexadecimal
number. Step – 4 Repeat the process until the quotient remains
zero. Step – 5 The last remainder obtained from the division is
the most significant bit of the hexadecimal number. Hence
arrange the number from most significant bit to the least
significant bit (i.e., from bottom to top).
26
5. Decimal to Hexadecimal
Consider the conversion of the decimal number (3749)10 into its
hexadecimal equivalent number.
(3749)𝟏𝟎 = (D97)𝟏𝟔
27
5. Decimal to Hexadecimal
For fractional decimal numbers, multiply it by 16 and record the carry in the integral
position.
The carries when read down produces the equivalent binary fraction as explained
by the example given below.
28
6. Hexadecimal to Decimal
The base of the hexadecimal number system is 16, therefore the
weights corresponding to various positions of the digits will be as
shown below.
(E8F6.27)𝟏𝟔 = (59638.1523437)𝟏𝟎
29
7. Binary to Octal
The conversion of binary to octal is a reversal of the above
procedure. For example, the binary number (010100111.100011)
can be converted into an octal number by first written the bits in
the group of three and then awarding the decimal number of to
each of the group of three bits as shown below.
�=
28
(010100111.100011) �
8. Octal to Binary
The base of the octal number system (8) is the third power of
base of a binary system (2), the interconversion of octal and a
binary number is very simple and direct as explained below.
Let converting the octal number 35.346 to its equivalent binary
number
(35.346) � = �
29
9. Binary to Hexadecimal
The base of the binary number system is two because it is
represented by two digits, i.e., 0 and 1. It is difficult to represent
the large number in the form of binary digit and hence the
hexadecimal system are used in the digital electronics. The
hexadecimal number systems are easily converted into a binary
system by using the method explains below.
30
10. Hexadecimal to Binary
For converting any hexadecimal number to binary, the binary
representation as detailed above in Table is to be written for
each hexadecimal digit.
31
11. Octal to Hexadecimal
First convert an octal number to a binary
number, then convert it to a h
exadecimal.
32
12. Hexadecimal to Octal
In this method, each digits of the hexadecimal number is
replaced by its 4 bits equivalent, first we find the binary
equivalent of the digit. If, it is not in 3 bits ,then the zeroes are
placed before the binary equivalent to make it 4 bits
Convert (524.36)16 into its binary equivalent
First of all, convert each of the digits into its binary bits and then
group the subsequent bits into 4 bits .If, they all are not able
form the group of 4 then, zeroe’s (0) are left padded to form the
4 bit pair.
5 2 4 3 6
0101 0010 0011 0110 ( 4 bits
representation ) .
(524.36)16 = (0101 01000010 0100 . 0011 0110)2
35
12. Hexadecimal to Octal
Then convert the binary number (11011.1011) to its octal equivalent
This conversion is simple. In this case ,first the binary bits are grouped into 3
bits .If ,they are not forming then zeros are left padded.
After that each groups are converted into its octal equivalent using the table:
11011.1011
011 011 . 101 100
3 3 5 4
(11011.1011)16 =
(33.54)8
36
Binary Addition
There are four points or steps to remember before
proceeding through the operation.
These are
35
Binary Subtraction
Subtraction and Borrow, these two words will be used very
frequently for the binary subtraction. There are four rules of
binary subtraction.
36
Binary Subtraction by 1’s
Complement Method
What is 1’s compliment of a Binary number?
- Replace all 1 to 0 and 0 to 1
- For example
1 1 0 0 1 Original Binary Number
0 0 1 1 0 1’s
0 0 1 1 1 Compliment
2’s
Compliment of subtrahend
42
Binary Subtraction by 2’s
Complement Method
The operation is carried out by means of the following steps:
(i) At first, 2’s complement of the subtrahend is found.
(ii) Then it is added to the minuend.
(iii)If the final carry over of the sum is 1, it is dropped and the
result is positive.
(iv) If there is no carry over, the two’s complement of the sum
will be the result and it is negative.
43
Binary Subtraction by 2’s
Complement Method
1010.11 – 1001.01
2’s complement of 1001.01 is 0110.11. Hence
Minuend -
10100.01
1. Convert
(10101.1101)2 to Decimal
(432.14)10 to Hexadecimal
(462.27)8 to Hexadecimal
(2BA.0C)16 to Octal
(B89A.03)16 to Decimal
Topic Unit
Group 3 Number System and Logic Gates
3.6 Basic Gates:- Symbol, Truth Table, Boolean Algebra Rules (AND, OR, NOT)
1. AND
3.7 2. OR
3.8 3. NOT
3.9 4. XOR
G3.2
3.10 5. XNOR
◊ NOT (INVERTER)
◊ AND
◊ OR
The NOT function
◊ The NOT function:
◊ If any input is high, the output is
low
◊ If any input is low, the output is
high
Input Output
Output
Input 0 1
Output
Input 1 0
Input Output
0 1
1 0
NOT Function
The AND
function
◊ The AND function:
◊ If all the inputs are high is the
output is
high
◊ If any input is low, the output is low
Inputs Output
0
Inputs 0 Output
0
Determine the output
AND Logic Symbol
0
Inputs 0 Output
1
Determine the output
AND Logic Symbol
1
Inputs 1 Output
1
Determine the output
AND Truth Table
◊ To help understand the function of a
digital device, a Truth Table is used:
Input Output
Every possible input
combination 0 0 0
0 1 0
1 0 0
1 1 1
AND Function
AND
Gates
◊ It is possible to have AND gates
with more than 2 inputs. The
same logic rules apply – “if any
input…”
The OR
function
◊ The OR function:
◊ if any input is high, the output is
high
◊ if all inputs are low, the output is
low
Inputs Output
0
Inputs 0 Output
0
Determine the output
OR Logic Symbol
0
Inputs 1 Output
1
Determine the output
OR Logic Symbol
1
Inputs 1 Output
1
Determine the output
OR Truth Table
◊ Truth Table
Input Output
0 0 0
0 1 1
1 0 1
1 1 1
OR Function
Basic logic Gates
X Y Z X Y Z X Z
0 0 0 0 0 0
0 1 0 0 1 1 0 1
1 0 0 1 0 1 1 0
1 1 1 1 1 1
68
Combinational
logic
◊ How would your describe the output
of this combinational logic circuit?
NAND Gate
◊ The NAND gate is the combination
of an NOT gate with an AND gate.
X Y Z X Y Z
0 0 1 0 1
0 1 1 0 0
1 1 0 0
0 0 1 0
1 1 1 0
1
73
1
Derived logic Gates
X Y Z X Y Z
0 0 0 0 0 1
0 1 1 0 1 0
1 0 1 1 0 0
1 1 0 1 1 1
74
What is the output from the XOR gate?
L L
L ??Low L ? High
L H
H H
H ??Low H ? High
H L
XOR output is HIGH only when odd number of inputs are HIGH
Three
input XOR
Gate
What is the output from this XNOR gate?
L L
L ?High H
?
Low
L L
H H
H ?Low H ?High
L H
XNOR output is HIGH only when odd number of inputs are LOW
Boolean Laws
1. Commutative law
79
Boolean Laws
B . . . . is equivalent to . . . .
A A
A.B
B
B
De-Morgan’s
Theorem
Proof of De-
Morgan’s Theorem
Theorem 1: It states that the, complement of a product is equal to sum of the
complements. AB = A + B
A B AB AB A B A+B
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
Proof of De-
Morgan’s Theorem
Theorem 2: It states that the, complement of a sum is equal to product of the
complements. A+B = A B
A B A+B A+B A B AB
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
Examples:
A + AB = A
Solution:
LHS = A + AB
= A (1 + B) …. (1 + B = 1)
=A
= RHS…. Proved
Examples:
Solution:
LHS = A + A’B Since A = A +
AB
= (A+AB) + A’B
= A + AB + A’B
B(A+A’) …….
take
A+ B A’
common
=
=A+ B 1
= RHS ….. Proved
Examples:
(A + B) (A + C) = A +
BC
Solution:
LHS = (A+B) (A+C)
= AA + AC +AB + …. AA =
BC A
= A + AC + AB + BC …. 1 + C = 1
= A (1 +C) + AB + BC
= A + AB + BC …. 1 + B = 1
= A (1 + B) + BC
= A + BC
= RHS ….
Proved
Exercise:
A + A’B + AB = A + B
AB + ABC + AB’ = A
(A + B’ +AB) (A + B) A’B’ = 0
1. With the help of truth table, explain operation of AND, OR, EX-OR,
EX-NOR, NOT gates
3.19 Introduction to
1. Microprocessor (Only block diagram and explanation)
3.20 2. Microcontroller (Only block diagram and explanation)
Binary
• The addition ofAddition
two binary numbers is performed in exactly
the same manner as the addition of decimal numbers.
• Least-significant-digit first.
• “Carry” of 1 into the next position may be needed.
• 4 different cases for binary addition
A B Addition Carry
0 0 0 0
0 1 1 0
1 0 1 0
1 1 0 1
102
Truth Table for Adding
Two 1-Bit Numbers
INPUTS OUTPUTS
A B SUM CARRY
0 0 0 0
0 1 1 0
1 0 1 0
1 1 0 1
103
For Sum : For Carry :
Sum = A B + A B Carry = A B
=A + B
104
Logic Diagram for the Half
Adder
A
Sum
B =A + B
CarryOut
=A.B
105
DISADVANTAGES OF HALF
ADDER
For Ex : A1 Number
A0 A
+ B1 B0 Number from A0 +
Carry generated
+ B0 S0 B
A Sum (S)
3 Inputs
F. A.
B Carryout (Co)
Cin
108
Truth Table for Full
A AdderB Cin S Co
0 0 0 0 0
0 0 1 1 0
0 1 0 1 0
0 1 1 0 1
1 0 0 1 0
1 0 1 0 1
1 1 0 0 1
1 1 1 1 1
109
Sum = S = A + B + Cin
Carryout = Co = A B + A Cin + B
Cin
110
Logic Diagram For Full
A
Adder
B Cin 74LS86N
1 3
2 4
6
5 Sum
74LS86N
1
2 3
1
74LS08J 2 3
4
6 74LS32N
5 4
74LS08J
5 6
Carryout
9 74LS32N
10 8
111
Full Adder using Half
Adder:
H.A. 1 H.A. 2
A A2 S2 S
A1 S1
B B1 C1 B2 C2
Cin 1
Co
2
3
74LS32
N
112
Flip-
Flops
Flip-flop is a bistable logic device i.e. its outputs have two stable
states.
The state of the flip-flop is change only with the inputs and clock
signal.
The clock signal is only edge triggered clock. Either positive edge
negative
or edge triggered clock. High
Negative Edge
110
Flip-
Flops
Q
I/P CLK
Flip-Flop O/P
Types: 1. S – R Flip-Flop
2. J – K Flip-Flop
3. D Flip-Flop
4. T Flip-Flop
114
S- R Flip-Flop
S Q
115
SR Flip Flop
S-R Flip-Flop OR S-R Latch
S R Qn+1 Qn+1
No
0 0 Qn Qn Change
0 1 0 1 Reset
1 0 1 0 Set
1 1 1 1
Race
117
S-R Flip-Flops
When S = 0 & R = 0
S R Qn+1 Qn+1
No
0 0 Qn Qn Change
S = 0 & R = 0 : No Change
118
S-R Flip-Flops
When S = 0 & R = 1
S R Qn+1 Qn+1
0 0 Qn Qn No
Change
0 1 0 1
Reset
119
S-R Flip-Flops
When S = 1 & R = 0
S R Qn+1 Qn+1
0 0 Qn Qn No
Change
0 1 0 1
Reset
1 0 1 0 Set
120
S-R Flip-Flops
When S = 1 & R = 1
S R Qn+1 Qn+1
No
0 0 Qn Qn Change
0 1 0 1 Reset
Set
1 0 1 0
1 1 1 1 Race
S = 1 & R = 1 : Race
121
J-K Flip-Flop
J Q
122
J-K Flip-Flop
J K Qn+1 Qn+1
No
0 0 Qn Qn Change
0 1 0 1 Reset
1 0 1 0 Set
1 1 Qn Qn Toggl
123
J-K Flip-Flop
When J = 0 & K = 0
J K Qn+1 Qn+1
No
0 0 Qn Qn Change
J = 0 & K = 0 : No Change
124
J-K Flip-Flops
When J = 0 & K = 1
J K Qn+1 Qn+1
0 0 Qn Qn No
Change
0 1 0 1
Reset
125
J-K Flip-Flops
When J = 1 & K = 0
J K Qn+1 Qn+1
0 0 Qn Qn No
Change
0 1 0 1
Reset
1 0 1 0 Set
126
J-K Flip-Flops
When J = 1 & K = 1
J K Qn+1 Qn+1
No
0 0 Qn Qn Change
0 1 0 1 Reset
Set
1 0 1 0
1 1 Qn Qn Toggl
e
J = 1 & K = 1 : Toggle
127
D Flip-
Flop
D
J Q
1
K Q
D Q D Qn Qn’
D
CLK Flip-flop 0 0 1
Q
1 1 0
128
T Flip-
Flop
T
J Q
T Q T Qn Qn’
T
CLK Flip-flop 0 1 0
Q
1 0 1
129
Applications of Flip-
Flops
Acts as one bit memory
In the timers
130
Why do we need to learn
Microprocessors/controll
The microprocessor is the
ers?
core of computer systems.
Nowadays many communication,
digital entertainment, portable
devices, are controlled by them.
A designer should know what
types of components he needs,
ways to reduce production costs
and product reliable.
13
1
The necessary tools
for a
microprocessor/contro
CPU: Central Processing
ller
Unit
I/O: Input /Output
Bus: Address bus & Data
bus
Memory: RAM & ROM
Timer
Interrupt
Serial Port 13
2
Microprocessor (MPU)
A group of electronic
circuits fabricated on a
semiconductor chip that
can read binary
instructions written in
memory and process
binary data according
to those instructions
CPU and MPU
129
Microprocesso
rs:
General-purpose microprocessor
CPU for Computers
No RAM, ROM, I/O on CPU chip itself
Example : Intel’s x86, Motorola’s 680x0
13
4
Microcontroller :
A smaller computer
On-chip RAM, ROM, I/O ports...
Example : Motorola’s 6811, Intel’s 8051, Zilog’s Z8 and PIC
16X
13
5
Microcontroller
Microcontrollers
⎯ A microcontroller is a simple
computer implemented in a
single VLSI chip.
⎯ In general, microcontrollers
are cheap and have low
performance
⎯ Microcontrollers are widely
used in industrial control,
automobile and home
applications
It is mainly used in personal computers. It is used mainly in a washing machine, MP3 players,
and embedded systems.
Microprocessor has a smaller number of registers, so Microcontroller has more register. Hence the
more operations are memory-based. programs are easier to write.
It has no RAM, ROM, Input-Output units, timers, and It has a CPU along with RAM, ROM, and other
other peripherals on the chip. peripherals embedded on a single chip.
It's used for general purpose applications that allow It's used for application-specific systems.
you to handle loads of data.
It's complex and expensive, with a large number of It's simple and inexpensive with less number of
instructions to process. instructions to process in130
I
Microprocessor vs. Microcontroller
Microprocessor Microcontroller
CPU is stand-alone, RAM,
• CPU, RAM, ROM, I/O and
ROM, I/O, timer are timer are all on a single chip
separate • fix amount of on-chip ROM,
designer can decide on the
RAM, I/O ports
amount of ROM, RAM and • for applications in which cost,
I/O ports. power and space are critical
expansive
• single-purpose
versatility
general-
purpose
13
4
Applications of Microprocessor-Based Systems
Computers
⎯ System performance is normally the most important design concern
Other
... ...
Keyboard Monitor Disk
peripherals
Bus
1-135
Questions on G3.3
Power Analysis:
Signal Integrity Analysis:
Estimates power Fabrication and Testing
Verifies signal quality.
consumption.
Fabrication •A layer of silicon dioxide (SiO2) is grown on the wafer surface to act as an insulator and mask.
•Photolithography:
•A light-sensitive material (photoresist) is applied to the wafer.
Process •The desired circuit pattern is projected onto the photoresist using a mask.
•The exposed photoresist is developed, leaving behind the desired pattern.
Flow
Etching:
•The exposed areas of the wafer are etched away, transferring the pattern to the underlying material.
Doping:
•Impurities (dopants) are introduced into specific areas of the wafer to create n-type and p-type regions, forming
transistors. This can be done through diffusion or ion implantation.
Deposition:
•Additional layers of materials (like metals for interconnections) are deposited on the wafer using techniques
like chemical vapor deposition (CVD) or physical vapor deposition (PVD).
Metallization:
•Metal layers are deposited to create interconnections between components.
Passivation:
•A protective layer (often silicon dioxide) is deposited to protect the circuit from environmental factors.
Contact and Via Formation:
•Openings (contacts and vias) are created in the layers to connect different levels of the circuit.
Packaging:
•Individual chips are separated from the wafer (dicing).
•Chips are mounted on a package (e.g., plastic, ceramic) and connected to external pins.
137