SlideShare a Scribd company logo
1 of 16
Download to read offline
Lecture no : 11
Introduction to Computer/ Computer
Education
Mr. Muhammad Moazzam
MPhil Public Health
BSc BioMedical
University of the Lahore
Numbering System
Base Conversion
Number systems
• Decimal – 0, 1, 2, 3, 4, 5, 6, 7, 8, 9
• Binary – 0, 1
• Octal – 0, 1, 2, 3, 4, 5, 6, 7
• Hexadecimal system – 0, 1, 2, 3, 4, 5, 6, 7, 8,
9, A, B, C, D, E, F
• ASCII
Why different number systems?
• Binary number result in quite a long string of
0s and 1s
• Easier for the computer to interpret input
from the user
Base Conversion
• In daily life, we use decimal (base 10) number
system
• Computer can only read in 0 and 1
– Number system being used inside a computer is
binary (base 2)
– Octal (base 8) and hexadecimal (base 16) are used
in programming for convenience
Quantities/Counting (1 of 2)
Decimal Binary Octal
Hexa-
decimal
0 0 0 0
1 1 1 1
2 10 2 2
3 11 3 3
4 100 4 4
5 101 5 5
6 110 6 6
7 111 7 7
Quantities/Counting (2 of 2)
Decimal Binary Octal
Hexa-
decimal
8 1000 10 8
9 1001 11 9
10 1010 12 A
11 1011 13 B
12 1100 14 C
13 1101 15 D
14 1110 16 E
15 1111 17 F
Conversion Among Bases
• The possibilities:
Hexadecimal
Decimal Octal
Binary
Binary and decimal system
• Binary to decimal
– X^27 + X^26+ X^25+X ^ 24 + X ^ 23+ X ^ 22+ X ^ 21 + X ^20
• Decimal to binary
– Keep dividing the number by two and keep track
of the remainders.
– Arrange the remainders (0 or 1) from the least
significant (right) to most significant (left) digits
Octal and Hexadecimal system
• Binary to Octal (8 = 23)
– Every 3 binary digit equivalent to one octal digit
• Binary to Hexadecimal (16 = 24)
– Every 4 binary digit equivalent to one hexadecimal digit
• Octal to binary
– Every one octal digit equivalent to 3 binary digit
• Hexadecimal to binary
– Every one hexadecimal digit equivalent to 4 binary digits
Base Conversion
• How to convert the decimal number to other
number system
– e.g. convert 1810 in binary form
2 |18 ----0
2 |09 ----1
2 |04 ----0
2 |02 ----0
1
– 1810 = 100102
Exercise
1-Convert 10001000(2) to Decimal.
2-Convert 1000111.001(2) to Decimal.
3-Convert 6767(10) to Binary.
4-Convert 186(10) to Hexadecimal.
5-Convert 5BD(16) to Decimal.
6-Convert 16AC(16) to Binary.
7-Convert 10001110(2) to Hexadecimal.
8-Convert 196(10) to Octal.
Exercise
9-Convert 0216(8) to decimal.
10-Convert 0216(8) to binary.
11-726(8) to decimal.
12-27FB16 to octal.
13-(104)10 to binary
14-(AF)16 to decimal.
Base Conversion
For example:
62 = 111110 = 76 = 3E
decimal binary octal hexadecimal
1 For Decimal:
62 = 6x101 + 2x100
2 For Binary:
111110 = 1x25 + 1x24 + 1x23 + 1x22 + 1x21 + 0x20
3 For Octal:
76 = 7x81+ 6x80
4 For Hexadecimal:
3E = 3x161 + 14x160
• Since for hexadecimal system, each digit contains number from 1 to
15, thus we use A, B, C, D, E and F to represent 10, 11, 12, 13, 14
and 15.
Numbering System Base Conversion

More Related Content

What's hot

My lectures circular queue
My lectures circular queueMy lectures circular queue
My lectures circular queue
Senthil Kumar
 
Queue Implementation Using Array & Linked List
Queue Implementation Using Array & Linked ListQueue Implementation Using Array & Linked List
Queue Implementation Using Array & Linked List
PTCL
 
Finite automata examples
Finite automata examplesFinite automata examples
Finite automata examples
ankitamakin
 

What's hot (20)

Number system and their conversion
Number system and their conversionNumber system and their conversion
Number system and their conversion
 
My lectures circular queue
My lectures circular queueMy lectures circular queue
My lectures circular queue
 
Doubly linked list
Doubly linked listDoubly linked list
Doubly linked list
 
Lecture-2(2): Number System & Conversion
Lecture-2(2): Number System & ConversionLecture-2(2): Number System & Conversion
Lecture-2(2): Number System & Conversion
 
Quick sort
Quick sortQuick sort
Quick sort
 
Sr Latch or Flip Flop
Sr Latch or Flip FlopSr Latch or Flip Flop
Sr Latch or Flip Flop
 
Queue Implementation Using Array & Linked List
Queue Implementation Using Array & Linked ListQueue Implementation Using Array & Linked List
Queue Implementation Using Array & Linked List
 
Regular Expression to Finite Automata
Regular Expression to Finite AutomataRegular Expression to Finite Automata
Regular Expression to Finite Automata
 
Merge sort algorithm power point presentation
Merge sort algorithm power point presentationMerge sort algorithm power point presentation
Merge sort algorithm power point presentation
 
Infix to Postfix Conversion Using Stack
Infix to Postfix Conversion Using StackInfix to Postfix Conversion Using Stack
Infix to Postfix Conversion Using Stack
 
Stack using Array
Stack using ArrayStack using Array
Stack using Array
 
Stack
StackStack
Stack
 
Finite automata examples
Finite automata examplesFinite automata examples
Finite automata examples
 
3.5 merge sort
3.5 merge sort3.5 merge sort
3.5 merge sort
 
Marge Sort
Marge SortMarge Sort
Marge Sort
 
KARNAUGH MAP(K-MAP)
KARNAUGH MAP(K-MAP)KARNAUGH MAP(K-MAP)
KARNAUGH MAP(K-MAP)
 
Theory of computation Lec3 dfa
Theory of computation Lec3 dfaTheory of computation Lec3 dfa
Theory of computation Lec3 dfa
 
sorting and its types
sorting and its typessorting and its types
sorting and its types
 
Merge sort algorithm
Merge sort algorithmMerge sort algorithm
Merge sort algorithm
 
Stacks
StacksStacks
Stacks
 

Similar to Numbering System Base Conversion

Week 4-Number Systems.pptx
Week 4-Number Systems.pptxWeek 4-Number Systems.pptx
Week 4-Number Systems.pptx
HamnaKhalid25
 
Number System.pptx
Number System.pptxNumber System.pptx
Number System.pptx
Lovely Professional University
 
Numbersystem 130621192712-phpapp02
Numbersystem 130621192712-phpapp02Numbersystem 130621192712-phpapp02
Numbersystem 130621192712-phpapp02
muhammadsarab
 
Numbering system data representation
Numbering system data representationNumbering system data representation
Numbering system data representation
satonaka3
 

Similar to Numbering System Base Conversion (20)

Week 4-Number Systems.pptx
Week 4-Number Systems.pptxWeek 4-Number Systems.pptx
Week 4-Number Systems.pptx
 
1.Digital Electronics overview & Number Systems.pptx
1.Digital Electronics overview & Number Systems.pptx1.Digital Electronics overview & Number Systems.pptx
1.Digital Electronics overview & Number Systems.pptx
 
Number-Systems presentation of the mathematics
Number-Systems presentation of the mathematicsNumber-Systems presentation of the mathematics
Number-Systems presentation of the mathematics
 
Number system...this ppt specially help BTech 2nd year ECE department
Number system...this ppt specially help BTech 2nd year ECE departmentNumber system...this ppt specially help BTech 2nd year ECE department
Number system...this ppt specially help BTech 2nd year ECE department
 
Intro to IT Skills Lec 5 - English Department.pptx
Intro to IT Skills Lec 5 - English Department.pptxIntro to IT Skills Lec 5 - English Department.pptx
Intro to IT Skills Lec 5 - English Department.pptx
 
Number System.pptx
Number System.pptxNumber System.pptx
Number System.pptx
 
Numbersystem 130621192712-phpapp02
Numbersystem 130621192712-phpapp02Numbersystem 130621192712-phpapp02
Numbersystem 130621192712-phpapp02
 
Number system
Number systemNumber system
Number system
 
Digital logic -Number System Representation.pptx
Digital logic -Number System Representation.pptxDigital logic -Number System Representation.pptx
Digital logic -Number System Representation.pptx
 
Number system
Number systemNumber system
Number system
 
Numbersystemcont
NumbersystemcontNumbersystemcont
Numbersystemcont
 
Boolean Algebra Arithmetic SIG UNSIGN.ppt
Boolean Algebra  Arithmetic SIG UNSIGN.pptBoolean Algebra  Arithmetic SIG UNSIGN.ppt
Boolean Algebra Arithmetic SIG UNSIGN.ppt
 
Digital Electronics Notes.pdf
Digital Electronics Notes.pdfDigital Electronics Notes.pdf
Digital Electronics Notes.pdf
 
Numbering system data representation
Numbering system data representationNumbering system data representation
Numbering system data representation
 
Chapter 3.pptx
Chapter 3.pptxChapter 3.pptx
Chapter 3.pptx
 
Binary computing
Binary computingBinary computing
Binary computing
 
1. basic theories of information
1. basic theories of information1. basic theories of information
1. basic theories of information
 
Computer Number system
Computer Number systemComputer Number system
Computer Number system
 
numbersystem-211022083557.pdf
numbersystem-211022083557.pdfnumbersystem-211022083557.pdf
numbersystem-211022083557.pdf
 
Number System
Number SystemNumber System
Number System
 

More from The University of Lahore

More from The University of Lahore (17)

BioMedical Instrumentation-II Parts of centrifuge machine Centrifugation Tec...
BioMedical Instrumentation-II Parts of centrifuge machine  Centrifugation Tec...BioMedical Instrumentation-II Parts of centrifuge machine  Centrifugation Tec...
BioMedical Instrumentation-II Parts of centrifuge machine Centrifugation Tec...
 
BioMedical Instrumentation-II What is centrifugation? Basic principle of ce...
BioMedical Instrumentation-II What is  centrifugation? Basic principle of  ce...BioMedical Instrumentation-II What is  centrifugation? Basic principle of  ce...
BioMedical Instrumentation-II What is centrifugation? Basic principle of ce...
 
Boolean Algebra
Boolean AlgebraBoolean Algebra
Boolean Algebra
 
Storage Devices
Storage DevicesStorage Devices
Storage Devices
 
• Output Devices • Types of Output Devices • Dual Input– Output Devices
• Output Devices • Types of Output Devices • Dual Input– Output Devices• Output Devices • Types of Output Devices • Dual Input– Output Devices
• Output Devices • Types of Output Devices • Dual Input– Output Devices
 
• Input/output Devices • Input Devices • Types of Input Devices
• Input/output Devices • Input Devices • Types of Input Devices• Input/output Devices • Input Devices • Types of Input Devices
• Input/output Devices • Input Devices • Types of Input Devices
 
Components of Computer System
Components of Computer SystemComponents of Computer System
Components of Computer System
 
Languages in computer
Languages in computerLanguages in computer
Languages in computer
 
Classification of Computer
Classification of ComputerClassification of Computer
Classification of Computer
 
Classification of Computer
Classification of ComputerClassification of Computer
Classification of Computer
 
Types of Computer
Types of Computer Types of Computer
Types of Computer
 
Generations of Computer
Generations of Computer Generations of Computer
Generations of Computer
 
Computer and Examples , History of Computer
Computer and Examples , History of ComputerComputer and Examples , History of Computer
Computer and Examples , History of Computer
 
Rehabilitation Engineering
Rehabilitation Engineering Rehabilitation Engineering
Rehabilitation Engineering
 
Introduction to rehabilitation
Introduction to rehabilitationIntroduction to rehabilitation
Introduction to rehabilitation
 
2. levels of prevention
2. levels of prevention2. levels of prevention
2. levels of prevention
 
definitions of health& concept of disease
definitions of health& concept of diseasedefinitions of health& concept of disease
definitions of health& concept of disease
 

Recently uploaded

Standard vs Custom Battery Packs - Decoding the Power Play
Standard vs Custom Battery Packs - Decoding the Power PlayStandard vs Custom Battery Packs - Decoding the Power Play
Standard vs Custom Battery Packs - Decoding the Power Play
Epec Engineered Technologies
 
+97470301568>> buy weed in qatar,buy thc oil qatar,buy weed and vape oil in d...
+97470301568>> buy weed in qatar,buy thc oil qatar,buy weed and vape oil in d...+97470301568>> buy weed in qatar,buy thc oil qatar,buy weed and vape oil in d...
+97470301568>> buy weed in qatar,buy thc oil qatar,buy weed and vape oil in d...
Health
 
Cara Menggugurkan Sperma Yang Masuk Rahim Biyar Tidak Hamil
Cara Menggugurkan Sperma Yang Masuk Rahim Biyar Tidak HamilCara Menggugurkan Sperma Yang Masuk Rahim Biyar Tidak Hamil
Cara Menggugurkan Sperma Yang Masuk Rahim Biyar Tidak Hamil
Cara Menggugurkan Kandungan 087776558899
 
DeepFakes presentation : brief idea of DeepFakes
DeepFakes presentation : brief idea of DeepFakesDeepFakes presentation : brief idea of DeepFakes
DeepFakes presentation : brief idea of DeepFakes
MayuraD1
 

Recently uploaded (20)

Air Compressor reciprocating single stage
Air Compressor reciprocating single stageAir Compressor reciprocating single stage
Air Compressor reciprocating single stage
 
Tamil Call Girls Bhayandar WhatsApp +91-9930687706, Best Service
Tamil Call Girls Bhayandar WhatsApp +91-9930687706, Best ServiceTamil Call Girls Bhayandar WhatsApp +91-9930687706, Best Service
Tamil Call Girls Bhayandar WhatsApp +91-9930687706, Best Service
 
Standard vs Custom Battery Packs - Decoding the Power Play
Standard vs Custom Battery Packs - Decoding the Power PlayStandard vs Custom Battery Packs - Decoding the Power Play
Standard vs Custom Battery Packs - Decoding the Power Play
 
+97470301568>> buy weed in qatar,buy thc oil qatar,buy weed and vape oil in d...
+97470301568>> buy weed in qatar,buy thc oil qatar,buy weed and vape oil in d...+97470301568>> buy weed in qatar,buy thc oil qatar,buy weed and vape oil in d...
+97470301568>> buy weed in qatar,buy thc oil qatar,buy weed and vape oil in d...
 
Online electricity billing project report..pdf
Online electricity billing project report..pdfOnline electricity billing project report..pdf
Online electricity billing project report..pdf
 
Hostel management system project report..pdf
Hostel management system project report..pdfHostel management system project report..pdf
Hostel management system project report..pdf
 
Minimum and Maximum Modes of microprocessor 8086
Minimum and Maximum Modes of microprocessor 8086Minimum and Maximum Modes of microprocessor 8086
Minimum and Maximum Modes of microprocessor 8086
 
Computer Networks Basics of Network Devices
Computer Networks  Basics of Network DevicesComputer Networks  Basics of Network Devices
Computer Networks Basics of Network Devices
 
Cara Menggugurkan Sperma Yang Masuk Rahim Biyar Tidak Hamil
Cara Menggugurkan Sperma Yang Masuk Rahim Biyar Tidak HamilCara Menggugurkan Sperma Yang Masuk Rahim Biyar Tidak Hamil
Cara Menggugurkan Sperma Yang Masuk Rahim Biyar Tidak Hamil
 
data_management_and _data_science_cheat_sheet.pdf
data_management_and _data_science_cheat_sheet.pdfdata_management_and _data_science_cheat_sheet.pdf
data_management_and _data_science_cheat_sheet.pdf
 
Block diagram reduction techniques in control systems.ppt
Block diagram reduction techniques in control systems.pptBlock diagram reduction techniques in control systems.ppt
Block diagram reduction techniques in control systems.ppt
 
Rums floating Omkareshwar FSPV IM_16112021.pdf
Rums floating Omkareshwar FSPV IM_16112021.pdfRums floating Omkareshwar FSPV IM_16112021.pdf
Rums floating Omkareshwar FSPV IM_16112021.pdf
 
Thermal Engineering Unit - I & II . ppt
Thermal Engineering  Unit - I & II . pptThermal Engineering  Unit - I & II . ppt
Thermal Engineering Unit - I & II . ppt
 
Introduction to Serverless with AWS Lambda
Introduction to Serverless with AWS LambdaIntroduction to Serverless with AWS Lambda
Introduction to Serverless with AWS Lambda
 
School management system project Report.pdf
School management system project Report.pdfSchool management system project Report.pdf
School management system project Report.pdf
 
DC MACHINE-Motoring and generation, Armature circuit equation
DC MACHINE-Motoring and generation, Armature circuit equationDC MACHINE-Motoring and generation, Armature circuit equation
DC MACHINE-Motoring and generation, Armature circuit equation
 
Bridge Jacking Design Sample Calculation.pptx
Bridge Jacking Design Sample Calculation.pptxBridge Jacking Design Sample Calculation.pptx
Bridge Jacking Design Sample Calculation.pptx
 
kiln thermal load.pptx kiln tgermal load
kiln thermal load.pptx kiln tgermal loadkiln thermal load.pptx kiln tgermal load
kiln thermal load.pptx kiln tgermal load
 
DeepFakes presentation : brief idea of DeepFakes
DeepFakes presentation : brief idea of DeepFakesDeepFakes presentation : brief idea of DeepFakes
DeepFakes presentation : brief idea of DeepFakes
 
Employee leave management system project.
Employee leave management system project.Employee leave management system project.
Employee leave management system project.
 

Numbering System Base Conversion

  • 1. Lecture no : 11 Introduction to Computer/ Computer Education Mr. Muhammad Moazzam MPhil Public Health BSc BioMedical University of the Lahore
  • 3. Number systems • Decimal – 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 • Binary – 0, 1 • Octal – 0, 1, 2, 3, 4, 5, 6, 7 • Hexadecimal system – 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, A, B, C, D, E, F • ASCII
  • 4. Why different number systems? • Binary number result in quite a long string of 0s and 1s • Easier for the computer to interpret input from the user
  • 5. Base Conversion • In daily life, we use decimal (base 10) number system • Computer can only read in 0 and 1 – Number system being used inside a computer is binary (base 2) – Octal (base 8) and hexadecimal (base 16) are used in programming for convenience
  • 6.
  • 7. Quantities/Counting (1 of 2) Decimal Binary Octal Hexa- decimal 0 0 0 0 1 1 1 1 2 10 2 2 3 11 3 3 4 100 4 4 5 101 5 5 6 110 6 6 7 111 7 7
  • 8. Quantities/Counting (2 of 2) Decimal Binary Octal Hexa- decimal 8 1000 10 8 9 1001 11 9 10 1010 12 A 11 1011 13 B 12 1100 14 C 13 1101 15 D 14 1110 16 E 15 1111 17 F
  • 9. Conversion Among Bases • The possibilities: Hexadecimal Decimal Octal Binary
  • 10. Binary and decimal system • Binary to decimal – X^27 + X^26+ X^25+X ^ 24 + X ^ 23+ X ^ 22+ X ^ 21 + X ^20 • Decimal to binary – Keep dividing the number by two and keep track of the remainders. – Arrange the remainders (0 or 1) from the least significant (right) to most significant (left) digits
  • 11. Octal and Hexadecimal system • Binary to Octal (8 = 23) – Every 3 binary digit equivalent to one octal digit • Binary to Hexadecimal (16 = 24) – Every 4 binary digit equivalent to one hexadecimal digit • Octal to binary – Every one octal digit equivalent to 3 binary digit • Hexadecimal to binary – Every one hexadecimal digit equivalent to 4 binary digits
  • 12. Base Conversion • How to convert the decimal number to other number system – e.g. convert 1810 in binary form 2 |18 ----0 2 |09 ----1 2 |04 ----0 2 |02 ----0 1 – 1810 = 100102
  • 13. Exercise 1-Convert 10001000(2) to Decimal. 2-Convert 1000111.001(2) to Decimal. 3-Convert 6767(10) to Binary. 4-Convert 186(10) to Hexadecimal. 5-Convert 5BD(16) to Decimal. 6-Convert 16AC(16) to Binary. 7-Convert 10001110(2) to Hexadecimal. 8-Convert 196(10) to Octal.
  • 14. Exercise 9-Convert 0216(8) to decimal. 10-Convert 0216(8) to binary. 11-726(8) to decimal. 12-27FB16 to octal. 13-(104)10 to binary 14-(AF)16 to decimal.
  • 15. Base Conversion For example: 62 = 111110 = 76 = 3E decimal binary octal hexadecimal 1 For Decimal: 62 = 6x101 + 2x100 2 For Binary: 111110 = 1x25 + 1x24 + 1x23 + 1x22 + 1x21 + 0x20 3 For Octal: 76 = 7x81+ 6x80 4 For Hexadecimal: 3E = 3x161 + 14x160 • Since for hexadecimal system, each digit contains number from 1 to 15, thus we use A, B, C, D, E and F to represent 10, 11, 12, 13, 14 and 15.