SlideShare a Scribd company logo
DEPARTMENT OF COMPUTER
SCIENCE & APPLICATIONS
BCA070 – DIGITAL ELECTRONICS
By: Prof. Ram Pratap Singh
Number System
• Role of Numbers in Computer
• Types of Number System
 Binary Number system
Decimal Number system
Octal Number system
Hexadecimal Number system
Binary Number System:
• A positional number system
• Has only 2 symbols or digits (0 and 1). Hence its base = 2
• The maximum value of a single digit is 1 (one less than the value of the base)
• Each position of a digit represents a specific power of the base (2)
• This number system is used in computers
Example
101012 (101100)2 111112
Bit
• Bit stands for binary digit
• A bit in computer terminology means either a 0 or a 1
• A binary number consisting of n bits is called an n-bit number
Number System
Number System
Decimal Number System
• A positional number system
• Has 10 symbols or digits (0, 1, 2, 3, 4, 5, 6, 7, 8, 9). Hence, its base = 10
• The maximum value of a single digit is 9 (one less than the value of the base).
• Each position of a digit represents a specific power of the base (10)
• We use this number system in our day-to-day life
Example- 258610 (2586)10
258610 = (2 x 103) + (5 x 102) + (8 x 101) + (6 x 100)
= 2000 + 500 + 80 + 6
Number System
Octal Number System
• A positional number system
• Has total 8 symbols or digits (0, 1, 2, 3, 4, 5, 6, 7) Hence, its base = 8
• The maximum value of a single digit is 7 (one less than the value of the base
• Each position of a digit represents a specific power of the base (8)
Example- 15068 (2016)8
Number System
Hexadecimal Number System
• A positional number system
• Has total 16 symbols or digits (0, 1, 2, 3, 4, 5, 6, 7, 8, 9, A, B, C, D, E, F).
Hence its base = 16
• The symbols A, B, C, D, E and F represent the decimal values 10, 11, 12, 13,
14 and 15 respectively
• The maximum than the value of a single of the base)
Example- 15A616 (FACE)16
Number System
Number System
System Base Symbols Used
Humans
Used
Computer
Used
Binary 2 0 / 1 NO YES
Decimal 10 0,1,2…..9 YES NO
Octal 8 0,1,2…..7 NO NO
Hexadecimal 16
0,1,2….9,
A,B….F
NO NO
Conversions of Number System
- : Possibilities: -
Decimal
OctalBinary
Hexadecimal
Conversions of Number System
12510 =>
Weight
Base
Binary to Decimal
Rules
 Multiply the each bit start from right to left most digit by its base value with the
power of n, where n is the weight of the bit.
 weight is just a position of a particular bit. Which counts from 0 to places at
the end of right side.
 And lastly we add the results.
5 x 100 = 5
2 x 101 = 20
1 x 102 = 100
125
Conversions of Number System
Example
1010112 => 1 x 20 = 1
1 x 21 = 2
0 x 22 = 0
1 x 23 = 8
0 x 24 = 0
1 x 25 = 32
4310
(101011)2 = (43)10
Conversions of Number System
Decimal to Binary
 Divide the decimal number to be converted by 2.
 Record the remainder.
 the rightmost the new base digit (least significant digit) of number.
 Divide the quotient of the previous divide by same base i.e. 2.
 Record the remainder from above Step.
 Recording remainders from right to left, until the quotient becomes zero.
 Note that the last remainder thus new obtained will be the most significant
digit (MSD) of the base number.
Conversions of Number System
Decimal to Binary
Example:
12510 = ?2
2 125
62 1
2
15 1
2
31 0
2
7 12
3 12
1 12
0 1
LSB
MSB
12510 = 11111012
Remainder
Conversions of Number System
Octal
Binary
Decimal
Rules for Binary to Octal Numbers
 First Divide all given binary digits in to pair of three starting from
right to left most digit.
 if there is any bit short then use zero’s to complete the pair of three
as per above step.
 Convert these individual pair of binary digits to its octal equivalent
using binary to decimal process.
Conversions of Number System
Example: 11010102 = ?8
 Divide the binary digits into groups of three from right.
1101010
001 101 010
 Convert each group into one octal digit.
0012 1012 0102
= 0 x 22 + 0 x 21 + 1 x 20 1 x 22 + 0 x 21 + 1 x 20 0 x 22 + 1 x 21 + 0 x 20
= 0 + 0 + 1 4 + 0 + 1 0 + 2 + 0
= 1 5 2
(1101010)2 = (152)8
Conversions of Number System
10110101112 = ?8
1 011 010 111
1 3 2 7
10110101112 = 13278
Cont.....
Conversions of Number System
HexadecimalBinary
Rules for Binary to Hexadecimal Numbers
 Group binary digits in to pair of Four starting from right to left most
digit.
 Convert these individual pair of binary digits to its Hexa equivalent
using binary to decimal conversion process.
Conversions of Number System
Example: 11010102 = ?16
 Divide the binary digits into groups of four from right.
01101010
0110 1010
 Convert each group into one Hexa digit.
01102 10102
= 0 x 23 + 1 x 22 + 1 x 21 + 0 x 20 1 x 23 + 0 x 22 + 1 x 21 + 0 x 20
= 0 + 4 + 2 + 0 8 + 0 + 2 + 0
= 6 10
(1101010)2 = (6A)16
Conversions of Number System
10101110112 = ?16
10 1011 1011
10101110112 = 2BB16
Cont.....
2 B B
Conversions of Number System
Converting a Decimal Number to a Number of Another Base
Division-Remainder Method
Step 1: Divide the decimal number to be converted by the value of the new base.
Step 2: Record the remainder from Step 1 as the rightmost the new base digit (least
significant digit) of number.
Step 3: Divide the quotient of the previous divide by the new base .
Step 4: Record the remainder from Step 3 as the next digit (to the left) of the new base
number.
 Repeat Steps 3 and 4, recording remainders from right to left, until the quotient
becomes zero in Step 3
 Note that the last remainder thus new obtained will be the most significant digit
(MSD) of the base number
Decimal to Octal
Example
95210 = ?8
Solution:
8 952 Remainders
8 119 0
8 14 7
1 6
Hence, 95210 = 16708
Decimal to Octal
Example
123410 = ?8
Solution:
8 1234 Remainders
8 154 2
8 19 2
02 3
Hence, 123410 = 23228
Octal to Decimal
Converting a Number of Another Base to a
Decimal Number
Rules:
Step 1: Determine the column (positional) value of each digit.
Step 2: Multiply the obtained column values by the digits in the
corresponding columns.
Step 3: Calculate the sum of these products.
Example:
47068 = ?10
47068 = 4 x 83 + 7 x 82 + 0 x 81 + 6 x 80
= 4 x 512 + 7 x 64 + 0 + 6 x 1
= 2048 + 448 + 0 + 6
= 250210
Hexadecimal to Decimal
Example:
47B16 = ?10
47B16 = 4 x 162 + 7 x 161 + 11 x 160
= 4 x 256 + 7 x 16 + 11 x 1
= 1024 + 112 + 11
= 114710
47B16 = 114710
CONVERSION
Converting a Number of Some Base to a Number of Another Base
Example
5456 = ?4
Solution:
Step 1: Convert from base 6 to base 10
5456 = 5 x 62 + 4 x 61 + 5 x 60
= 5 x 36 + 4 x 6 + 5 x 1
= 180 + 24 + 5 = 20910
Step 2: Convert 20910 to base 4
4 209 Remainder
4 52 1
4 13 0
4 3 1
0 3
Hence, 20910 = 31014
So, 5456 = 20910 = 31014
Thus, 5456 = 31014
Conversions of Number System
Octal to Binary
Technique:
Convert each octal digit to a 3-bit equivalent binary representation
Example:
7058 = ?2
7 0 5
111 000 101
7058 = 1110001012
Conversions of Number System
Hexadecimal to Binary
Technique:
Convert each octal digit to a 4-bit equivalent binary representation
Example:
70516 = ?2
7 0 5
0111 0000 0101
7058 = 0111000001012
Hexadecimal to Binary
Example:
10AF16 = ?2
1 0 A F
0001 0000 1010 1111
10AF16 = 00010000101011112
Octal to Hexadecimal
• Technique
– Use binary as an intermediary
Example:
10768 = ?16
1 0 7 6
001 000 111 110
2 3 E
10768 = 23E16
Hexadecimal to Octal
• Technique
– Use binary as an intermediary
Example:
1F0C16 = ?8
1 F 0 C
0001 1111 0000 1100
1 7 4 1 4
1F0C16 = 174148
Conversions of Number System
Fractions
• Binary to decimal
10.1011 =>
1 x 21 = 2.0
0 x 20 = 0.0
1 x 2-1 = 0.5
0 x 2-2 = 0.0
1 x 2-3 = 0.125
1 x 2-4 = 0.0625
(2.6875)10
Conversions of Number System
Fractions
• Decimal to binary
3.14579
.14579
x 2
0.29158
x 2
0.58316
x 2
1.16632
x 2
0.33264
x 2
0.66528
x 2
1.33056
etc.11.001001...
Number system and their conversion

More Related Content

What's hot

STLD-Combinational logic design
STLD-Combinational  logic design STLD-Combinational  logic design
STLD-Combinational logic design
Abhinay Potlabathini
 
Octal to Hexadecimal and Hexadecimal to Octal
Octal to Hexadecimal  and Hexadecimal to OctalOctal to Hexadecimal  and Hexadecimal to Octal
Octal to Hexadecimal and Hexadecimal to Octal
SRM Institute of Science & Technology, Tiruchirappalli
 
Number systems ppt
Number systems pptNumber systems ppt
Number systems ppt
sudarmani rajagopal
 
Number system
Number systemNumber system
Number system
Darpan Chelani
 
Binary Arithmetic
Binary ArithmeticBinary Arithmetic
Binary Arithmeticgavhays
 
Hexadecimal to octal conversion
Hexadecimal to octal conversionHexadecimal to octal conversion
Hexadecimal to octal conversion
Mukesh Tekwani
 
Number System
Number SystemNumber System
Number System
Pradipta Sarkar
 
Binary addition.pptx
Binary addition.pptxBinary addition.pptx
Binary addition.pptx
Pooja Dixit
 
Floating point representation
Floating point representationFloating point representation
Floating point representation
missstevenson01
 
Control Unit Design
Control Unit DesignControl Unit Design
Control Unit Design
Vinit Raut
 
Number Base Conversion Digital Electronics
Number Base Conversion Digital ElectronicsNumber Base Conversion Digital Electronics
Number Base Conversion Digital Electronics
Srikrishna Thota
 
Number System
Number SystemNumber System
Number System
Ramesh Ragala
 
Number system
Number systemNumber system
Number system
Sajib
 
Chapter 03 arithmetic for computers
Chapter 03   arithmetic for computersChapter 03   arithmetic for computers
Chapter 03 arithmetic for computersBảo Hoang
 
Decimal number system
Decimal number systemDecimal number system
Decimal number system
Nisarg Amin
 
Chapter 2 - Computer Evolution and Performance
Chapter 2 - Computer Evolution and PerformanceChapter 2 - Computer Evolution and Performance
Chapter 2 - Computer Evolution and Performance
César de Souza
 
CS304PC:Computer Organization and Architecture Session 23 Decimal Arithmetic ...
CS304PC:Computer Organization and Architecture Session 23 Decimal Arithmetic ...CS304PC:Computer Organization and Architecture Session 23 Decimal Arithmetic ...
CS304PC:Computer Organization and Architecture Session 23 Decimal Arithmetic ...
Asst.prof M.Gokilavani
 
Binary Arithmetic Operations
Binary Arithmetic OperationsBinary Arithmetic Operations
Binary Arithmetic Operations
Digital System Design
 
Binary, Decimal and Hexadecimal
Binary, Decimal and HexadecimalBinary, Decimal and Hexadecimal
Binary, Decimal and Hexadecimal
UthraSowrirajan1
 
Binary Slides
Binary Slides Binary Slides
Binary Slides jnoles
 

What's hot (20)

STLD-Combinational logic design
STLD-Combinational  logic design STLD-Combinational  logic design
STLD-Combinational logic design
 
Octal to Hexadecimal and Hexadecimal to Octal
Octal to Hexadecimal  and Hexadecimal to OctalOctal to Hexadecimal  and Hexadecimal to Octal
Octal to Hexadecimal and Hexadecimal to Octal
 
Number systems ppt
Number systems pptNumber systems ppt
Number systems ppt
 
Number system
Number systemNumber system
Number system
 
Binary Arithmetic
Binary ArithmeticBinary Arithmetic
Binary Arithmetic
 
Hexadecimal to octal conversion
Hexadecimal to octal conversionHexadecimal to octal conversion
Hexadecimal to octal conversion
 
Number System
Number SystemNumber System
Number System
 
Binary addition.pptx
Binary addition.pptxBinary addition.pptx
Binary addition.pptx
 
Floating point representation
Floating point representationFloating point representation
Floating point representation
 
Control Unit Design
Control Unit DesignControl Unit Design
Control Unit Design
 
Number Base Conversion Digital Electronics
Number Base Conversion Digital ElectronicsNumber Base Conversion Digital Electronics
Number Base Conversion Digital Electronics
 
Number System
Number SystemNumber System
Number System
 
Number system
Number systemNumber system
Number system
 
Chapter 03 arithmetic for computers
Chapter 03   arithmetic for computersChapter 03   arithmetic for computers
Chapter 03 arithmetic for computers
 
Decimal number system
Decimal number systemDecimal number system
Decimal number system
 
Chapter 2 - Computer Evolution and Performance
Chapter 2 - Computer Evolution and PerformanceChapter 2 - Computer Evolution and Performance
Chapter 2 - Computer Evolution and Performance
 
CS304PC:Computer Organization and Architecture Session 23 Decimal Arithmetic ...
CS304PC:Computer Organization and Architecture Session 23 Decimal Arithmetic ...CS304PC:Computer Organization and Architecture Session 23 Decimal Arithmetic ...
CS304PC:Computer Organization and Architecture Session 23 Decimal Arithmetic ...
 
Binary Arithmetic Operations
Binary Arithmetic OperationsBinary Arithmetic Operations
Binary Arithmetic Operations
 
Binary, Decimal and Hexadecimal
Binary, Decimal and HexadecimalBinary, Decimal and Hexadecimal
Binary, Decimal and Hexadecimal
 
Binary Slides
Binary Slides Binary Slides
Binary Slides
 

Similar to Number system and their conversion

LEfddfffhhfrrdvvggfdwfcxsfvdsfgC 02 A.pptx
LEfddfffhhfrrdvvggfdwfcxsfvdsfgC 02 A.pptxLEfddfffhhfrrdvvggfdwfcxsfvdsfgC 02 A.pptx
LEfddfffhhfrrdvvggfdwfcxsfvdsfgC 02 A.pptx
Ahsan433
 
Computer Number system
Computer Number systemComputer Number system
Computer Number system
Anil Kumar Prajapati
 
numbersystem-211022083557.pdf
numbersystem-211022083557.pdfnumbersystem-211022083557.pdf
numbersystem-211022083557.pdf
AsthaChaurasia4
 
Number System.pptx
Number System.pptxNumber System.pptx
Number System.pptx
ColleenVender2
 
Number System.pptx
Number System.pptxNumber System.pptx
Number System.pptx
Lovely Professional University
 
Digital Electronics Notes.pdf
Digital Electronics Notes.pdfDigital Electronics Notes.pdf
Digital Electronics Notes.pdf
4NM21IS132SAISHARATH
 
Number Systems
Number SystemsNumber Systems
Number Systems
Jubayer Alam Shoikat
 
lecture02-numbersystem-191002152647.pdf
lecture02-numbersystem-191002152647.pdflecture02-numbersystem-191002152647.pdf
lecture02-numbersystem-191002152647.pdf
AsthaChaurasia4
 
Number systems and conversions
Number systems and conversionsNumber systems and conversions
Number systems and conversions
Susantha Herath
 
DATA REPRESENTATION.pptx
DATA REPRESENTATION.pptxDATA REPRESENTATION.pptx
DATA REPRESENTATION.pptx
MamataAnilgod
 
Chapter iii: Number System
Chapter iii: Number SystemChapter iii: Number System
Chapter iii: Number System
kclove
 
FYBSC IT Digital Electronics Unit I Chapter I Number System and Binary Arithm...
FYBSC IT Digital Electronics Unit I Chapter I Number System and Binary Arithm...FYBSC IT Digital Electronics Unit I Chapter I Number System and Binary Arithm...
FYBSC IT Digital Electronics Unit I Chapter I Number System and Binary Arithm...
Arti Parab Academics
 
Cit 1101 lec 02
Cit 1101 lec 02Cit 1101 lec 02
Cit 1101 lec 02
sohag sikder
 
Chapter 3.pptx
Chapter 3.pptxChapter 3.pptx
Chapter 3.pptx
Wollo UNiversity
 
1663694151.pdf
1663694151.pdf1663694151.pdf
1663694151.pdf
nostavimle
 
Chapter 03-Number System-Computer Application.pptx
Chapter 03-Number System-Computer Application.pptxChapter 03-Number System-Computer Application.pptx
Chapter 03-Number System-Computer Application.pptx
gadisaAdamu
 
Chapter two FHI.pptx
Chapter two FHI.pptxChapter two FHI.pptx
Chapter two FHI.pptx
ODAATUBE1
 
Module 1 number systems and code1
Module 1  number systems and code1Module 1  number systems and code1
Module 1 number systems and code1
Deepak John
 
Finite word length effects
Finite word length effectsFinite word length effects
Finite word length effects
PeriyanayagiS
 

Similar to Number system and their conversion (20)

LEfddfffhhfrrdvvggfdwfcxsfvdsfgC 02 A.pptx
LEfddfffhhfrrdvvggfdwfcxsfvdsfgC 02 A.pptxLEfddfffhhfrrdvvggfdwfcxsfvdsfgC 02 A.pptx
LEfddfffhhfrrdvvggfdwfcxsfvdsfgC 02 A.pptx
 
DCF QNA edited
DCF QNA editedDCF QNA edited
DCF QNA edited
 
Computer Number system
Computer Number systemComputer Number system
Computer Number system
 
numbersystem-211022083557.pdf
numbersystem-211022083557.pdfnumbersystem-211022083557.pdf
numbersystem-211022083557.pdf
 
Number System.pptx
Number System.pptxNumber System.pptx
Number System.pptx
 
Number System.pptx
Number System.pptxNumber System.pptx
Number System.pptx
 
Digital Electronics Notes.pdf
Digital Electronics Notes.pdfDigital Electronics Notes.pdf
Digital Electronics Notes.pdf
 
Number Systems
Number SystemsNumber Systems
Number Systems
 
lecture02-numbersystem-191002152647.pdf
lecture02-numbersystem-191002152647.pdflecture02-numbersystem-191002152647.pdf
lecture02-numbersystem-191002152647.pdf
 
Number systems and conversions
Number systems and conversionsNumber systems and conversions
Number systems and conversions
 
DATA REPRESENTATION.pptx
DATA REPRESENTATION.pptxDATA REPRESENTATION.pptx
DATA REPRESENTATION.pptx
 
Chapter iii: Number System
Chapter iii: Number SystemChapter iii: Number System
Chapter iii: Number System
 
FYBSC IT Digital Electronics Unit I Chapter I Number System and Binary Arithm...
FYBSC IT Digital Electronics Unit I Chapter I Number System and Binary Arithm...FYBSC IT Digital Electronics Unit I Chapter I Number System and Binary Arithm...
FYBSC IT Digital Electronics Unit I Chapter I Number System and Binary Arithm...
 
Cit 1101 lec 02
Cit 1101 lec 02Cit 1101 lec 02
Cit 1101 lec 02
 
Chapter 3.pptx
Chapter 3.pptxChapter 3.pptx
Chapter 3.pptx
 
1663694151.pdf
1663694151.pdf1663694151.pdf
1663694151.pdf
 
Chapter 03-Number System-Computer Application.pptx
Chapter 03-Number System-Computer Application.pptxChapter 03-Number System-Computer Application.pptx
Chapter 03-Number System-Computer Application.pptx
 
Chapter two FHI.pptx
Chapter two FHI.pptxChapter two FHI.pptx
Chapter two FHI.pptx
 
Module 1 number systems and code1
Module 1  number systems and code1Module 1  number systems and code1
Module 1 number systems and code1
 
Finite word length effects
Finite word length effectsFinite word length effects
Finite word length effects
 

Recently uploaded

一比一原版(UofT毕业证)多伦多大学毕业证成绩单如何办理
一比一原版(UofT毕业证)多伦多大学毕业证成绩单如何办理一比一原版(UofT毕业证)多伦多大学毕业证成绩单如何办理
一比一原版(UofT毕业证)多伦多大学毕业证成绩单如何办理
ydteq
 
ML for identifying fraud using open blockchain data.pptx
ML for identifying fraud using open blockchain data.pptxML for identifying fraud using open blockchain data.pptx
ML for identifying fraud using open blockchain data.pptx
Vijay Dialani, PhD
 
power quality voltage fluctuation UNIT - I.pptx
power quality voltage fluctuation UNIT - I.pptxpower quality voltage fluctuation UNIT - I.pptx
power quality voltage fluctuation UNIT - I.pptx
ViniHema
 
road safety engineering r s e unit 3.pdf
road safety engineering  r s e unit 3.pdfroad safety engineering  r s e unit 3.pdf
road safety engineering r s e unit 3.pdf
VENKATESHvenky89705
 
ASME IX(9) 2007 Full Version .pdf
ASME IX(9)  2007 Full Version       .pdfASME IX(9)  2007 Full Version       .pdf
ASME IX(9) 2007 Full Version .pdf
AhmedHussein950959
 
J.Yang, ICLR 2024, MLILAB, KAIST AI.pdf
J.Yang,  ICLR 2024, MLILAB, KAIST AI.pdfJ.Yang,  ICLR 2024, MLILAB, KAIST AI.pdf
J.Yang, ICLR 2024, MLILAB, KAIST AI.pdf
MLILAB
 
Investor-Presentation-Q1FY2024 investor presentation document.pptx
Investor-Presentation-Q1FY2024 investor presentation document.pptxInvestor-Presentation-Q1FY2024 investor presentation document.pptx
Investor-Presentation-Q1FY2024 investor presentation document.pptx
AmarGB2
 
Runway Orientation Based on the Wind Rose Diagram.pptx
Runway Orientation Based on the Wind Rose Diagram.pptxRunway Orientation Based on the Wind Rose Diagram.pptx
Runway Orientation Based on the Wind Rose Diagram.pptx
SupreethSP4
 
一比一原版(SFU毕业证)西蒙菲莎大学毕业证成绩单如何办理
一比一原版(SFU毕业证)西蒙菲莎大学毕业证成绩单如何办理一比一原版(SFU毕业证)西蒙菲莎大学毕业证成绩单如何办理
一比一原版(SFU毕业证)西蒙菲莎大学毕业证成绩单如何办理
bakpo1
 
Water Industry Process Automation and Control Monthly - May 2024.pdf
Water Industry Process Automation and Control Monthly - May 2024.pdfWater Industry Process Automation and Control Monthly - May 2024.pdf
Water Industry Process Automation and Control Monthly - May 2024.pdf
Water Industry Process Automation & Control
 
ethical hacking-mobile hacking methods.ppt
ethical hacking-mobile hacking methods.pptethical hacking-mobile hacking methods.ppt
ethical hacking-mobile hacking methods.ppt
Jayaprasanna4
 
RAT: Retrieval Augmented Thoughts Elicit Context-Aware Reasoning in Long-Hori...
RAT: Retrieval Augmented Thoughts Elicit Context-Aware Reasoning in Long-Hori...RAT: Retrieval Augmented Thoughts Elicit Context-Aware Reasoning in Long-Hori...
RAT: Retrieval Augmented Thoughts Elicit Context-Aware Reasoning in Long-Hori...
thanhdowork
 
CFD Simulation of By-pass Flow in a HRSG module by R&R Consult.pptx
CFD Simulation of By-pass Flow in a HRSG module by R&R Consult.pptxCFD Simulation of By-pass Flow in a HRSG module by R&R Consult.pptx
CFD Simulation of By-pass Flow in a HRSG module by R&R Consult.pptx
R&R Consult
 
MCQ Soil mechanics questions (Soil shear strength).pdf
MCQ Soil mechanics questions (Soil shear strength).pdfMCQ Soil mechanics questions (Soil shear strength).pdf
MCQ Soil mechanics questions (Soil shear strength).pdf
Osamah Alsalih
 
H.Seo, ICLR 2024, MLILAB, KAIST AI.pdf
H.Seo,  ICLR 2024, MLILAB,  KAIST AI.pdfH.Seo,  ICLR 2024, MLILAB,  KAIST AI.pdf
H.Seo, ICLR 2024, MLILAB, KAIST AI.pdf
MLILAB
 
Hybrid optimization of pumped hydro system and solar- Engr. Abdul-Azeez.pdf
Hybrid optimization of pumped hydro system and solar- Engr. Abdul-Azeez.pdfHybrid optimization of pumped hydro system and solar- Engr. Abdul-Azeez.pdf
Hybrid optimization of pumped hydro system and solar- Engr. Abdul-Azeez.pdf
fxintegritypublishin
 
The Benefits and Techniques of Trenchless Pipe Repair.pdf
The Benefits and Techniques of Trenchless Pipe Repair.pdfThe Benefits and Techniques of Trenchless Pipe Repair.pdf
The Benefits and Techniques of Trenchless Pipe Repair.pdf
Pipe Restoration Solutions
 
一比一原版(IIT毕业证)伊利诺伊理工大学毕业证成绩单专业办理
一比一原版(IIT毕业证)伊利诺伊理工大学毕业证成绩单专业办理一比一原版(IIT毕业证)伊利诺伊理工大学毕业证成绩单专业办理
一比一原版(IIT毕业证)伊利诺伊理工大学毕业证成绩单专业办理
zwunae
 
space technology lecture notes on satellite
space technology lecture notes on satellitespace technology lecture notes on satellite
space technology lecture notes on satellite
ongomchris
 
AP LAB PPT.pdf ap lab ppt no title specific
AP LAB PPT.pdf ap lab ppt no title specificAP LAB PPT.pdf ap lab ppt no title specific
AP LAB PPT.pdf ap lab ppt no title specific
BrazilAccount1
 

Recently uploaded (20)

一比一原版(UofT毕业证)多伦多大学毕业证成绩单如何办理
一比一原版(UofT毕业证)多伦多大学毕业证成绩单如何办理一比一原版(UofT毕业证)多伦多大学毕业证成绩单如何办理
一比一原版(UofT毕业证)多伦多大学毕业证成绩单如何办理
 
ML for identifying fraud using open blockchain data.pptx
ML for identifying fraud using open blockchain data.pptxML for identifying fraud using open blockchain data.pptx
ML for identifying fraud using open blockchain data.pptx
 
power quality voltage fluctuation UNIT - I.pptx
power quality voltage fluctuation UNIT - I.pptxpower quality voltage fluctuation UNIT - I.pptx
power quality voltage fluctuation UNIT - I.pptx
 
road safety engineering r s e unit 3.pdf
road safety engineering  r s e unit 3.pdfroad safety engineering  r s e unit 3.pdf
road safety engineering r s e unit 3.pdf
 
ASME IX(9) 2007 Full Version .pdf
ASME IX(9)  2007 Full Version       .pdfASME IX(9)  2007 Full Version       .pdf
ASME IX(9) 2007 Full Version .pdf
 
J.Yang, ICLR 2024, MLILAB, KAIST AI.pdf
J.Yang,  ICLR 2024, MLILAB, KAIST AI.pdfJ.Yang,  ICLR 2024, MLILAB, KAIST AI.pdf
J.Yang, ICLR 2024, MLILAB, KAIST AI.pdf
 
Investor-Presentation-Q1FY2024 investor presentation document.pptx
Investor-Presentation-Q1FY2024 investor presentation document.pptxInvestor-Presentation-Q1FY2024 investor presentation document.pptx
Investor-Presentation-Q1FY2024 investor presentation document.pptx
 
Runway Orientation Based on the Wind Rose Diagram.pptx
Runway Orientation Based on the Wind Rose Diagram.pptxRunway Orientation Based on the Wind Rose Diagram.pptx
Runway Orientation Based on the Wind Rose Diagram.pptx
 
一比一原版(SFU毕业证)西蒙菲莎大学毕业证成绩单如何办理
一比一原版(SFU毕业证)西蒙菲莎大学毕业证成绩单如何办理一比一原版(SFU毕业证)西蒙菲莎大学毕业证成绩单如何办理
一比一原版(SFU毕业证)西蒙菲莎大学毕业证成绩单如何办理
 
Water Industry Process Automation and Control Monthly - May 2024.pdf
Water Industry Process Automation and Control Monthly - May 2024.pdfWater Industry Process Automation and Control Monthly - May 2024.pdf
Water Industry Process Automation and Control Monthly - May 2024.pdf
 
ethical hacking-mobile hacking methods.ppt
ethical hacking-mobile hacking methods.pptethical hacking-mobile hacking methods.ppt
ethical hacking-mobile hacking methods.ppt
 
RAT: Retrieval Augmented Thoughts Elicit Context-Aware Reasoning in Long-Hori...
RAT: Retrieval Augmented Thoughts Elicit Context-Aware Reasoning in Long-Hori...RAT: Retrieval Augmented Thoughts Elicit Context-Aware Reasoning in Long-Hori...
RAT: Retrieval Augmented Thoughts Elicit Context-Aware Reasoning in Long-Hori...
 
CFD Simulation of By-pass Flow in a HRSG module by R&R Consult.pptx
CFD Simulation of By-pass Flow in a HRSG module by R&R Consult.pptxCFD Simulation of By-pass Flow in a HRSG module by R&R Consult.pptx
CFD Simulation of By-pass Flow in a HRSG module by R&R Consult.pptx
 
MCQ Soil mechanics questions (Soil shear strength).pdf
MCQ Soil mechanics questions (Soil shear strength).pdfMCQ Soil mechanics questions (Soil shear strength).pdf
MCQ Soil mechanics questions (Soil shear strength).pdf
 
H.Seo, ICLR 2024, MLILAB, KAIST AI.pdf
H.Seo,  ICLR 2024, MLILAB,  KAIST AI.pdfH.Seo,  ICLR 2024, MLILAB,  KAIST AI.pdf
H.Seo, ICLR 2024, MLILAB, KAIST AI.pdf
 
Hybrid optimization of pumped hydro system and solar- Engr. Abdul-Azeez.pdf
Hybrid optimization of pumped hydro system and solar- Engr. Abdul-Azeez.pdfHybrid optimization of pumped hydro system and solar- Engr. Abdul-Azeez.pdf
Hybrid optimization of pumped hydro system and solar- Engr. Abdul-Azeez.pdf
 
The Benefits and Techniques of Trenchless Pipe Repair.pdf
The Benefits and Techniques of Trenchless Pipe Repair.pdfThe Benefits and Techniques of Trenchless Pipe Repair.pdf
The Benefits and Techniques of Trenchless Pipe Repair.pdf
 
一比一原版(IIT毕业证)伊利诺伊理工大学毕业证成绩单专业办理
一比一原版(IIT毕业证)伊利诺伊理工大学毕业证成绩单专业办理一比一原版(IIT毕业证)伊利诺伊理工大学毕业证成绩单专业办理
一比一原版(IIT毕业证)伊利诺伊理工大学毕业证成绩单专业办理
 
space technology lecture notes on satellite
space technology lecture notes on satellitespace technology lecture notes on satellite
space technology lecture notes on satellite
 
AP LAB PPT.pdf ap lab ppt no title specific
AP LAB PPT.pdf ap lab ppt no title specificAP LAB PPT.pdf ap lab ppt no title specific
AP LAB PPT.pdf ap lab ppt no title specific
 

Number system and their conversion

  • 1. DEPARTMENT OF COMPUTER SCIENCE & APPLICATIONS BCA070 – DIGITAL ELECTRONICS By: Prof. Ram Pratap Singh
  • 2. Number System • Role of Numbers in Computer • Types of Number System  Binary Number system Decimal Number system Octal Number system Hexadecimal Number system
  • 3. Binary Number System: • A positional number system • Has only 2 symbols or digits (0 and 1). Hence its base = 2 • The maximum value of a single digit is 1 (one less than the value of the base) • Each position of a digit represents a specific power of the base (2) • This number system is used in computers Example 101012 (101100)2 111112 Bit • Bit stands for binary digit • A bit in computer terminology means either a 0 or a 1 • A binary number consisting of n bits is called an n-bit number Number System
  • 4. Number System Decimal Number System • A positional number system • Has 10 symbols or digits (0, 1, 2, 3, 4, 5, 6, 7, 8, 9). Hence, its base = 10 • The maximum value of a single digit is 9 (one less than the value of the base). • Each position of a digit represents a specific power of the base (10) • We use this number system in our day-to-day life Example- 258610 (2586)10 258610 = (2 x 103) + (5 x 102) + (8 x 101) + (6 x 100) = 2000 + 500 + 80 + 6
  • 5. Number System Octal Number System • A positional number system • Has total 8 symbols or digits (0, 1, 2, 3, 4, 5, 6, 7) Hence, its base = 8 • The maximum value of a single digit is 7 (one less than the value of the base • Each position of a digit represents a specific power of the base (8) Example- 15068 (2016)8
  • 6. Number System Hexadecimal Number System • A positional number system • Has total 16 symbols or digits (0, 1, 2, 3, 4, 5, 6, 7, 8, 9, A, B, C, D, E, F). Hence its base = 16 • The symbols A, B, C, D, E and F represent the decimal values 10, 11, 12, 13, 14 and 15 respectively • The maximum than the value of a single of the base) Example- 15A616 (FACE)16
  • 8. Number System System Base Symbols Used Humans Used Computer Used Binary 2 0 / 1 NO YES Decimal 10 0,1,2…..9 YES NO Octal 8 0,1,2…..7 NO NO Hexadecimal 16 0,1,2….9, A,B….F NO NO
  • 9. Conversions of Number System - : Possibilities: - Decimal OctalBinary Hexadecimal
  • 10. Conversions of Number System 12510 => Weight Base Binary to Decimal Rules  Multiply the each bit start from right to left most digit by its base value with the power of n, where n is the weight of the bit.  weight is just a position of a particular bit. Which counts from 0 to places at the end of right side.  And lastly we add the results. 5 x 100 = 5 2 x 101 = 20 1 x 102 = 100 125
  • 11. Conversions of Number System Example 1010112 => 1 x 20 = 1 1 x 21 = 2 0 x 22 = 0 1 x 23 = 8 0 x 24 = 0 1 x 25 = 32 4310 (101011)2 = (43)10
  • 12. Conversions of Number System Decimal to Binary  Divide the decimal number to be converted by 2.  Record the remainder.  the rightmost the new base digit (least significant digit) of number.  Divide the quotient of the previous divide by same base i.e. 2.  Record the remainder from above Step.  Recording remainders from right to left, until the quotient becomes zero.  Note that the last remainder thus new obtained will be the most significant digit (MSD) of the base number.
  • 13. Conversions of Number System Decimal to Binary Example: 12510 = ?2 2 125 62 1 2 15 1 2 31 0 2 7 12 3 12 1 12 0 1 LSB MSB 12510 = 11111012 Remainder
  • 14. Conversions of Number System Octal Binary Decimal Rules for Binary to Octal Numbers  First Divide all given binary digits in to pair of three starting from right to left most digit.  if there is any bit short then use zero’s to complete the pair of three as per above step.  Convert these individual pair of binary digits to its octal equivalent using binary to decimal process.
  • 15. Conversions of Number System Example: 11010102 = ?8  Divide the binary digits into groups of three from right. 1101010 001 101 010  Convert each group into one octal digit. 0012 1012 0102 = 0 x 22 + 0 x 21 + 1 x 20 1 x 22 + 0 x 21 + 1 x 20 0 x 22 + 1 x 21 + 0 x 20 = 0 + 0 + 1 4 + 0 + 1 0 + 2 + 0 = 1 5 2 (1101010)2 = (152)8
  • 16. Conversions of Number System 10110101112 = ?8 1 011 010 111 1 3 2 7 10110101112 = 13278 Cont.....
  • 17. Conversions of Number System HexadecimalBinary Rules for Binary to Hexadecimal Numbers  Group binary digits in to pair of Four starting from right to left most digit.  Convert these individual pair of binary digits to its Hexa equivalent using binary to decimal conversion process.
  • 18. Conversions of Number System Example: 11010102 = ?16  Divide the binary digits into groups of four from right. 01101010 0110 1010  Convert each group into one Hexa digit. 01102 10102 = 0 x 23 + 1 x 22 + 1 x 21 + 0 x 20 1 x 23 + 0 x 22 + 1 x 21 + 0 x 20 = 0 + 4 + 2 + 0 8 + 0 + 2 + 0 = 6 10 (1101010)2 = (6A)16
  • 19. Conversions of Number System 10101110112 = ?16 10 1011 1011 10101110112 = 2BB16 Cont..... 2 B B
  • 20. Conversions of Number System Converting a Decimal Number to a Number of Another Base Division-Remainder Method Step 1: Divide the decimal number to be converted by the value of the new base. Step 2: Record the remainder from Step 1 as the rightmost the new base digit (least significant digit) of number. Step 3: Divide the quotient of the previous divide by the new base . Step 4: Record the remainder from Step 3 as the next digit (to the left) of the new base number.  Repeat Steps 3 and 4, recording remainders from right to left, until the quotient becomes zero in Step 3  Note that the last remainder thus new obtained will be the most significant digit (MSD) of the base number
  • 21. Decimal to Octal Example 95210 = ?8 Solution: 8 952 Remainders 8 119 0 8 14 7 1 6 Hence, 95210 = 16708
  • 22. Decimal to Octal Example 123410 = ?8 Solution: 8 1234 Remainders 8 154 2 8 19 2 02 3 Hence, 123410 = 23228
  • 23. Octal to Decimal Converting a Number of Another Base to a Decimal Number Rules: Step 1: Determine the column (positional) value of each digit. Step 2: Multiply the obtained column values by the digits in the corresponding columns. Step 3: Calculate the sum of these products. Example: 47068 = ?10 47068 = 4 x 83 + 7 x 82 + 0 x 81 + 6 x 80 = 4 x 512 + 7 x 64 + 0 + 6 x 1 = 2048 + 448 + 0 + 6 = 250210
  • 24. Hexadecimal to Decimal Example: 47B16 = ?10 47B16 = 4 x 162 + 7 x 161 + 11 x 160 = 4 x 256 + 7 x 16 + 11 x 1 = 1024 + 112 + 11 = 114710 47B16 = 114710
  • 25. CONVERSION Converting a Number of Some Base to a Number of Another Base Example 5456 = ?4 Solution: Step 1: Convert from base 6 to base 10 5456 = 5 x 62 + 4 x 61 + 5 x 60 = 5 x 36 + 4 x 6 + 5 x 1 = 180 + 24 + 5 = 20910 Step 2: Convert 20910 to base 4 4 209 Remainder 4 52 1 4 13 0 4 3 1 0 3 Hence, 20910 = 31014 So, 5456 = 20910 = 31014 Thus, 5456 = 31014
  • 26. Conversions of Number System Octal to Binary Technique: Convert each octal digit to a 3-bit equivalent binary representation Example: 7058 = ?2 7 0 5 111 000 101 7058 = 1110001012
  • 27. Conversions of Number System Hexadecimal to Binary Technique: Convert each octal digit to a 4-bit equivalent binary representation Example: 70516 = ?2 7 0 5 0111 0000 0101 7058 = 0111000001012
  • 28. Hexadecimal to Binary Example: 10AF16 = ?2 1 0 A F 0001 0000 1010 1111 10AF16 = 00010000101011112
  • 29. Octal to Hexadecimal • Technique – Use binary as an intermediary Example: 10768 = ?16 1 0 7 6 001 000 111 110 2 3 E 10768 = 23E16
  • 30. Hexadecimal to Octal • Technique – Use binary as an intermediary Example: 1F0C16 = ?8 1 F 0 C 0001 1111 0000 1100 1 7 4 1 4 1F0C16 = 174148
  • 31. Conversions of Number System Fractions • Binary to decimal 10.1011 => 1 x 21 = 2.0 0 x 20 = 0.0 1 x 2-1 = 0.5 0 x 2-2 = 0.0 1 x 2-3 = 0.125 1 x 2-4 = 0.0625 (2.6875)10
  • 32. Conversions of Number System Fractions • Decimal to binary 3.14579 .14579 x 2 0.29158 x 2 0.58316 x 2 1.16632 x 2 0.33264 x 2 0.66528 x 2 1.33056 etc.11.001001...