Number System: Base or Radix of Number: Systems, Binary, Octal, Decimal and Hexadecimal Number System
Number System: Base or Radix of Number: Systems, Binary, Octal, Decimal and Hexadecimal Number System
12/15/2021 2
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).
12/15/2021 3
Unit III – Combinational Logic Circuits
Airthmetic Circuits: (IC 7483) Adder & Subtractor, BCD Adder
12/15/2021 4
Unit IV – Sequential Logic Circuit
Basic Memory Cell: RS Latch- using NAND & NOR.
Drawbacks of SR FF
12/15/2021 6
Unit V – Data Converters and PLDs
Data Converters: DAC: Types, weighted resistor circuit and R-2R
0808/0809 specification
Memory: RAM and ROM basic building blocks, read and write
PLD: Basic building blocks and types of PLDs, PLA, PAL, GAL.
12/15/2021 8
Unit Outcomes
12/15/2021 10
Example of Analog Vs Digital System
Digital
advantages
:
Battery life
Programmabilit
y Accuracy
12/15/2021 11
The World is Analog
The world we live in is analog.
We are analog.
For example,
– 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.
12/15/2021 12
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
Period
(T)
Frequency:
Amplitude
(peak)
1
Amplitude F T Hz
(peak-to-peak)
12/15/2021 14
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.
12/15/2021 15
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
HIGH 5 volts True On 1
2.0 v Invali
d LOW 0 volts False Off 0
Logic
0.8 v Level
12/15/2021 16
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
12/15/2021 17
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
Frequency: High Low
A measure of the number of (tH) (tL)
occurrences of the signal per second.
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.
12/15/2021 19
Example of using digital over analog:
Noisy channel
Noisy channel
Analog system
The physical quantities or may
signals continuously over a specified vary
range.system
Digital
The physical quantities or signals can assume
only discrete values.
Greater accuracy
12/15/2021 21
Analog Vs Digital
X(t) X(t)
t t
Analog signal Digital signal
12/15/2021 22
Advantages of Digital System over Analog System
12/15/2021 23
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)
– Pits and lands on the CD surface reflect the light from the
laser differently, and that difference is encoded as binary data
12/15/2021 24
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
12/15/2021 25
Number System
represent quantity.
12/15/2021 26
Different Number Systems
Decimal Number
System
- Base/Radix 10
Binary Number
System
- Base/Radix 2
Octal Number System
- Base/Radix 8
- Base/Radix
Hexadecimal
9/10/2018
Number16 12/15/2021
Amit 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
0,1,2,3,4,5,6,7,8 and 9
12/15/2021 29
Decimal Number System
12/15/2021 30
Decimal Number System
Structure:
MSD LSD
....
Decimal No. ...... d 3 d2 d1 d 0 . d 1 d
2
Decimal Point
12/15/2021 31
Decimal Number System
12/15/2021 32
Decimal Number System
Examples
1214
1897
9875.54
12/15/2021 33
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
weighted system
12/15/2021 35
Binary Number System
12/15/2021 36
Binary Number System
Structure:
MSB LSB
Positional Weights
23 22 21 21
20 22
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
12/15/2021 39
Terms related to Binary Numbers
- Example 1
12/15/2021 40
Terms related to Binary Numbers
Examples, 1110
0000
1001
0101
12/15/2021 41
Terms related to Binary Numbers
b7 b6 b4 b3 b2 b1
b5 b0
Higher order Lower order
nibble nibble LSB
MSB
12/15/2021 42
Terms related to Binary Numbers
MSB LSB
12/15/2021 43
Terms related to Binary Numbers
12/15/2021 44
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
12/15/2021 47
Octal Number System
Structure:
MSD LSD
Positional Weights
83 82 8 81
0
81 82
12/15/2021
Radix Point 48
Octal Number System
12/15/2021 49
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 Am1it1N0ev1ase 15
12/15/2021
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
12/15/2021
Hexadecimal Number System (HEX)
Structure:
MSD LSD
Radix Point
12/15/2021
Hexadecimal Number System (HEX)
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
12/15/2021
Conversion Among Bases
Possibilities
Decimal Octal
Binary
Hexadecimal
12/15/2021
Conversion from Decimal Number to Binary Number
Decimal Octal
Binary
Hexadecimal
12/15/2021
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
12/15/2021
Example: Convert 105 decimal number in to it’s
equivalent binary number.
12/15/2021
Example: Convert 105 decimal number in to it’s
equivalent binary number.
2 105
12/15/2021
Example: Convert 105 decimal number in to it’s
equivalent binary number.
2 105
2 52 1
12/15/2021
Example: Convert 105 decimal number in to it’s
equivalent binary number.
2 105
2 52 1
2 26 0
12/15/2021
Example: Convert 105 decimal number in to it’s
equivalent binary number.
2 105
2 52 1
2 26 0
2 13 0
12/15/2021
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
12/15/2021
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
12/15/2021
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
12/15/2021
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
12/15/2021
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
12/15/2021
Conversion of Decimal number into Binary number
(Fractional Number)
Procedure:
12/15/2021
Example: Convert 0.42 decimal number in to it’s
equivalent binary number.
0.42 X 2 = 0.84 0
12/15/2021
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
12/15/2021
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
12/15/2021
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
12/15/2021
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
12/15/2021
Example: Convert 0.42 decimal number in to it’s
equivalent binary number.
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
12/15/2021
Exercise
2. (8957.75)10 = ( ? )2
3. (420.6)10 = ( ? )2
4. (8476.47)10 = ( ? )2
12/15/2021
Conversion from Decimal Number to Octal Number
Decimal Octal
Binary
Hexadecimal
12/15/2021
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
12/15/2021
Example: Convert 204 decimal number in to it’s
equivalent octal number.
12/15/2021
Example: Convert 204 decimal number in to it’s
equivalent octal number.
8 204
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
12/15/2021
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
12/15/2021
Example: Convert 204 decimal number in to it’s equivalent
octal number.
8 204
8 25 4
8 3 1
0 3
12/15/2021
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) 1 0 (314) 8
12/15/2021
Conversion of Decimal Number into Octal
Number (Fractional Number)
Procedure:
12/15/2021
Example: Convert 0.6234 decimal number in to it’s
equivalent Octal number.
0.6234 X 8 = 4.9872 4
12/15/2021
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
12/15/2021
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
12/15/2021
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
12/15/2021
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
12/15/2021
Example: Convert 0.6234 decimal number in to it’s
equivalent Octal number.
0.9872 X 8 = 7.8976 7
0.8976 X 8 = 7.1808 7
0.1808 X 8 = 1.4464 1
(0.6234)10 (0.47713)8
12/15/2021
Exercise
2. (8957.75)10 = ( ? )8
3. (420.6)10 = ( ? )8
4. (8476.47)10 = ( ? )8
12/15/2021
Conversion from Decimal Number to Hex Number
Decimal Octal
Binary
Hexadecimal
12/15/2021
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
12/15/2021
Example: Convert 2003 decimal number in to it’s
equivalent Hex number.
12/15/2021
Example: Convert 2003 decimal number in to it’s
equivalent Hex number.
16 2003
Example: Convert 2003 decimal number in to it’s
equivalent Hex number.
1 2 5
16 2003
16 125 3 3 16 2003
- 16
40
- 32
83
- 80
3
12/15/2021
Example: Convert 2003 decimal number in to it’s
equivalent Hex number.
7
16 2003
16 125 3 3 16 125
- 112
16 7 13 D 13
12/15/2021
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
12/15/2021
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) 1 6
12/15/2021
Conversion of Decimal Number into
Hexadecimal Number (Fractional Number)
Procedure:
12/15/2021
Example: Convert 0.122 decimal number in to it’s
equivalent Hex number.
0.122 X 16 = 1.952 1 1
12/15/2021
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
12/15/2021
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
12/15/2021
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
12/15/2021
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
12/15/2021
Example: Convert 0.122 decimal number in to it’s
equivalent Hex number.
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.122) 10 (0.1F3B6) 1 6
12/15/2021
Exercise
2. (8957.75)10 = ( ? )16
3. (420.6)10 = ( ? )16
4. (8476.47)10 = ( ? )16
12/15/2021
Conversion from Binary Number to Decimal Number
Decimal Octal
Binary
Hexadecimal
12/15/2021
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
12/15/2021
Example: Convert 1011.01 binary number in to it’s
equivalent decimal number.
12/15/2021
Example: Convert 1011.01 binary number in to it’s
equivalent decimal number.
Binary No. 1 0 1 . 1
1 0
12/15/2021
Example: Convert 1011.01 binary number in to it’s
equivalent decimal number.
Binary No. 1 0 1 . 1
1 0
Positional Weights
23 22 21 21
20 22
12/15/2021
Example: Convert 1011.01 binary number in to it’s
equivalent decimal number.
Binary No. 1 0 1 . 1
1 0
Positional Weights
23 22 21 20 21
(122
23 ) (0 22 ) (1 21 ) (1 20 ).(0
21 ) (1 22 )
12/15/2021
Example: Convert 1011.01 binary number in to it’s
equivalent decimal number.
Binary No. 1 0 1 . 1
1 0
Positional Weights
23 22 21 20 21
(122
23 ) (0 22 ) (1 21 ) (1 20 ).(0
21 ) (1 22 )
= 8 + 0 + 2 + 1 . 0 + 0.25
12/15/2021
Example: Convert 1011.01 binary number in to it’s
equivalent decimal number.
Binary No. 1 0 1 . 1
1 0
Positional Weights
23 22 21 20 21
(122
23 ) (0 22 ) (1 21 ) (1 20 ).(0
21 ) (1 22 )
= 8 + 0 + 2 + 1 . 0 + 0.25
= 11.25
12/15/2021
Example: Convert 1011.01 binary number in to it’s
equivalent decimal number.
Binary No. 1 0 1 . 1
1 0
Positional Weights
23 22 21 20 21
(122
23 ) (0 22 ) (1 21 ) (1 20 ).(0
21 ) (1 22 )
= 8 + 0 + 2 + 1 .
0 + 0.25
= 11.25
12/15/2021
( 1 0 11 . 0 1 ) 2 (11.25)10
Exercise
1. (1101110.011)2 = ( ? )10
2. (1101.11)2 = ( ? )10
3. (10001.01)2 = ( ? )10
12/15/2021
Conversion from Octal Number to Decimal Number
Decimal Octal
Binary
Hexadecimal
12/15/2021
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
12/15/2021
Example: Convert 365.24 octal number in to it’s
equivalent decimal number.
12/15/2021
Example: Convert 365.24 octal number in to it’s
equivalent decimal number.
Octal No. 3 6 . 2
5 4
12/15/2021
Example: Convert 365.24 octal number in to it’s
equivalent decimal number.
Octal No. 3 6 . 2
5 4
Positional Weights
82 81 81
80 82
12/15/2021
Example: Convert 365.24 octal number in to it’s
equivalent decimal number.
Octal No. 3 6 . 2
5 4
Positional Weights
82 81 80 81 82
12/15/2021
Example: Convert 365.24 octal number in to it’s equivalent
decimal number.
Octal No. 3 6 . 2
5 4
Positional Weights
82 81 80 81 82
12/15/2021
Example: Convert 365.24 octal number in to it’s
equivalent decimal number.
Octal No. 3 6 . 2
5 4
Positional Weights
82 81 80 81 82
= 245.3125
12/15/2021
Example: Convert 365.24 octal number in to it’s
equivalent decimal number.
Octal No. 3 6 . 2
5 4
Positional Weights
82 81 80 81 82
Number:
1. (3006.05)8 = ( ? )10
2. (273.56)8 = ( ? )10
3. (6534.04)812/15/2021
= ( ? )10
Conversion from Hex Number to Decimal Number
Decimal Octal
Binary
Hexadecimal
12/15/2021
Conversion of Hexadecimal Number into Decimal Number
Procedure:
12/15/2021
Example: Convert 5826 hex number in to it’s equivalent
decimal number.
Hex No. 5 2 6
8
12/15/2021
Example: Convert 5826 hex number in to it’s equivalent
decimal number.
Hex No. 5 2 6
8
Positional Weights 163 162 161
160
12/15/2021
Example: Convert 5826 hex number in to it’s equivalent
decimal number.
Hex No. 5 2 6
8
Positional Weights 163 162 161 160
12/15/2021
Example: Convert 5826 hex number in to it’s equivalent
decimal number.
Hex No. 5 2 6
8
Positional Weights 163 162 161 160
12/15/2021
Example: Convert 5826 hex number in to it’s equivalent
decimal number.
Hex No. 5 2 6
8
Positional Weights 163 162 161 160
= 22566
12/15/2021
Example: Convert 5826 hex number in to it’s equivalent
decimal number.
Hex No. 5 2 6
8
Positional Weights 163 162 161 160
= 22566
(5826) 16 (22566) 1 0
12/15/2021
Exercise
2. (6B7)16 = ( ? )10
3. (8E47.AB)16 = ( ? )10
12/15/2021
Conversion from Binary Number to Octal Number
Decimal Octal
Binary
Hexadecimal
12/15/2021
Conversion of Binary Number into Octal Number
Procedure:
12/15/2021
Example: Convert 11010010 binary number in to it’s
equivalent octal number.
0 1 1 0 1 0 0 1 0
Example: Convert 11010010 binary number in to it’s
equivalent octal number.
LSB
0 1 1 0 1 0 0 1 0
12/15/2021
Example: Convert 11010010 binary number in to it’s
equivalent octal number.
0 1 1 0 1 0 0 1 0
3 2 2
12/15/2021
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
12/15/2021
Exercise
1. (1101110.011)2 = ( ? )8
2. (1101.11)2 = ( ? )8
3. (10001.01)2 = ( ? )8
12/15/2021
Conversion from Binary Number to Hexadecimal
Number
Decimal Octal
Binary
Hexadecimal
12/15/2021
Conversion of Binary Number to Hexadecimal Number
Procedure:
12/15/2021
Example: Convert 11010010 binary number in to it’s
equivalent hex number.
LSB
1 1 0 1 0 0 1 0
12/15/2021
Example: Convert 11010010 binary number in to it’s
equivalent hex number.
LSB
1 1 0 1 0 0 1 0
12/15/2021
Example: Convert 11010010 binary number in to it’s
equivalent hex number.
1 1 0 1 0 0 1 0
D 2
12/15/2021
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
12/15/2021
Exercise
Number:
1. (1101110.011)2 = ( ? )16
2. (1101.11)2 = ( ? )16
3. (10001.01)12/15/2021
2 = ( ? )16
Conversion from Octal Number to Binary Number
Decimal Octal
Binary
Hexadecimal
12/15/2021
Conversion of Octal Number into Binary Number
12/15/2021
Example: Convert 364 octal number in to it’s equivalent
binary number.
12/15/2021
Example: Convert 364 octal number in to it’s equivalent
binary number.
3 6 4
12/15/2021
Example: Convert 364 octal number in to it’s equivalent
binary number.
3 6 4
12/15/2021
Example: Convert 364 octal number in to it’s equivalent
binary number.
3 6 4
12/15/2021
Example: Convert 364 octal number in to it’s equivalent
binary number.
3 6 4
(364) 8 (011110100) 2
OR
(364) 8 (11110100) 2
12/15/2021
Exercise
Number:
1. (3006.05)8 = ( ? )2
2. (273.56)8 = ( ? )2
3. (6534.04)812/15/2021
= ( ? )2
Conversion from Hex Number to Binary Number
Decimal Octal
Binary
Hexadecimal
12/15/2021
Conversion of Hexadecimal Number into Binary Number
12/15/2021
Example: Convert AFB2 hex number in to it’s
equivalent binary number.
12/15/2021
Example: Convert AFB2 hex number in to it’s equivalent
binary number.
A F B 2
12/15/2021
Example: Convert AFB2 hex number in to it’s equivalent
binary number.
A F B 2
12/15/2021
Example: Convert AFB2 hex number in to it’s equivalent
binary number.
A F B 2
(AFB2) 1 6 (1010111110110010) 2
12/15/2021
Exercise
1. (4056)16 = ( ? )2
2. (6B7)16 = ( ? )2
3. (8E47.AB)16 = ( ? )2
12/15/2021
Conversion from Octal Number to Hex Number
Decimal Octal
Binary
Hexadecimal
12/15/2021
Conversion of Octal Number into Hexadecimal Number
12/15/2021
Example: Convert 364 octal number in to it’s
equivalent hex number.
12/15/2021
Example: Convert 364 octal number in to it’s equivalent
hex number.
3 6 4 Octal Number
12/15/2021
Example: Convert 364 octal number in to it’s equivalent
hex number.
3 6 4 Octal Number
12/15/2021
Example: Convert 364 octal number in to it’s equivalent
hex number.
3 6 4 Octal Number
12/15/2021
Example: Convert 364 octal number in to it’s equivalent
hex number.
3 6 4 Octal Number
0 F Hex Number
12/15/2021
Example: Convert 364 octal number in to it’s equivalent
hex number.
3 6 4 Octal Number
0 F Hex Number
(364) 8 (F4) 1 6
12/15/2021
Exercise
2. (273.56)8 = ( ? )16
3. (6534.04)8 = ( ? )16
12/15/2021
Conversion from Hex Number to Octal Number
Decimal Octal
Binary
Hexadecimal
12/15/2021
Conversion of Hexadecimal Number into Octal Number
12/15/2021
Example: Convert 4CA hex number in to it’s equivalent
octal number.
12/15/2021
Example: Convert 4CA hex number in to it’s equivalent
octal number.
4 C A Hex Number
12/15/2021
Example: Convert 4CA hex number in to it’s equivalent
octal number.
4 C A Hex Number
12/15/2021
Example: Convert 4CA hex number in to it’s equivalent
octal number.
4 C A Hex Number
12/15/2021
Example: Convert 4CA hex number in to it’s equivalent
octal number.
4 C A Hex Number
2 3 1 2 Octal Number
12/15/2021
Example: Convert 4CA hex number in to it’s equivalent
octal number.
4 C A Hex Number
2 3 1 2 Octal Number
(4CA) 1 6 (2312) 8
12/15/2021
Exercise
1. (4056)16 = ( ? )8
2. (6B7)16 = ( ? )8
3. (8E47.AB)16 = ( ? )8
12/15/2021
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
12/15/2021
Binary Addition
1 0 1 1 1
1 1 0 0 1
12/15/2021
Binary Addition
1 0 1 1 1
1 1 0 0 1
0 0
12/15/2021
Binary Addition
1 0 1 1 1
1 1 0 0 1
0 0 0
12/15/2021
Binary Addition
1 0 1 1 1
1 1 0 0 1
0 0 0 0
12/15/2021
Binary Addition
1
12/15/2021
Binary Addition
1 1 1
1
1 0 1
1 1
1 1 0
0 1
1 1 0 0 0 0
12/15/2021
Binary Addition
1 1 0 1 . 1 0 1
1 1 1 . 0 1 1
1 0 1 0 1 0 0 0
.
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
12/15/2021
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
12/15/2021
Binary Subtraction
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
1. (1011)2- (101)2
2. (1100.10)2- (111.01)2
3. (10110)2- (1011)2
4. (10001.01)2- (1111.11)2
12/15/2021
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
12/15/2021
Binary Multiplication
12/15/2021
Binary Multiplication
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
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
12/15/2021
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
12/15/2021
Binary Division
1
9/10/2018
-1 1 0 0 12/15/2021
Amit
226
Exercise
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
12/15/2021 217
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
result
12/15/2021 219
1’s Complement
1 1 1 1
1 0 1 0
0 1 0 1
12/15/2021 220
1’s Complement
2 1001 0110
12/15/2021 223
Subtraction using 1’s Complement
1 0 0
1
1 0 1
1
final carry Result
1 0 1 0 0
Step 3:If carry is generated add final carry to the result
12/15/2021 224
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
12/15/2021 225
Exercise
1. (52)10 - (17)10
2. (46)10 - (84)10
3. (63.75)10-(17.5)10
4. (73.5)10-(112.75)10
12/15/2021 226
2’s Complement
12/15/2021 227
2’s Complement
228
2’s Complement
1 1 1 1
1 0 1 0
0 1 0 1 ---1’s complement
1
0 1 1 0 ----2’s complement
12/15/2021 230
Subtraction Using 2’s Complement
12/15/2021 231
Subtraction Using 2’s Complement
12/15/2021 232
Subtraction Using 2’s Complement
1 0 0 1
1 1 0 0
1 0 1 0 1
final carry
Discard Final Result
If Carry is generated, discard carry. The result is positive and its true
bin9a1/ r0y2/0f1o8 Amit Nevase
12/15/2021 243
Exercise
1. (46)10 - (19)10
2. (27)10 - (75)10
3. (125.3)10-(46.7)10
4. (36.75)10-(89.5)10
12/15/2021 234
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
1101, 1110 and 1111 in this code i.e. they are not part
1 8 1000
2 47 0100 0111
4 99 1001 1001
5 10 0001 0000
12/15/2021 237
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
12/15/2021 239
Binary to Gray Code Conversion
241
Binary to Gray Code Conversion
Binary Number 1 0 1 1
12/15/2021 242
Example 1: Continue
Binary Number 1 0 1 1
Gray Code 1
12/15/2021 243
Example 1: Continue
Binary Number 1 0 1 1
Gray Code 1 1
12/15/2021 244
Example 1: Continue
Binary Number 1 0 1 1
Gray Code 1 1 1
12/15/2021 245
Example 1: Continue
Binary Number 1 0 1 1
Gray Code 1 1 1 0
12/15/2021 246
Example 1: Continue
Binary Number 1 0 1 1
Gray Code 1 1 1 0
12/15/2021 247
Binary to Gray Code Conversion
248
Binary to Gray Code Conversion
Binary Number 1 0 0 1
Gray Code 1 1 0 1
12/15/2021 249
Binary to Gray Code Conversion
250
Binary to Gray Code Conversion
Binary Number 1 1 1 1
Gray Code 1 0 0 0
12/15/2021 251
Binary to Gray Code Conversion
252
Binary to Gray Code Conversion
Binary Number 1 0 1 0
Gray Code 1 1 1 1
12/15/2021 253
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
12/15/2021 264
15 1111 1000
Exercise
1. (1011)2
2. (110110010)2
3. (101010110101)2
4. (100001)2
12/15/2021 255
Gray Code to Binary Conversion
Bn Gn Bn 1 Bn Gn 1 Bn 2 Bn 1 Gn 2 ………… B1 B 2 G 1
12/15/2021 256
Gray Code to Binary Conversion
257
Gray Code to Binary Conversion
Gray Code 1 1 1 0
12/15/2021 258
Example 1: Continue
Gray Code 1 1 1 0
Binary Number 1
12/15/2021 259
Example 1: Continue
Gray Code 1 1 1 0
Binary Number 1 0
12/15/2021 260
Example 1: Continue
Gray Code 1 1 1 0
Binary Number 1 0 1
12/15/2021 261
Example 1: Continue
Gray Code 1 1 1 0
Binary Number 1 0 1 1
12/15/2021 262
Example 1: Continue
Gray Code 1 1 1 0
Binary Number 1 0 1 1
12/15/2021 263
Gray Code to Binary Conversion
264
Gray Code to Binary Conversion
Gray Code 1 1 0 1
Binary Number 1 0 0 1
12/15/2021 265
Gray Code to Binary Conversion
266
Gray Code to Binary Conversion
Gray Code 1 1 0 0
Binary Number 1 0 0 0
12/15/2021 267
Exercise
1. (1111)GRAY
2. (101110) GRAY
3. (100010110) GRAY
4. (11100111) GRAY
12/15/2021 268
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
This code derives its name from the fact that each
binary code word is the corresponding 8421 code
word plus 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
12/15/2021 271
Excess-3 Code (XS-3)
272
Excess-3 Code (XS-3)
4 2 8
12/15/2021 273
Exercise
1. (40)10
2. (88) 10
3. (64) 10
4. (23) 10
12/15/2021 274
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
12/15/2021 278
ASCII Codes
ASCII Codes B7
B6
0
0
0
0
0
1
0
1
1
0
1
0
1
1
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 0/12018 1 1 15 SI m U i St ? O _ o
e/ 28D9EL
9/1 Nevas
A 12/15/2021
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
12/15/2021 283
BCD Addition
12/15/2021 284
BCD Addition
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
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
12/15/2021 286
Exercise
1. (275)10 +(493)10 2.
(109)10 +(778)10
3. (88.7)10
+(265.8)10
4. (204.6)10
+(185.56)10
12/15/2021 287
References
Digital Principles by
Malvino Leach
Modern Digital Electronics
by
R.P. Jain
Digital Electronics,
Principles and Integrated
Circuits by Anil
K. Maini
12/15/2021
Digital Techniques by A. Anand
288
Online Tutorials
http://nptel.ac.in/video.
php?
subjectId=1171060 86
http://www.electronics-
tutorials.ws/binary/bin
12/15/2021 289
12/15/2021 290