Rayat Shikshan Sanstha’s
KARMAVEER BHAURAO PATIL
POLYTECHNIC,
SATARA
Number System &
Codes
Department Of Electronics And Telecommunication Engineering
Digital Techniques
EJ3I Subject Code: 22320 Second Year EJ
Amit Nevase
Lecturer,
Department of Electronics & Telecommunication Engineering,
Karmaveer Bhaurao Patil Polytechnic, Satara
9/10/2018 Amit Nevase 2
Programme Educational Objectives (PEOs)
PEO 1. Provide socially responsible, environment friendly
solutions to Electronics and Telecommunication
engineering related broad-based problems adapting
professional ethics.
PEO 2. Adapt state-of-the-art Electronics and
Telecommunication engineering broad-based technologies
to work in multi-disciplinary work environments.
PEO 3. Solve broad-based problems individually and as a
team member communicating effectively in the world of
work.
9/10/2018 Amit Nevase 3
Programme Outcomes (POs)
PO 1. Basic knowledge: Apply knowledge of basic mathematics, sciences and basic
engineering to solve the broad-based Electronics and Telecommunication engineering
problems.
PO 2. Discipline knowledge: Apply Electronics and Telecommunication engineering
knowledge to solve broad-based Electronics and Telecommunications engineering
related problems.
PO 3. Experiments and practice: Plan to perform experiments and practices to use
the results to solve broad-based Electronics and Telecommunication engineering
problems.
PO 4. Engineering tools: Apply relevant Electronics and Telecommunications
technologies and tools with an understanding of the limitations.
PO 5. The engineer and society: Assess societal, health, safety, legal and cultural
issues and the consequent responsibilities relevant to practice in field of Electronics
and Telecommunication engineering.
9/10/2018 Amit Nevase 4
Programme Outcomes (POs)
PO 6. Environment and sustainability: Apply Electronics and
Telecommunication engineering solutions also for sustainable development
practices in societal and environmental contexts.
PO 7. Ethics: Apply ethical principles for commitment to professional ethics,
responsibilities and norms of the practice also in the field of Electronics and
Telecommunication engineering.
PO 8. Individual and team work: Function effectively as a leader and team
member in diverse/ multidisciplinary teams.
PO 9. Communication: Communicate effectively in oral and written form.
PO 10. Life-long learning: Engage in independent and life-long learning
activities in the context of technological changes also in the Electronics and
Telecommunication engineering and allied industry.
9/10/2018 Amit Nevase 5
Programme Specific Outcomes (PSOs)
PSO 1. Electronics and Telecommunication
Systems: Maintain various types of Electronics
and Telecommunication systems.
PSO 2. EDA Tools Usage: Use EDA tools to
develop simple Electronics and
Telecommunication engineering related circuits.
9/10/2018 Amit Nevase 6
Course Outcomes
Use number system and codes for interpreting working
of Digital System.
Use Boolean Expressions to realize the logic circuits.
Build simple combinational circuits.
Build simple sequential circuits.
Test data converters and PLDs in digital electronics
systems.
9/10/2018 Amit Nevase 7
Teaching & Examination Scheme
Total
Cred Examination Scheme
Teaching
its
Scheme
(L+T Theory Marks Practical Marks
+P)
L T P C ESE PA Total ESE PA Total
Pap
er
Hrs.
Max Min Max Min Max Min Max Min Max Min Max Min
04 -- 02 06
3 70 28 30 00 100 40 25# 10 25 10 50 20
9/10/2018 Amit Nevase 8
Passing Criterion for Theory Course
Each Theory course consists of 2 components, ESE (End Semester
Examination) and PA (Progressive Assessment)
The passing criterion for each theory course is obtaining minimum
40% of marks allotted to ESE & PA component together. [i.e. for total
marks of ESE (70 marks) + PA(30 marks) together = (Total 70+30 =100),
obtaining minimum 40 marks are mandatory for passing the Theory
course.]
To qualify for above condition (i), obtaining minimum 40% of marks
allotted to ESE component is mandatory. [i.e. for total marks of ESE =
70, obtaining minimum 28 marks are mandatory. For passing ESE
component)
9/10/2018 Amit Nevase 9
Specification table for Question Paper
Distribution of Theory Marks
Unit Teaching
Unit title
No. Hours
Total
R Level U Level A Level
Marks
I Number System and Codes 06 2 2 4 08
II Logic Gates and Logic Families 10 4 4 4 12
III Combinational Logic Circuits 16 4 6 8 18
IV Sequential Logic Circuits 16 4 6 8 18
V Data Converters and PLDs 16 4 4 6 14
Total 64 18 22 30 70
Legends: R=Remember, U=Understand, A = Apply and above
9/10/2018 Amit Nevase 10
Unit I – Number System and Codes
Number System: Base or radix of number systems,
Binary, Octal, Decimal and Hexadecimal number system.
Binary arithmetic: Addition, Subtraction, Multiplication,
Division.
Subtraction using 1’s complement and 2’s complement
Codes: BCD, Gray Code, Excess-3, ASCII code
BCD Arithmetic: BCD Addition
9/10/2018 Amit Nevase 11
Unit II – Logic Gates & Logic Families
Logic Gates: Symbol, diode/transistor switch circuit and logical
expression, truth table of basic gates (AND, OR, NOT), Universal
gates (NAND, NOR) and special purpose gates (Ex-OR, Ex-NOR),
Tristate Logic.
Boolean Algebra: Laws of Boolean algebra, Duality Theorem,
De-Morgan’s Theorem
Logic Families: Characteristics of Logic families: Noise Margin,
Power Dissipation, Figure of merit, Fan in and Fan out, Speed of
operation, Comparison TTL, CMOS, Types of TTL NAND gate.
9/10/2018 Amit Nevase 12
Unit III – Combinational Logic Circuits
Standard Boolean representation: Sum of Product (SOP) &
Product of Sum (POS), Maxterm and Minterm , Conversion
between SOP and POS forms, realization using NAND/NOR gates.
K-map reduction technique for the Boolean expression:
Minimization of Boolean functions up to 4 variables (SOP & POS
form)
Design of Airthmetic circuits and code converter using K-map:
Half and Full Adder, Half and Full Subtractor, Gray to Binary and
Binary to Gray Code Converter (up to 4 bit).
9/10/2018 Amit Nevase 13
Unit III – Combinational Logic Circuits
Airthmetic Circuits: (IC 7483) Adder & Subtractor, BCD Adder
Encoder/Decoder: Basics of Encoder, decoder, comparison, (IC
7447) BCD to 7- Segment decoder/driver.
Multiplexer and Demultiplexer: Working, truth table and
applications of Multiplexers and Demultiplexers, MUX tree, IC
74151 as MUX, DEMUX tree, DEMUX as decoder, IC 74155 as
DEMUX
Buffer: Tristate logic, Unidirectional and Bidirectional buffer (IC
74LS244 and IC 74LS245)
9/10/2018 Amit Nevase 14
Unit IV – Sequential Logic Circuit
Basic Memory Cell: RS Latch- using NAND & NOR.
Triggering Methods: Edge Trigger & Level Trigger.
SR Flip Flops: SR Flip Flop, Clocked SR FF with preset & clear,
Drawbacks of SR FF
JK Flip Flops: Clocked JK FF with preset & clear, Race around
condition in JK FF, Master Slave JK FF, D and T type Flip Flop,
Excitation Tables of Flip Flops, Block schematic and function table
of IC 7474, IC 7475.
9/10/2018 Amit Nevase 15
Unit IV – Sequential Logic Circuit
Shift Register: Logic diagram of 4 bit shift registers - SISO, SIPO,
PIPO, PISO, 4 Bit Universal Shift Registers.
Counters: Asynchronous Counter: 4 bit Ripple Counter, 4 Bit
Up/Down Counter, Modulus of counter, Synchronous Counter:
Design of 4 bit Synchronous up/down counter. Decade Counter:
Block schematic of IC 7490, IC 7490 as MOD-N Counter, Ring
Counter and Twisted Ring Counter
9/10/2018 Amit Nevase 16
Unit V – Data Converters and PLDs
Data Converters: DAC: Types, weighted resistor circuit and R-2R
Ladder circuit, DAC IC 0808 specifications, ADC: Block diagram,
types and working of Dual Slope ADC, SAR ADC, ADC IC
0808/0809 specification
Memory: RAM and ROM basic building blocks, read and write
operation, types of semiconductor memories.
PLD: Basic building blocks and types of PLDs, PLA, PAL, GAL.
CPLD: Basic building blocks and functionality.
9/10/2018 Amit Nevase 17
Unit-I
Number System and
Codes
9/10/2018 Amit Nevase 18
Unit Outcomes
Convert the given number into the specified number
system.
Perform the binary airthmetic operation on the given
binary numbers.
Convert the given coded number into other specified
code.
Add the given two decimal numbers using BCD code.
9/10/2018 Amit Nevase 19
Analog Vs Digital
Analog Signal Digital Signal
• Continuous • Discrete
• Infinite range of values • Finite range of values (2)
• More exact values, but • Not as exact as analog, but
more difficult to work with easier to work with
Example:
A digital thermostat in a room displays a temperature of 72. An analog
thermometer measures the room temperature at 72.482. The analog value is
continuous and more accurate, but the digital value is more than adequate for
the application and significantly easier to process electronically.
9/10/2018 Amit Nevase 20
Example of Analog Vs Digital System
Digital
advantages:
Battery life
Programmability
Accuracy
9/10/2018 Amit Nevase 21
The World is Analog
The world we live in is analog.
We are analog.
Any inputs we can perceive are analog.
For example,
– sounds are analog signals; they are continuous time and continuous
value.
– Our ears listen to analog signals and we speak with analog signals.
– Images, pictures, and video are all analog at the source and our eyes are
analog sensors.
– Measuring our heartbeat, tracking our activity, all requires processing
analog sensor information.
9/10/2018 Amit Nevase 22
Examples of Analog Signal
An analog signal can be any time-varying signal.
Minimum and maximum values can be either positive or negative.
They can be periodic (repeating) or non-periodic.
Sine waves and square waves are two common analog signals.
Note that this square wave is not a digital signal because its minimum value is
negative.
Video and Audio
0 volts
9/10/2018 Sine Wave Square Wave
Amit Nevase Random-Periodic 23
(not digital)
Parts of Analog Signal
Period
(T)
Frequency:
Amplitude
(peak) 1
F Hz
Amplitude T
(peak-to-peak)
9/10/2018 Amit Nevase 24
Pros and Cons Analog Signal
Advantages
Major advantages of the Analog signal is infinite amount of data.
Density is much higher.
Easy processing.
Disadvantages
Unwanted noise in recording.
If we transmit data at long distance then unwanted disturbance is
there.
Generation loss is also a big con of analog signals.
9/10/2018 Amit Nevase 25
Logic Levels
Before examining digital signals, we must define logic levels. A logic
level is a voltage level that represents a defined digital state.
Logic HIGH: The higher of two voltages, typically 5 volts
Logic LOW: The lower of two voltages, typically 0 volts
5.0 v
Logic High
Logic Level Voltage True/False On/Off 0/1
2.0 v HIGH 5 volts True On 1
Invalid LOW 0 volts False Off 0
Logic
0.8 v Level
0.0 v Logic Low
9/10/2018 Amit Nevase 26
Examples of Digital Signal
Digital signal are commonly referred to as square waves or clock
signals.
Their minimum value must be 0 volts, and their maximum value
must be 5 volts.
They can be periodic (repeating) or non-periodic.
The time the signal is high (tH) can vary anywhere from 1% of the
period to 99% of the period.
Text and Integers.
5 volts
0 volts
9/10/2018 Amit Nevase 27
Parts of Digital Signal
Amplitude:
For digital signals, this will ALWAYS be Falling Edge
5 volts.
Period:
Amplitude
The time it takes for a periodic signal to
repeat. (seconds) Time Time
High Low
Frequency: (tH) (tL)
A measure of the number of
occurrences of the signal per second.
(Hertz, Hz)
Rising Edge
Time High (tH):
Period (T)
The time the signal is at 5 v.
Time Low (tL):
The time the signal is at 0 v. Frequency:
Duty Cycle: 1 tH
The ratio of tH to the total period (T). F Hz DutyCycle 100%
T T
Rising Edge:
A 0-to-1 transition of the signal.
Falling Edge:
A 1-to-0 transition of the signal.
9/10/2018 Amit Nevase 28
Pros and Cons Digital Signal
Advantages
Because of their digital nature they can travel faster
in over digital lines.
Ability to transfer more data as compared to analog.
Disadvantages
Greater bandwidth is essential.
Systems and processing is more complex.
9/10/2018 Amit Nevase 29
Example of using digital over analog:
Noisy channel
Noisy channel
Digital systems are less sensitive to noise
As long as 0 is distinguishable from 1
9/10/2018 Amit Nevase 30
Analog Vs Digital
Analog system
The physical quantities or signals may vary
continuously over a specified range.
Digital system
The physical quantities or signals can assume only
discrete values.
Greater accuracy
9/10/2018 Amit Nevase 31
Analog Vs Digital
X(t) X(t)
t t
Analog signal Digital signal
9/10/2018 Amit Nevase 32
Advantages of Digital System over Analog System
Digital Systems are easier to design
Information storage is easy
Accuracy & Precision are greater
Digital systems are more versatile
Digital circuits are less affected by noise
More digital circuitry can be fabricated on IC chips
Reliability is more
9/10/2018 Amit Nevase 33
What is Signal?
A signal is a physical quantity (sound, light, voltage, current) that
carries information
– The power cable supplies power but no information (not a
signal)
– A USB cable carries information (files)
Examples of quantities used as digital information signals
– Voltage: 5V (logic 1), 0V (logic 0) in digital circuits
– Magnetic field orientation in magnetic hard disks
– Pits and lands on the CD surface reflect the light from the
laser differently, and that difference is encoded as binary data
9/10/2018 Amit Nevase 34
Unit I – Number System and Codes
Number System: Base or radix of number systems,
Binary, Octal, Decimal and Hexadecimal number system.
Binary arithmetic: Addition, Subtraction, Multiplication,
Division.
Subtraction using 1’s complement and 2’s complement
Codes: BCD, Gray Code, Excess-3, ASCII code
BCD Arithmetic: BCD Addition
9/10/2018 Amit Nevase 35
Number System
A number system defines a set of values used to
represent quantity.
9/10/2018 Amit Nevase 36
Different Number Systems
Decimal Number System
- Base/Radix 10
Binary Number System
- Base/Radix 2
Octal Number System
- Base/Radix 8
Hexadecimal Number System
9/10/2018 - Base/Radix 16 Amit Nevase 37
Unit I – Number System and Codes
Number System: Base or radix of number systems,
Binary, Octal, Hexadecimal and Decimal number
system.
Binary arithmetic: Addition, Subtraction, Multiplication,
Division.
Subtraction using 1’s complement and 2’s complement
Codes: BCD, Gray Code, Excess-3, ASCII code
BCD Arithmetic: BCD Addition
9/10/2018 Amit Nevase 38
Decimal Number System
Decimal number system contains ten unique symbols
0,1,2,3,4,5,6,7,8 and 9
Since counting in decimal involves ten symbols, we can
say that its base or radix is ten.
It is a positional weighted system
9/10/2018 Amit Nevase 39
Decimal Number System
In this system, any number (integer, fraction or
mixed) of any magnitude can be represented by
the use of these ten symbols only
Each symbols in the number is called a “Digit”
9/10/2018 Amit Nevase 40
Decimal Number System
Structure:
MSD LSD
Decimal No. ...... d 3 d2 d1 d 0 . d 1 d 2 ....
Positional Weights 103 102 101 100 101 102
Decimal Point
9/10/2018 Amit Nevase 41
Decimal Number System
MSD: The leftmost digit in any number representation,
which has the greatest positional weight out of all the
digits present in that number is called the “Most
Significant Digit” (MSD)
LSD: The rightmost digit in any number representation,
which has the least positional weight out of all the digits
present in that number is called the “Least Significant
Digit” (LSD)
9/10/2018 Amit Nevase 42
Decimal Number System
Examples
1214
1897
9875.54
9/10/2018 Amit Nevase 43
Unit I – Number System and Codes
Number System: Base or radix of number systems,
Hexadecimal, Octal, Decimal and Binary number
system.
Binary arithmetic: Addition, Subtraction, Multiplication,
Division.
Subtraction using 1’s complement and 2’s complement
Codes: BCD, Gray Code, Excess-3, ASCII code
BCD Arithmetic: BCD Addition
9/10/2018 Amit Nevase 44
Binary Number System
Binary number system is a positional weighted
system
It contains two unique symbols 0 and 1
Since counting in binary involves two symbols, we
can say that its base or radix is two.
9/10/2018 Amit Nevase 45
Binary Number System
A binary digit is called a “Bit”
A binary number consists of a sequence of
bits, each of which is either a 0 or a 1.
The binary point separates the integer and
fraction parts
9/10/2018 Amit Nevase 46
Binary Number System
Structure:
MSB LSB
Binary No. ...... b3 b2 b1 b0 . b 1 b 2 ....
Positional Weights 3 2 1 0 1 2
2 2 2 2 2 2
9/10/2018 Amit Nevase
Binary Point 47
Binary Number System
MSB: The leftmost bit in a given binary number
with the highest positional weight is called the
“Most Significant Bit” (MSB)
LSB: The rightmost bit in a given binary number
with the lowest positional weight is called the
“Least Significant Bit” (LSB)
9/10/2018 Amit Nevase 48
Binary Number System
Decimal No. Binary No. Decimal No. Binary No.
0 0000 8 1000
1 0001 9 1001
2 0010 10 1010
3 0011 11 1011
4 0100 12 1100
5 0101 13 1101
6 0110 14 1110
7 0111 15 1111
9/10/2018 Amit Nevase 49
Terms related to Binary Numbers
BIT: The binary digits (0 and 1) are called bits.
- Single unit in binary digit is called “Bit”
- Example 1
9/10/2018 Amit Nevase 50
Terms related to Binary Numbers
NIBBLE: A nibble is a combination of 4 binary
bits.
Examples, 1110
0000
1001
0101
9/10/2018 Amit Nevase 51
Terms related to Binary Numbers
BYTE: A byte is a combination of 8 binary bits.
The number of distinct values represented by a byte is 256
ranging from 0000 0000 to 1111 1111.
b 7 b 6 b5 b 4 b3 b 2 b1 b 0
Higher order Lower order
nibble nibble
MSB LSB
9/10/2018 Amit Nevase 52
Terms related to Binary Numbers
WORD: A word is a combination of 16 binary
bits. Hence it consists of two bytes.
b15 b14 b13 b12 b11 b10 b9 b8 b7 b 6 b5 b 4 b3 b 2 b1 b 0
Higher order byte Lower order byte
MSB LSB
9/10/2018 Amit Nevase 53
Terms related to Binary Numbers
DOUBLE WORD: A double word is exactly what
its name implies, two words.
-It is a combination of 32 binary bits.
9/10/2018 Amit Nevase 54
Unit I – Number System and Codes
Number System: Base or radix of number systems,
Binary, Hexadecimal, Decimal and Octal number
system.
Binary arithmetic: Addition, Subtraction, Multiplication,
Division.
Subtraction using 1’s complement and 2’s complement
Codes: BCD, Gray Code, Excess-3, ASCII code
BCD Arithmetic: BCD Addition
9/10/2018 Amit Nevase 55
Octal Number System
Octal number system is a positional weighted
system
It contains eight unique symbols 0,1,2,3,4,5,6 and
7
Since counting in octal involves eight symbols, we
can say that its base or radix is eight.
9/10/2018 Amit Nevase 56
Octal Number System
The largest value of a digit in the octal system
will be 7.
That means the octal number higher than 7 will
not be 8, instead of that it will be 10.
9/10/2018 Amit Nevase 57
Octal Number System
Structure:
MSD LSD
Octal No. ...... O3 O2 O1 O 0 . O 1 O 2 ....
Positional Weights 83
8 2
8 1
8 0
81 82
9/10/2018 Amit Nevase
Radix Point 58
Octal Number System
Since its base 8 23 , every 3 bit group of binary
can be represented by an octal digit.
An octal number is thus 1/3rd the length of the
corresponding binary number
9/10/2018 Amit Nevase 59
Octal Number System
Decimal No. Binary No. Octal No.
0 0000 0
1 0001 1
2 0010 2
3 0011 3
4 0100 4
5 0101 5
6 0110 6
7 0111 7
8 1000 10
9 1001 11
10 1010 12
11 1011 13
12 1100 14
9/10/2018 13 1101
Amit Nevase 15 60
Unit I – Number System and Codes
Number System: Base or radix of number systems,
Binary, Octal, Decimal and Hexadecimal number
system.
Binary arithmetic: Addition, Subtraction, Multiplication,
Division.
Subtraction using 1’s complement and 2’s complement
Codes: BCD, Gray Code, Excess-3, ASCII code
BCD Arithmetic: BCD Addition
9/10/2018 Amit Nevase 61
Hexadecimal Number System (HEX)
Binary numbers are long. These numbers are fine
for machines but are too lengthy to be handled by
human beings. So there is a need to represent the
binary numbers concisely.
One number system developed with this objective
is the hexadecimal number system (or Hex)
9/10/2018 Amit Nevase 62
Hexadecimal Number System (HEX)
Hex number system is a positional weighted
system
It contains sixteen unique symbols
0,1,2,3,4,5,6,7,8,9,A,B,C,D,E and F.
Since counting in hex involves sixteen symbols, we
can say that its base or radix is sixteen.
9/10/2018 Amit Nevase 63
Hexadecimal Number System (HEX)
Structure:
MSD LSD
Hex No. ...... H 3 H2 H1 H 0 . H 1 H 2 ....
Positional Weights 163 162 161 160 161 162
Radix Point
9/10/2018 Amit Nevase 64
Hexadecimal Number System (HEX)
Since its base16 24, every 4 bit group of binary can
be represented by an hex digit.
An hex number is thus 1/4th the length of the
corresponding binary number
The hex system is particularly useful for human
communications with computer
9/10/2018 Amit Nevase 65
Hexadecimal Number System (HEX)
Decimal No. Binary No. Hex No. Decimal No. Binary No. Hex No.
0 0000 0 8 1000 8
1 0001 1 9 1001 9
2 0010 2 10 1010 A
3 0011 3 11 1011 B
4 0100 4 12 1100 C
5 0101 5 13 1101 D
6 0110 6 14 1110 E
7 0111 7 15 1111 F
9/10/2018 Amit Nevase 66
Conversion Among Bases
Possibilities
Decimal Octal
Binary
Hexadecimal
9/10/2018 Amit Nevase 67
Conversion from Decimal Number to Binary Number
Decimal Octal
Binary
Hexadecimal
9/10/2018 Amit Nevase 68
Conversion of Decimal number into Binary number
(Integer Number)
Procedure:
1. Divide the decimal no by the base 2, noting the
remainder.
2. Continue to divide the quotient by 2 until there is
nothing left, keeping the track of the remainders
from each step.
3. List the remainder values in reverse order to find
the number’s binary equivalent
9/10/2018 Amit Nevase 69
Example: Convert 105 decimal number in to it’s
equivalent binary number.
9/10/2018 Amit Nevase 70
Example: Convert 105 decimal number in to it’s
equivalent binary number.
2 105
9/10/2018 Amit Nevase 71
Example: Convert 105 decimal number in to it’s
equivalent binary number.
2 105
2 52 1
9/10/2018 Amit Nevase 72
Example: Convert 105 decimal number in to it’s
equivalent binary number.
2 105
2 52 1
2 26 0
9/10/2018 Amit Nevase 73
Example: Convert 105 decimal number in to it’s
equivalent binary number.
2 105
2 52 1
2 26 0
2 13 0
9/10/2018 Amit Nevase 74
Example: Convert 105 decimal number in to it’s
equivalent binary number.
2 105
2 52 1
2 26 0
2 13 0
2 6 1
9/10/2018 Amit Nevase 75
Example: Convert 105 decimal number in to it’s
equivalent binary number.
2 105
2 52 1
2 26 0
2 13 0
2 6 1
2 3 0
9/10/2018 Amit Nevase 76
Example: Convert 105 decimal number in to it’s
equivalent binary number.
2 105
2 52 1
2 26 0
2 13 0
2 6 1
2 3 0
2 1 1
9/10/2018 Amit Nevase 77
Example: Convert 105 decimal number in to it’s
equivalent binary number.
2 105
2 52 1
2 26 0
2 13 0
2 6 1
2 3 0
2 1 1
0 1
9/10/2018 Amit Nevase 78
Example: Convert 105 decimal number in to it’s
equivalent binary number.
2 105
2 1 LSB
52
2 26 0
2 13 0
2 6 1
(105)10 (1101001)2
2 3 0
2 1 1
0 1 MSB
9/10/2018 Amit Nevase 79
Conversion of Decimal number into Binary number
(Fractional Number)
Procedure:
1. Multiply the given fractional number by base 2.
2. Record the carry generated in this multiplication as
MSB.
3. Multiply only the fractional number of the product in
step 2 by 2 and record the carry as the next bit to MSB.
4. Repeat the steps 2 and 3 up to 5 bits. The last carry will
represent the LSB of equivalent binary number
9/10/2018 Amit Nevase 80
Example: Convert 0.42 decimal number in to it’s
equivalent binary number.
9/10/2018 Amit Nevase 81
Example: Convert 0.42 decimal number in to it’s
equivalent binary number.
0.42 X 2 = 0.84 0
9/10/2018 Amit Nevase 82
Example: Convert 0.42 decimal number in to it’s
equivalent binary number.
0.42 X 2 = 0.84 0
0.84 X 2 = 1.68 1
9/10/2018 Amit Nevase 83
Example: Convert 0.42 decimal number in to it’s
equivalent binary number.
0.42 X 2 = 0.84 0
0.84 X 2 = 1.68 1
0.68 X 2 = 1.36 1
9/10/2018 Amit Nevase 84
Example: Convert 0.42 decimal number in to it’s
equivalent binary number.
0.42 X 2 = 0.84 0
0.84 X 2 = 1.68 1
0.68 X 2 = 1.36 1
0.36 X 2 = 0.72 0
9/10/2018 Amit Nevase 85
Example: Convert 0.42 decimal number in to it’s
equivalent binary number.
0.42 X 2 = 0.84 0
0.84 X 2 = 1.68 1
0.68 X 2 = 1.36 1
0.36 X 2 = 0.72 0
0.72 X 2 = 1.44 1
9/10/2018 Amit Nevase 86
Example: Convert 0.42 decimal number in to it’s
equivalent binary number.
0.42 X 2 = 0.84 0 MSB
0.84 X 2 = 1.68 1
0.68 X 2 = 1.36 1
0.36 X 2 = 0.72 0
(0.42)10 (0.01101)2
0.72 X 2 = 1.44 1 LSB
9/10/2018 Amit Nevase 87
Exercise
• Convert following Decimal Numbers in to its
equivalent Binary Number:
1. (1248.56)10 = ( ? )2
2. (8957.75)10 = ( ? )2
3. (420.6)10 = ( ? )2
4. (8476.47)10 = ( ? )2
9/10/2018 Amit Nevase 88
Conversion from Decimal Number to Octal Number
Decimal Octal
Binary
Hexadecimal
9/10/2018 Amit Nevase 89
Conversion of Decimal Number into Octal Number
(Integer Number)
Procedure:
1. Divide the decimal no by the base 8, noting the
remainder.
2. Continue to divide the quotient by 8 until there is
nothing left, keeping the track of the remainders
from each step.
3. List the remainder values in reverse order to find
the number’s octal equivalent
9/10/2018 Amit Nevase 90
Example: Convert 204 decimal number in to it’s
equivalent octal number.
9/10/2018 Amit Nevase 91
Example: Convert 204 decimal number in to it’s
equivalent octal number.
8 204
9/10/2018 Amit Nevase 92
Example: Convert 204 decimal number in to it’s
equivalent octal number.
2 5
8 204
8 204
8 25 4 - 16
44
- 40
4
9/10/2018 Amit Nevase 93
Example: Convert 204 decimal number in to it’s
equivalent octal number.
3
8 204
8 25
8 25 4 - 24
8 3 1 1
9/10/2018 Amit Nevase 94
Example: Convert 204 decimal number in to it’s equivalent
octal number.
8 204
8 25 4
8 3 1
0 3
9/10/2018 Amit Nevase 95
Example: Convert 204 decimal number in to it’s equivalent
octal number.
8 204
LSD
8 25 4
8 3 1
0 3 MSD
(204)10 (314)8
9/10/2018 Amit Nevase 96
Conversion of Decimal Number into Octal Number
(Fractional Number)
Procedure:
1. Multiply the given fractional number by base 8.
2. Record the carry generated in this multiplication as
MSD.
3. Multiply only the fractional number of the product in
step 2 by 8 and record the carry as the next bit to MSD.
4. Repeat the steps 2 and 3 up to 5 bits. The last carry will
represent the LSD of equivalent octal number
9/10/2018 Amit Nevase 97
Example: Convert 0.6234 decimal number in to it’s
equivalent Octal number.
9/10/2018 Amit Nevase 98
Example: Convert 0.6234 decimal number in to it’s
equivalent Octal number.
0.6234 X 8 = 4.9872 4
9/10/2018 Amit Nevase 99
Example: Convert 0.6234 decimal number in to it’s
equivalent Octal number.
0.6234 X 8 = 4.9872 4
0.9872 X 8 = 7.8976 7
9/10/2018 Amit Nevase 100
Example: Convert 0.6234 decimal number in to it’s
equivalent Octal number.
0.6234 X 8 = 4.9872 4
0.9872 X 8 = 7.8976 7
0.8976 X 8 = 7.1808 7
9/10/2018 Amit Nevase 101
Example: Convert 0.6234 decimal number in to it’s
equivalent Octal number.
0.6234 X 8 = 4.9872 4
0.9872 X 8 = 7.8976 7
0.8976 X 8 = 7.1808 7
0.1808 X 8 = 1.4464 1
9/10/2018 Amit Nevase 102
Example: Convert 0.6234 decimal number in to it’s
equivalent Octal number.
0.6234 X 8 = 4.9872 4
0.9872 X 8 = 7.8976 7
0.8976 X 8 = 7.1808 7
0.1808 X 8 = 1.4464 1
0.4464 X 8 = 3.5712 3
9/10/2018 Amit Nevase 103
Example: Convert 0.6234 decimal number in to it’s
equivalent Octal number.
0.6234 X 8 = 4.9872 4 MSD
0.9872 X 8 = 7.8976 7
0.8976 X 8 = 7.1808 7
0.1808 X 8 = 1.4464 1
0.4464 X 8 = 3.5712 3 LSD
(0.6234)10 (0.47713)8
9/10/2018 Amit Nevase 104
Exercise
• Convert following Decimal Numbers in to its
equivalent Octal Number:
1. (1248.56)10 = ( ? )8
2. (8957.75)10 = ( ? )8
3. (420.6)10 = ( ? )8
4. (8476.47)10 = ( ? )8
9/10/2018 Amit Nevase 105
Conversion from Decimal Number to Hex Number
Decimal Octal
Binary
Hexadecimal
9/10/2018 Amit Nevase 106
Conversion of Decimal Number into Hexadecimal
Number (Integer Number)
Procedure:
1. Divide the decimal no by the base 16, noting the
remainder.
2. Continue to divide the quotient by 16 until there is
nothing left, keeping the track of the remainders
from each step.
3. List the remainder values in reverse order to find
the number’s hex equivalent
9/10/2018 Amit Nevase 107
Example: Convert 2003 decimal number in to it’s
equivalent Hex number.
9/10/2018 Amit Nevase 108
Example: Convert 2003 decimal number in to it’s
equivalent Hex number.
16 2003
9/10/2018 Amit Nevase 109
Example: Convert 2003 decimal number in to it’s
equivalent Hex number.
1 2 5
16 2003
16 2003
16 125 3 3
- 16
40
- 32
83
- 80
3
9/10/2018 Amit Nevase 110
Example: Convert 2003 decimal number in to it’s
equivalent Hex number.
7
16 2003
16 125
16 125 3 3
- 112
16 7 13 D 13
9/10/2018 Amit Nevase 111
Example: Convert 2003 decimal number in to it’s
equivalent Hex number.
16 2003
16 125 3 3
16 7 13 D
0 7 7
9/10/2018 Amit Nevase 112
Example: Convert 2003 decimal number in to it’s
equivalent Hex number.
16 2003
LSD
16 125 3 3
16 7 13 D
0 7 7 MSD
(2003)10 (7 D3)16
9/10/2018 Amit Nevase 113
Conversion of Decimal Number into Hexadecimal
Number (Fractional Number)
Procedure:
1. Multiply the given fractional number by base 16.
2. Record the carry generated in this multiplication as
MSD.
3. Multiply only the fractional number of the product in
step 2 by 16 and record the carry as the next bit to MSD.
4. Repeat the steps 2 and 3 up to 5 bits. The last carry will
represent the LSD of equivalent hex number
9/10/2018 Amit Nevase 114
Example: Convert 0.122 decimal number in to it’s
equivalent Hex number.
9/10/2018 Amit Nevase 115
Example: Convert 0.122 decimal number in to it’s
equivalent Hex number.
0.122 X 16 = 1.952 1 1
9/10/2018 Amit Nevase 116
Example: Convert 0.122 decimal number in to it’s
equivalent Hex number.
0.122 X 16 = 1.952 1 1
0.952 X 16 = 15.232 15 F
9/10/2018 Amit Nevase 117
Example: Convert 0.122 decimal number in to it’s
equivalent Hex number.
0.122 X 16 = 1.952 1 1
0.952 X 16 = 15.232 15 F
0.232 X 16 = 3.712 3 3
9/10/2018 Amit Nevase 118
Example: Convert 0.122 decimal number in to it’s
equivalent Hex number.
0.122 X 16 = 1.952 1 1
0.952 X 16 = 15.232 15 F
0.232 X 16 = 3.712 3 3
0.712 X 16 = 11.392 11 B
9/10/2018 Amit Nevase 119
Example: Convert 0.122 decimal number in to it’s
equivalent Hex number.
0.122 X 16 = 1.952 1 1
0.952 X 16 = 15.232 15 F
0.232 X 16 = 3.712 3 3
0.712 X 16 = 11.392 11 B
0.392 X 16 = 6.272 6 6
9/10/2018 Amit Nevase 120
Example: Convert 0.122 decimal number in to it’s
equivalent Hex number.
0.122 X 16 = 1.952 1 1 MSD
0.952 X 16 = 15.232 15 F
0.232 X 16 = 3.712 3 3
0.712 X 16 = 11.392 11 B
0.392 X 16 = 6.272 6 6 LSD
(0.122)10 (0.1F3B6)16
9/10/2018 Amit Nevase 121
Exercise
• Convert following Decimal Numbers in to its
equivalent Hex Number:
1. (1248.56)10 = ( ? )16
2. (8957.75)10 = ( ? )16
3. (420.6)10 = ( ? )16
4. (8476.47)10 = ( ? )16
9/10/2018 Amit Nevase 122
Conversion from Binary Number to Decimal Number
Decimal Octal
Binary
Hexadecimal
9/10/2018 Amit Nevase 123
Conversion of Binary Number into Decimal Number
Procedure:
1. Write down the binary number.
2. Write down the weights for different positions.
3. Multiply each bit in the binary number with the
corresponding weight to obtain product numbers
to get the decimal numbers.
4. Add all the product numbers to get the decimal
equivalent
9/10/2018 Amit Nevase 124
Example: Convert 1011.01 binary number in to it’s
equivalent decimal number.
9/10/2018 Amit Nevase 125
Example: Convert 1011.01 binary number in to it’s
equivalent decimal number.
Binary No. 1 0 1 1 . 0 1
9/10/2018 Amit Nevase 126
Example: Convert 1011.01 binary number in to it’s
equivalent decimal number.
Binary No. 1 0 1 1 . 0 1
Positional Weights 3 2 1 0 1 2
2 2 2 2 2 2
9/10/2018 Amit Nevase 127
Example: Convert 1011.01 binary number in to it’s
equivalent decimal number.
Binary No. 1 0 1 1 . 0 1
Positional Weights 3 2 1 0 1 2
2 2 2 2 2 2
(1 23 ) (0 22 ) (1 21 ) (1 20 ).(0 21 ) (1 22 )
9/10/2018 Amit Nevase 128
Example: Convert 1011.01 binary number in to it’s
equivalent decimal number.
Binary No. 1 0 1 1 . 0 1
Positional Weights 3 2 1 0 1 2
2 2 2 2 2 2
(1 23 ) (0 22 ) (1 21 ) (1 20 ).(0 21 ) (1 22 )
= 8 + 0 + 2 + 1 . 0 + 0.25
9/10/2018 Amit Nevase 129
Example: Convert 1011.01 binary number in to it’s
equivalent decimal number.
Binary No. 1 0 1 1 . 0 1
Positional Weights 3 2 1 0 1 2
2 2 2 2 2 2
(1 23 ) (0 22 ) (1 21 ) (1 20 ).(0 21 ) (1 22 )
= 8 + 0 + 2 + 1 . 0 + 0.25
= 11.25
9/10/2018 Amit Nevase 130
Example: Convert 1011.01 binary number in to it’s
equivalent decimal number.
Binary No. 1 0 1 1 . 0 1
Positional Weights 3 2 1 0 1 2
2 2 2 2 2 2
(1 23 ) (0 22 ) (1 21 ) (1 20 ).(0 21 ) (1 22 )
= 8 + 0 + 2 + 1 . 0 + 0.25
= 11.25
(1011.01) 2 (11.25)10
9/10/2018 Amit Nevase 131
Exercise
• Convert following Binary Numbers in to its
equivalent Decimal Number:
1. (1101110.011)2 = ( ? )10
2. (1101.11)2 = ( ? )10
3. (10001.01)2 = ( ? )10
9/10/2018 Amit Nevase 132
Conversion from Octal Number to Decimal Number
Decimal Octal
Binary
Hexadecimal
9/10/2018 Amit Nevase 133
Conversion of Octal Number into Decimal Number
Procedure:
1. Write down the octal number.
2. Write down the weights for different positions.
3. Multiply each bit in the binary number with the
corresponding weight to obtain product numbers
to get the decimal numbers.
4. Add all the product numbers to get the decimal
equivalent
9/10/2018 Amit Nevase 134
Example: Convert 365.24 octal number in to it’s
equivalent decimal number.
9/10/2018 Amit Nevase 135
Example: Convert 365.24 octal number in to it’s
equivalent decimal number.
Octal No. 3 6 5 . 2 4
9/10/2018 Amit Nevase 136
Example: Convert 365.24 octal number in to it’s
equivalent decimal number.
Octal No. 3 6 5 . 2 4
Positional Weights 82 81 80 81 82
9/10/2018 Amit Nevase 137
Example: Convert 365.24 octal number in to it’s
equivalent decimal number.
Octal No. 3 6 5 . 2 4
Positional Weights 82 81 80 81 82
(3 82 ) (6 81 ) (5 80 ).(2 81 ) (4 82 )
9/10/2018 Amit Nevase 138
Example: Convert 365.24 octal number in to it’s equivalent
decimal number.
Octal No. 3 6 5 . 2 4
Positional Weights 82 81 80 81 82
(3 82 ) (6 81 ) (5 80 ).(2 81 ) (4 82 )
= 192 + 48 + 5 . 0.25 +0.0625
9/10/2018 Amit Nevase 139
Example: Convert 365.24 octal number in to it’s
equivalent decimal number.
Octal No. 3 6 5 . 2 4
Positional Weights 82 81 80 81 82
(3 82 ) (6 81 ) (5 80 ).(2 81 ) (4 82 )
= 192 + 48 + 5 . 0.25 +0.0625
= 245.3125
9/10/2018 Amit Nevase 140
Example: Convert 365.24 octal number in to it’s
equivalent decimal number.
Octal No. 3 6 5 . 2 4
Positional Weights 82 81 80 81 82
(3 82 ) (6 81 ) (5 80 ).(2 81 ) (4 82 )
= 192 + 48 + 5 . 0.25 +0.0625
= 245.3125
(365.24)8 (245.3125)10
9/10/2018 Amit Nevase 141
Exercise
• Convert following Octal Numbers in to its
equivalent Decimal Number:
1. (3006.05)8 = ( ? )10
2. (273.56)8 = ( ? )10
3. (6534.04)8 = ( ? )10
9/10/2018 Amit Nevase 142
Conversion from Hex Number to Decimal Number
Decimal Octal
Binary
Hexadecimal
9/10/2018 Amit Nevase 143
Conversion of Hexadecimal Number into Decimal Number
Procedure:
1. Write down the hex number.
2. Write down the weights for different positions.
3. Multiply each bit in the binary number with the
corresponding weight to obtain product numbers
to get the decimal numbers.
4. Add all the product numbers to get the decimal
equivalent
9/10/2018 Amit Nevase 144
Example: Convert 5826 hex number in to it’s equivalent
decimal number.
9/10/2018 Amit Nevase 145
Example: Convert 5826 hex number in to it’s equivalent
decimal number.
Hex No. 5 8 2 6
9/10/2018 Amit Nevase 146
Example: Convert 5826 hex number in to it’s equivalent
decimal number.
Hex No. 5 8 2 6
Positional Weights 163 162 161 160
9/10/2018 Amit Nevase 147
Example: Convert 5826 hex number in to it’s equivalent
decimal number.
Hex No. 5 8 2 6
Positional Weights 163 162 161 160
(5 163 ) (8 162 ) (2 161 ) (6 160 )
9/10/2018 Amit Nevase 148
Example: Convert 5826 hex number in to it’s equivalent
decimal number.
Hex No. 5 8 2 6
Positional Weights 163 162 161 160
(5 163 ) (8 162 ) (2 161 ) (6 160 )
=20480 + 2048 + 32 + 6
9/10/2018 Amit Nevase 149
Example: Convert 5826 hex number in to it’s equivalent
decimal number.
Hex No. 5 8 2 6
Positional Weights 163 162 161 160
(5 163 ) (8 162 ) (2 161 ) (6 160 )
=20480 + 2048 + 32 + 6
= 22566
9/10/2018 Amit Nevase 150
Example: Convert 5826 hex number in to it’s equivalent
decimal number.
Hex No. 5 8 2 6
Positional Weights 163 162 161 160
(5 163 ) (8 162 ) (2 161 ) (6 160 )
=20480 + 2048 + 32 + 6
= 22566
(5826)16 (22566)10
9/10/2018 Amit Nevase 151
Exercise
• Convert following Hexadecimal Numbers in to
its equivalent Decimal Number:
1. (4056)16 = ( ? )10
2. (6B7)16 = ( ? )10
3. (8E47.AB)16 = ( ? )10
9/10/2018 Amit Nevase 152
Conversion from Binary Number to Octal Number
Decimal Octal
Binary
Hexadecimal
9/10/2018 Amit Nevase 153
Conversion of Binary Number into Octal Number
Procedure:
1. Group the binary bits into groups of 3 starting
from LSB.
2. Convert each group into its equivalent decimal.
As the number of bits in each group is
restricted to 3, the decimal number will be
same as octal number
9/10/2018 Amit Nevase 154
Example: Convert 11010010 binary number in to it’s
equivalent octal number.
9/10/2018 Amit Nevase 155
Example: Convert 11010010 binary number in to it’s
equivalent octal number.
0 1 1 0 1 0 0 1 0
9/10/2018 Amit Nevase 156
Example: Convert 11010010 binary number in to it’s
equivalent octal number.
LSB
0 1 1 0 1 0 0 1 0
9/10/2018 Amit Nevase 157
Example: Convert 11010010 binary number in to it’s
equivalent octal number.
0 1 1 0 1 0 0 1 0
3 2 2
9/10/2018 Amit Nevase 158
Example: Convert 11010010 binary number in to it’s
equivalent octal number.
0 1 1 0 1 0 0 1 0
3 2 2
(11010010)2 (322)8
9/10/2018 Amit Nevase 159
Exercise
• Convert following Binary Numbers in to its
equivalent Octal Number:
1. (1101110.011)2 = ( ? )8
2. (1101.11)2 = ( ? )8
3. (10001.01)2 = ( ? )8
9/10/2018 Amit Nevase 160
Conversion from Binary Number to Hexadecimal
Number
Decimal Octal
Binary
Hexadecimal
9/10/2018 Amit Nevase 161
Conversion of Binary Number to Hexadecimal Number
Procedure:
1. Group the binary bits into groups of 4 starting
from LSB.
2. Convert each group into its equivalent decimal.
As the number of bits in each group is
restricted to 4, the decimal number will be
same as hex number
9/10/2018 Amit Nevase 162
Example: Convert 11010010 binary number in to it’s
equivalent hex number.
9/10/2018 Amit Nevase 163
Example: Convert 11010010 binary number in to it’s
equivalent hex number.
LSB
1 1 0 1 0 0 1 0
9/10/2018 Amit Nevase 164
Example: Convert 11010010 binary number in to it’s
equivalent hex number.
LSB
1 1 0 1 0 0 1 0
9/10/2018 Amit Nevase 165
Example: Convert 11010010 binary number in to it’s
equivalent hex number.
1 1 0 1 0 0 1 0
D 2
9/10/2018 Amit Nevase 166
Example: Convert 11010010 binary number in to it’s
equivalent hex number.
1 1 0 1 0 0 1 0
D 2
(11010010)2 (D 2)16
9/10/2018 Amit Nevase 167
Exercise
• Convert following Binary Numbers in to its
equivalent Hexadecimal Number:
1. (1101110.011)2 = ( ? )16
2. (1101.11)2 = ( ? )16
3. (10001.01)2 = ( ? )16
9/10/2018 Amit Nevase 168
Conversion from Octal Number to Binary Number
Decimal Octal
Binary
Hexadecimal
9/10/2018 Amit Nevase 169
Conversion of Octal Number into Binary Number
To get the binary equivalent of the given octal
number we have to convert each octal digit into
its equivalent 3 bit binary number
9/10/2018 Amit Nevase 170
Example: Convert 364 octal number in to it’s equivalent
binary number.
9/10/2018 Amit Nevase 171
Example: Convert 364 octal number in to it’s equivalent
binary number.
3 6 4
9/10/2018 Amit Nevase 172
Example: Convert 364 octal number in to it’s equivalent
binary number.
3 6 4
011 110 100
9/10/2018 Amit Nevase 173
Example: Convert 364 octal number in to it’s equivalent
binary number.
3 6 4
011 110 100
9/10/2018 Amit Nevase 174
Example: Convert 364 octal number in to it’s equivalent
binary number.
3 6 4
011 110 100
(364)8 (011110100) 2
OR
(364)8 (11110100) 2
9/10/2018 Amit Nevase 175
Exercise
• Convert following Octal Numbers in to its
equivalent Binary Number:
1. (3006.05)8 = ( ? )2
2. (273.56)8 = ( ? )2
3. (6534.04)8 = ( ? )2
9/10/2018 Amit Nevase 176
Conversion from Hex Number to Binary Number
Decimal Octal
Binary
Hexadecimal
9/10/2018 Amit Nevase 177
Conversion of Hexadecimal Number into Binary Number
To get the binary equivalent of the given hex
number we have to convert each hex digit into
its equivalent 4 bit binary number
9/10/2018 Amit Nevase 178
Example: Convert AFB2 hex number in to it’s
equivalent binary number.
9/10/2018 Amit Nevase 179
Example: Convert AFB2 hex number in to it’s equivalent
binary number.
A F B 2
9/10/2018 Amit Nevase 180
Example: Convert AFB2 hex number in to it’s equivalent
binary number.
A F B 2
1010 1111 1011 0010
9/10/2018 Amit Nevase 181
Example: Convert AFB2 hex number in to it’s equivalent
binary number.
A F B 2
1010 1111 1011 0010
(AFB2)16 (1010111110110010)2
9/10/2018 Amit Nevase 182
Exercise
• Convert following Hexadecimal Numbers in to
its equivalent Binary Number:
1. (4056)16 = ( ? )2
2. (6B7)16 = ( ? )2
3. (8E47.AB)16 = ( ? )2
9/10/2018 Amit Nevase 183
Conversion from Octal Number to Hex Number
Decimal Octal
Binary
Hexadecimal
9/10/2018 Amit Nevase 184
Conversion of Octal Number into Hexadecimal Number
To get hex equivalent number of given octal
number, first we have to convert octal number
into its 3 bit binary equivalent and then convert
binary number into its hex equivalent.
9/10/2018 Amit Nevase 185
Example: Convert 364 octal number in to it’s
equivalent hex number.
9/10/2018 Amit Nevase 186
Example: Convert 364 octal number in to it’s equivalent
hex number.
3 6 4 Octal Number
9/10/2018 Amit Nevase 187
Example: Convert 364 octal number in to it’s equivalent
hex number.
3 6 4 Octal Number
011 110 100 Binary Number
9/10/2018 Amit Nevase 188
Example: Convert 364 octal number in to it’s equivalent
hex number.
3 6 4 Octal Number
011 110 100 Binary Number
011110100 Binary Number
9/10/2018 Amit Nevase 189
Example: Convert 364 octal number in to it’s equivalent
hex number.
3 6 4 Octal Number
011 110 100 Binary Number
011110100 Binary Number
0 F 4 Hex Number
9/10/2018 Amit Nevase 190
Example: Convert 364 octal number in to it’s equivalent
hex number.
3 6 4 Octal Number
011 110 100 Binary Number
011110100 Binary Number
0 F 4 Hex Number
(364)8 (F 4)16
9/10/2018 Amit Nevase 191
Exercise
• Convert following Octal Numbers in to its
equivalent Hex Number:
1. (3006.05)8 = ( ? )16
2. (273.56)8 = ( ? )16
3. (6534.04)8 = ( ? )16
9/10/2018 Amit Nevase 192
Conversion from Hex Number to Octal Number
Decimal Octal
Binary
Hexadecimal
9/10/2018 Amit Nevase 193
Conversion of Hexadecimal Number into Octal Number
To get octal equivalent number of given hex
number, first we have to convert hex number into
its 4 bit binary equivalent and then convert
binary number into its octal equivalent.
9/10/2018 Amit Nevase 194
Example: Convert 4CA hex number in to it’s equivalent
octal number.
9/10/2018 Amit Nevase 195
Example: Convert 4CA hex number in to it’s equivalent
octal number.
4 C A Hex Number
9/10/2018 Amit Nevase 196
Example: Convert 4CA hex number in to it’s equivalent
octal number.
4 C A Hex Number
0100 1100 1010 Binary Number
9/10/2018 Amit Nevase 197
Example: Convert 4CA hex number in to it’s equivalent
octal number.
4 C A Hex Number
0100 1100 1010 Binary Number
010011001010 Binary Number
9/10/2018 Amit Nevase 198
Example: Convert 4CA hex number in to it’s equivalent
octal number.
4 C A Hex Number
0100 1100 1010 Binary Number
010011001010 Binary Number
2 3 1 2 Octal Number
9/10/2018 Amit Nevase 199
Example: Convert 4CA hex number in to it’s equivalent
octal number.
4 C A Hex Number
0100 1100 1010 Binary Number
010011001010 Binary Number
2 3 1 2 Octal Number
(4CA)16 (2312)8
9/10/2018 Amit Nevase 200
Exercise
• Convert following Hexadecimal Numbers in to
its equivalent Octal Number:
1. (4056)16 = ( ? )8
2. (6B7)16 = ( ? )8
3. (8E47.AB)16 = ( ? )8
9/10/2018 Amit Nevase 201
Unit I – Number System and Codes
Number System: Base or radix of number systems,
Binary, Octal, Decimal and Hexadecimal number system.
Binary arithmetic: Addition, Subtraction, Multiplication,
Division.
Subtraction using 1’s complement and 2’s complement
Codes: BCD, Gray Code, Excess-3, ASCII code
BCD Arithmetic: BCD Addition
9/10/2018 Amit Nevase 202
Binary Addition
Following are the four most basic cases for binary
addition
0 + 0 = 0
0 + 1 = 1
1 + 0 = 1
1 + 1 = 10 i.e. 0 with carry 1
9/10/2018 Amit Nevase 203
Binary Addition
Example: Perform (10111)2 (11001)2
9/10/2018 Amit Nevase 204
Binary Addition
Example: Perform (10111)2 (11001)2
1 0 1 1 1
1 1 0 0 1
9/10/2018 Amit Nevase 205
Binary Addition
Example: Perform (10111)2 (11001)2
1 1
1 0 1 1 1
1 1 0 0 1
0 0
9/10/2018 Amit Nevase 206
Binary Addition
Example: Perform (10111)2 (11001)2
1 1
1 0 1 1 1
1 1 0 0 1
0 0 0
9/10/2018 Amit Nevase 207
Binary Addition
Example: Perform (10111)2 (11001)2
1 1
1 0 1 1 1
1 1 0 0 1
0 0 0 0
9/10/2018 Amit Nevase 208
Binary Addition
Example: Perform (10111)2 (11001)2
1 0 1 1 1
1 1 0 0 1
1 1 0 0 0 0
9/10/2018 Amit Nevase 209
Binary Addition
Example: Perform (10111)2 (11001)2
1 1 1 1
1 0 1 1 1
1 1 0 0 1
1 1 0 0 0 0
(10111)2 (11001)2 (110000)2
9/10/2018 Amit Nevase 210
Binary Addition
Example: Perform (1101.101)2 (111.011)2
9/10/2018 Amit Nevase 211
Binary Addition
Example: Perform (1101.101)2 (111.011)2
1 1 1 1 1 1
1 1 0 1 . 1 0 1
1 1 1 . 0 1 1
1 0 1 0 1 . 0 0 0
(1101.101)2 (111.011)2 (10101.000) 2
9/10/2018 Amit Nevase 212
Exercise
• Perform Binary Addition of following:
1. (11011)2+(1101)2
2. (1011)2+(1101)2+(1001)2+(1111)2
3. (1010.11)2+(1101.10)2+(1001.11)2+(1111.11)2
4. (10111.101)2+(110111.01)2
9/10/2018 Amit Nevase 213
Unit I – Number System and Codes
Number System: Base or radix of number systems,
Binary, Octal, Decimal and Hexadecimal number system.
Binary arithmetic: Addition, Subtraction, Multiplication,
Division.
Subtraction using 1’s complement and 2’s complement
Codes: BCD, Gray Code, Excess-3, ASCII code
BCD Arithmetic: BCD Addition
9/10/2018 Amit Nevase 214
Binary Subtraction
Following are the four most basic cases for binary
subtraction
Subtraction Borrow
0 - 0 = 0 0
0 - 1 = 1 1
1 - 0 = 1 0
1 - 1 = 0 0
9/10/2018 Amit Nevase 215
Binary Subtraction
Example: Perform (1010.010)2 (111.111)2
9/10/2018 Amit Nevase 216
Binary Subtraction
Example: Perform (1010.010)2 (111.111)2
1 1 1 10
0 10 0 10 10 0 10
1 0 1 0 . 0 1 0
1 1 1 . 1 1 1
0 0 1 0 . 0 1 1
(1010.010)2 (111.111)
9/10/2018
2 (0010.011) 2
Amit Nevase 217
Exercise
• Perform Binary Subtraction of following:
1. (1011)2- (101)2
2. (1100.10)2- (111.01)2
3. (10110)2- (1011)2
4. (10001.01)2- (1111.11)2
9/10/2018 Amit Nevase 218
Unit I – Number System and Codes
Number System: Base or radix of number systems,
Binary, Octal, Decimal and Hexadecimal number system.
Binary arithmetic: Addition, Subtraction,
Multiplication, Division.
Subtraction using 1’s complement and 2’s complement
Codes: BCD, Gray Code, Excess-3, ASCII code
BCD Arithmetic: BCD Addition
9/10/2018 Amit Nevase 219
Binary Multiplication
Following are the four most basic cases for binary
multiplication
0 X 0 = 0
0 X 1 = 0
1 X 0 = 0
1 X 1 = 1
9/10/2018 Amit Nevase 220
Binary Multiplication
Example: Perform (1001)2 (1000)2
9/10/2018 Amit Nevase 221
Binary Multiplication
Example: Perform (1001)2 (1000)2
1 0 0 1
1 0 0 0
0 0 0 0
0 0 0 0 x
0 0 0 0 x x
1 0 0 1 x x x
1 0 0 1 0 0 0
(1001)2 (1000)2 (1001000)2
9/10/2018 Amit Nevase 222
Exercise
• Perform Binary Multiplication of following:
1. (1101)2 X (101)2
2. (1101.11)2 X (101.1)2
3. (11001)2 X (10)2
4. (10110)2 X (10.1)2
9/10/2018 Amit Nevase 223
Unit I – Number System and Codes
Number System: Base or radix of number systems,
Binary, Octal, Decimal and Hexadecimal number system.
Binary arithmetic: Addition, Subtraction, Multiplication,
Division.
Subtraction using 1’s complement and 2’s complement
Codes: BCD, Gray Code, Excess-3, ASCII code
BCD Arithmetic: BCD Addition
9/10/2018 Amit Nevase 224
Binary Division
Example: Perform (110110)2 / (101)2
9/10/2018 Amit Nevase 225
Binary Division
Example: Perform (110110)2 / (101)2
1 0 1 0
101 1 1 0 1 1 0
-1 0 1
0 0 1 1
-0 0
1 1 1
-1 0 1
0 1 0 0
-0 0 0
9/10/2018
1 0 0 Amit Nevase 226
Exercise
• Perform Binary Division of following:
1. (1010)2 by (11)2
2. (11110)2 by (101)2
3. (11011)2 by (10.1)2
4. (110111.1)2 by (101)2
9/10/2018 Amit Nevase 227
Unit I – Number System and Codes
Number System: Base or radix of number systems,
Binary, Octal, Decimal and Hexadecimal number system.
Binary arithmetic: Addition, Subtraction, Multiplication,
Division.
Subtraction using 1’s complement and 2’s complement
Codes: BCD, Gray Code, Excess-3, ASCII code
BCD Arithmetic: BCD Addition
9/10/2018 Amit Nevase 228
1’s Complement
The 1’s complement of a number is obtained by
simply complementing each bit of the number that
is by changing all 0’s to 1’s and all 1’s to 0’s.
This system is called as 1’s complement because
the number can be subtracted from 1 to obtain
result
9/10/2018 Amit Nevase 229
1’s Complement
Example: Obtain 1’s complement of the 1010
1 1 1 1
1 0 1 0
0 1 0 1
1’s complement of the 1010 is 0101
9/10/2018 Amit Nevase 230
1’s Complement
Sr. No. Binary Number 1’s Complement
1 1101 0101 0010 1010
2 1001 0110
3 1011 1111 0100 0000
4 1101 1010 0001 0010 0101 1110
5 1110 0111 0101 0001 1000 1010
6 1011 0100 1001 0100 1011 0110
7 1100 0011 0010 0011 1100 1101
8 0001 0010 1000 1110 1101 0111
9/10/2018 Amit Nevase 231
Subtraction Using 1’s Complement
In 1’s complement subtraction, add the 1’s complement
of subtrahend to the minuend.
If there is carry out, bring the carry around and add it to
LSB.
Look at the sing bit (MSB), if this is 0, the result is positive
and is in its true binary form.
If the MSB is 1(whether there is a carry or no carry at all),
the result is negative & is in its 1’s complement form. So
take 1’s complement to obtain result.
9/10/2018 Amit Nevase 232
Subtraction using 1’s Complement
Example: Perform using 1’ complement (9)10 (4)10
9/10/2018 Amit Nevase 233
Subtraction using 1’s Complement
Example: Perform using 1’ complement (9)10 (4)10
Step 1: Take 1’ complement of (4)10 (0100)2
1011
Step 2: Add 9 with 1’ complement of 4
1 0 0 1
1 0 1 1
1 0 1 0 0
final carry Result
Step 3:If carry is generated add final carry to the result
9/10/2018 Amit Nevase 234
Example Continue
1 0 0 1
1 0 1 1
1 0 1 0 0 Result
final carry
1
0 1 0 1 Final Result
When the final carry is produced the answer is positive and is in its true
binary form
9/10/2018 Amit Nevase 235
Exercise
• Perform Binary Subtraction using 1’s
Complement method
1. (52)10 - (17)10
2. (46)10 - (84)10
3. (63.75)10-(17.5)10
4. (73.5)10-(112.75)10
9/10/2018 Amit Nevase 236
2’s Complement
The 2’s complement of a number is obtained
by adding 1 to the 1’s complement of that
number
9/10/2018 Amit Nevase 237
2’s Complement
Example: Obtain 2’s complement of the 1010
9/10/2018 Amit Nevase 238
2’s Complement
Example: Obtain 2’s complement of the 1010
1 1 1 1
1 0 1 0
0 1 0 1 ---1’s complement
1
0 1 1 0 ----2’s complement
2’s complement of the 1010 is 0110
9/10/2018 Amit Nevase 239
2’s Complement
Sr. No. Binary Number 1’s Complement 2’s Complement
1 1101 0101 0010 1010 0010 1011
2 1001 0110 0111
3 1011 1111 0100 0000 0100 0001
4 1101 1010 0001 0010 0101 1110 0010 0101 1111
5 1110 0111 0101 0001 1000 1010 0001 1000 1011
9/10/2018 Amit Nevase 240
Subtraction Using 2’s Complement
In 2’s complement subtraction, add the 2’s complement of
subtrahend to the minuend.
If carry is generated then the result is positive and in its
true form.
If the carry is not produced, then the result is negative and
in its 2’s complement form.
*Carry is always to be discarded
9/10/2018 Amit Nevase 241
Subtraction Using 2’s Complement
Example: Perform using 2’ complement (9)10 (4)10
9/10/2018 Amit Nevase 242
Subtraction Using 2’s Complement
Example: Perform using 2’ complement (9)10 (4)10
Step 1: Take 2’ complement of (4)10 (0100)2
1011 1 1100
Step 2: Add 9 with 2’ complement of 4
1 0 0 1
1 1 0 0
1 0 1 0 1
final carry Final Result
Discard
If Carry is generated, discard carry. The result is positive and its true
binary form
9/10/2018 Amit Nevase 243
Exercise
• Perform Binary Subtraction using 2’s
Complement method
1. (46)10 - (19)10
2. (27)10 - (75)10
3. (125.3)10-(46.7)10
4. (36.75)10-(89.5)10
9/10/2018 Amit Nevase 244
Unit I – Number System and Codes
Number System: Base or radix of number systems,
Binary, Octal, Decimal and Hexadecimal number system.
Binary arithmetic: Addition, Subtraction, Multiplication,
Division.
Subtraction using 1’s complement and 2’s complement
Codes: BCD, Gray Code, Excess-3, ASCII code
BCD Arithmetic: BCD Addition
9/10/2018 Amit Nevase 245
BCD or 8421 Code
The smallest BCD number is (0000) and the largest is
(1001). The next number to 9 will be 10 which is
expressed as (0001 0000) in BCD.
There are six illegal combinations 1010, 1011, 1100,
1101, 1110 and 1111 in this code i.e. they are not part
of the 8421 BCD code
9/10/2018 Amit Nevase 246
Decimal to BCD Conversion
Sr. No. Decimal Number BCD Code
1 8 1000
2 47 0100 0111
3 345 0011 0100 0101
4 99 1001 1001
5 10 0001 0000
9/10/2018 Amit Nevase 247
Unit I – Number System and Codes
Number System: Base or radix of number systems,
Binary, Octal, Decimal and Hexadecimal number system.
Binary arithmetic: Addition, Subtraction, Multiplication,
Division.
Subtraction using 1’s complement and 2’s complement
Codes: BCD, Gray Code, Excess-3, ASCII code
BCD Arithmetic: BCD Addition
9/10/2018 Amit Nevase 248
Gray Code
The gray code is non-weighted code.
It is not suitable for arithmetic operations.
It is a cyclic code because successive code words
in this code differ in one bit position only i.e.
unit distance code
9/10/2018 Amit Nevase 249
Binary to Gray Code Conversion
If an n bit binary number is represented by
Bn, Bn 1,.......B1 and its gray code equivalent by
Gn, Gn 1,.......G1 where Bn and Gn are the MSBs,
then gray code bits are obtained from the
binary code as follows;
Gn Bn Gn 1 Bn Bn 1 Gn 2 Bn 1 Bn 2 ………… G1 B2 B1
*where the symbol represents Exclusive-OR operation
9/10/2018 Amit Nevase 250
Binary to Gray Code Conversion
Example 1: Convert 1011 Binary Number into Gray Code
9/10/2018 Amit Nevase 251
Binary to Gray Code Conversion
Example 1: Convert 1011 Binary Number into Gray Code
Binary Number 1 0 1 1
9/10/2018 Amit Nevase 252
Example 1: Continue
Binary Number 1 0 1 1
Gray Code 1
9/10/2018 Amit Nevase 253
Example 1: Continue
Binary Number 1 0 1 1
Gray Code 1 1
9/10/2018 Amit Nevase 254
Example 1: Continue
Binary Number 1 0 1 1
Gray Code 1 1 1
9/10/2018 Amit Nevase 255
Example 1: Continue
Binary Number 1 0 1 1
Gray Code 1 1 1 0
9/10/2018 Amit Nevase 256
Example 1: Continue
Binary Number 1 0 1 1
Gray Code 1 1 1 0
9/10/2018 Amit Nevase 257
Binary to Gray Code Conversion
Example 2: Convert 1001 Binary Number into Gray Code
9/10/2018 Amit Nevase 258
Binary to Gray Code Conversion
Example 2: Convert 1001 Binary Number into Gray Code
Binary Number 1 0 0 1
Gray Code 1 1 0 1
9/10/2018 Amit Nevase 259
Binary to Gray Code Conversion
Example 3: Convert 1111 Binary Number into Gray Code
9/10/2018 Amit Nevase 260
Binary to Gray Code Conversion
Example 3: Convert 1111 Binary Number into Gray Code
Binary Number 1 1 1 1
Gray Code 1 0 0 0
9/10/2018 Amit Nevase 261
Binary to Gray Code Conversion
Example 4: Convert 1010 Binary Number into Gray Code
9/10/2018 Amit Nevase 262
Binary to Gray Code Conversion
Example 4: Convert 1010 Binary Number into Gray Code
Binary Number 1 0 1 0
Gray Code 1 1 1 1
9/10/2018 Amit Nevase 263
Binary and Corresponding Gray Codes
Decimal No. Binary No. Gray Code
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
9/10/2018 Amit Nevase 264
15 1111 1000
Exercise
• Convert following Binary Numbers into Gray
Code
1. (1011)2
2. (110110010)2
3. (101010110101)2
4. (100001)2
9/10/2018 Amit Nevase 265
Gray Code to Binary Conversion
If an n bit gray code is represented by
Gn, Gn 1,.......G1 and its binary equivalent
Bn, Bn 1,.......B1 then binary bits are obtained
from gray bits as follows;
Bn Gn Bn 1 Bn Gn 1 Bn 2 Bn 1 Gn 2 ………… B1 B2 G1
*where the symbol represents Exclusive-OR operation
9/10/2018 Amit Nevase 266
Gray Code to Binary Conversion
Example 1: Convert 1110 Gray code into Binary Number.
9/10/2018 Amit Nevase 267
Gray Code to Binary Conversion
Example 1: Convert 1110 Gray code into Binary Number.
Gray Code 1 1 1 0
9/10/2018 Amit Nevase 268
Example 1: Continue
Gray Code 1 1 1 0
Binary Number 1
9/10/2018 Amit Nevase 269
Example 1: Continue
Gray Code 1 1 1 0
Binary Number 1 0
9/10/2018 Amit Nevase 270
Example 1: Continue
Gray Code 1 1 1 0
Binary Number 1 0 1
9/10/2018 Amit Nevase 271
Example 1: Continue
Gray Code 1 1 1 0
Binary Number 1 0 1 1
9/10/2018 Amit Nevase 272
Example 1: Continue
Gray Code 1 1 1 0
Binary Number 1 0 1 1
9/10/2018 Amit Nevase 273
Gray Code to Binary Conversion
Example 2: Convert 1101 Gray code into Binary Number.
9/10/2018 Amit Nevase 274
Gray Code to Binary Conversion
Example 2: Convert 1101 Gray code into Binary Number.
Gray Code 1 1 0 1
Binary Number 1 0 0 1
9/10/2018 Amit Nevase 275
Gray Code to Binary Conversion
Example 3: Convert 1100 Gray code into Binary Number.
9/10/2018 Amit Nevase 276
Gray Code to Binary Conversion
Example 3: Convert 1100 Gray code into Binary Number.
Gray Code 1 1 0 0
Binary Number 1 0 0 0
9/10/2018 Amit Nevase 277
Exercise
• Convert following Gray Numbers into Binary
Numbers
1. (1111)GRAY
2. (101110) GRAY
3. (100010110) GRAY
4. (11100111) GRAY
9/10/2018 Amit Nevase 278
Unit I – Number System and Codes
Number System: Base or radix of number systems,
Binary, Octal, Decimal and Hexadecimal number system.
Binary arithmetic: Addition, Subtraction, Multiplication,
Division.
Subtraction using 1’s complement and 2’s complement
Codes: BCD, Gray Code, Excess-3, ASCII code
BCD Arithmetic: BCD Addition
9/10/2018 Amit Nevase 279
Excess-3 Code (XS-3)
The Xs-3 is non-weighted BCD code.
This code derives its name from the fact that each
binary code word is the corresponding 8421 code
word plus 0011.
It is a sequential code & therefore can be used for
arithmetic operations.
It is a self complementing code
9/10/2018 Amit Nevase 280
Excess-3 Code (XS-3)
Excess-3 Code=
Decimal No. BCD Code
BCD + Excess-3
0 0000 0011
1 0001 0100
2 0010 0101
3 0011 0110
4 0100 0111
5 0101 1000
6 0110 1001
7 0111 1010
8 1000 1011
9 1001 1100
9/10/2018 Amit Nevase 281
Excess-3 Code (XS-3)
Example 1: Obtain Xs-3 Code for 428 Decimal
9/10/2018 Amit Nevase 282
Excess-3 Code (XS-3)
Example 1: Obtain Xs-3 Code for 428 Decimal
4 2 8
0100 0010 1000
+ 0011 0011 0011
0111 0101 1011
9/10/2018 Amit Nevase 283
Exercise
• Convert following Decimal Numbers into Excess-
3 Code
1. (40)10
2. (88) 10
3. (64) 10
4. (23) 10
9/10/2018 Amit Nevase 284
Unit I – Number System and Codes
Number System: Base or radix of number systems,
Binary, Octal, Decimal and Hexadecimal number system.
Binary arithmetic: Addition, Subtraction, Multiplication,
Division.
Subtraction using 1’s complement and 2’s complement
Codes: BCD, Gray Code, Excess-3, ASCII code
BCD Arithmetic: BCD Addition
9/10/2018 Amit Nevase 285
ASCII Codes
The American Standard Code for Information
Interchange is a character-encoding scheme
originally based on the English alphabet.
ASCII codes represent text in computers,
communications equipment, and other devices that
use text.
Most modern character-encoding schemes are
based on ASCII, though they support many
additional characters.
9/10/2018 Amit Nevase 286
ASCII Codes
ASCII developed from telegraphic codes. Its first
commercial use was as a seven-bit tele-printer code
promoted by Bell data services.
Work on the ASCII standard began on October 6,
1960, with the first meeting of the American
Standards Association's (ASA) X3.2 subcommittee.
The first edition of the standard was published
during 1963.
9/10/2018 Amit Nevase 287
ASCII Codes
ASCII includes definitions for 128 characters: 33
are non-printing control characters (many now
obsolete) that affect how text and space is
processed and 95 printable characters, including
the space (which is considered an invisible
graphic)
9/10/2018 Amit Nevase 288
ASCII Codes
B7 0 0 0 0 1 1 1 1
ASCII Codes B6 0 0 1 1 0 0 1 1
B5 0 1 0 1 0 1 0 1
B4 B3 B2 B1 0 1 2 3 4 5 6 7
0 0 0 0 0 NUL DLE SP 0 @ P ‘ p
0 0 0 1 1 SOH DC1 | 1 A Q a q
0 0 1 0 2 STX DC2 “ 2 B R b r
0 0 1 1 3 ETX DC3 # 3 C S c s
0 1 0 0 4 EOT DC4 $ 4 D T d t
0 1 0 1 5 ENQ NAK % 5 E U e u
0 1 1 0 6 ACK SYN & 6 F V f v
0 1 1 1 7 BEL ETB ‘ 7 G W g w
1 0 0 0 8 BS CAN ( 8 H X h x
1 0 0 1 9 HT EM ) 9 I Y i y
1 0 1 0 10 LF SUB “ : J Z j z
1 0 1 1 11 VT ESC + ; K [ k {
1 1 0 0 12 FF FC , < L \ l !
1 1 0 1 13 CR GS = M ] m }
1 1 1 0 14 SO RS . > N ^ n ~
1 1
9/10/2018 1 1 15 SI US Nevase /
Amit ? O _ o DEL
289
Unit I – Number System and Codes
Number System: Base or radix of number systems,
Binary, Octal, Decimal and Hexadecimal number system.
Binary arithmetic: Addition, Subtraction, Multiplication,
Division.
Subtraction using 1’s complement and 2’s complement
Codes: BCD, Gray Code, Excess-3, ASCII code
BCD Arithmetic: BCD Addition
9/10/2018 Amit Nevase 290
BCD Addition
The BCD addition is performed by individually
adding the corresponding digits of the decimal
number expressed in 4 bit binary groups starting
from LSD.
If there is no carry & the sum term is not an illegal
code, no correction is needed.
9/10/2018 Amit Nevase 291
BCD Addition
If there is a carry out of one group to the next
group or if the sum term is an illegal code then 6
i.e. 0110 is added to the sum term of that group
and resulting carry is added to the next group.
This is done to skip the six illegal states.
9/10/2018 Amit Nevase 292
BCD Addition
Addition of two BCD numbers
Sum≤9, Carry=0 Sum≤9, Carry=1 Sum>9, Carry=0
Answer is correct. Add 6 to the sum Add 6 to the sum
No correction term to get the term to get the
required. correct answer correct answer
9/10/2018 Amit Nevase 293
BCD Addition
Example: Perform in BCD (57)10 (26)10
9/10/2018 Amit Nevase 294
BCD Addition
Example: Perform in BCD (57)10 (26)10
57 0 1 0 1 0 1 1 1
26 0 0 1 0 0 1 1 0
83 0 0 1 1 1 1 1 0 1
Final Carry 0 Valid BCD Invalid BCD
Code Code
Thus we have to add 0110 in illegal BCD code
9/10/2018 Amit Nevase 295
Example Continue
Add 0110 in
only invalid
0 1 1 1 1 1 0 1 code
0 0 0 0 0 1 1 0
1 0 0 0 0 0 1 1
(57)10 (26)10 (83)10
9/10/2018 Amit Nevase 296
Exercise
• Perform BCD Addition
1. (275)10 +(493)10
2. (109)10 +(778)10
3. (88.7)10 +(265.8)10
4. (204.6)10 +(185.56)10
9/10/2018 Amit Nevase 297
References
Digital Principles by Malvino
Leach
Modern Digital Electronics by
R.P. Jain
Digital Electronics, Principles
and Integrated Circuits by Anil
K. Maini
Digital Techniques by A. Anand
Kumar
9/10/2018 Amit Nevase 298
Online Tutorials
http://nptel.ac.in/video.
php?subjectId=1171060
86
http://www.electronics-
tutorials.ws/binary/bin_
1.html
9/10/2018 Amit Nevase 299
9/10/2018 Amit Nevase 300