SlideShare a Scribd company logo
1 of 40
Download to read offline
NUMBER SYSTEMS & DATA
REPRESENTATIONS
FUNDAMENTALS OF COMPUTER & PROGRAMMING (COMP 1)
PREPARED BY: PHILLIP GLENN LIBAY
NUMBER SYSTEM
NUMBER SYSTEM
Is a method of expressing values, using a set of symbols in a
consistent manner.
Several number systems has been used in the past which can be
categorized into two (2): positional and non-positional number
systems.
POSITIONAL NUMBER SYSTEM
POSITIONAL NUMBER SYSTEM
In a positional number system, the position the symbol occupies
determines the value it represents, thus, it is also often called the
PLACE VALUE system.
HOW DOES IT WORKS?
If number is represented as:
± 𝒔𝒏−𝟏 ⋯ 𝒔𝟏 𝒔𝟎 . 𝒔−𝟏 𝒔−𝟐 ⋯ 𝒃
Then it has the value of:
𝒗 = ± 𝒔𝒏−𝟏 × 𝒃𝒏−𝟏 + ⋯ + 𝒔𝟏 × 𝒃𝟏 + 𝒔𝟎 × 𝒃𝟎 + 𝒔−𝟏 × 𝒃−𝟏 + 𝒔−𝟐 × 𝒃−𝟐 + ⋯
DECIMAL number system
DECIMAL NUMBER SYSTEM
• Is a number system with the base of 10.
• It uses ten (10) unique symbols to represent values.
0 1 2 3 4 5 6 7 8 9
1. 𝟏𝟐𝟑𝟏𝟎
• n = 3, b = 10
• 1 × 102 + 2 × 101 + 3 × 100
• 1 × 100 + 2 × 10 + (3 × 1)
• 100 + 20 + 3
• The equivalent decimal number is One Hundred Twenty
Example 1.a - Decimal Number System, Positional Values
BINARY number system
BINARY NUMBER SYSTEM
• Is a number system with the base of 2.
• It uses two (2) unique symbols to represent values.
0 1
1. 𝟏𝟎𝟎𝟏𝟐
• n = 4, b = 2
• 1 × 23 + 0 × 22 + 0 × 21 + 1 × 20
• 1 × 8 + 0 × 4 + 0 × 2 + (1 × 1)
• 8 + 0 + 0 + 1
• The equivalent decimal number is Nine
Example 1.b - Binary Number System, Positional Values
OCTAL number system
OCTAL NUMBER SYSTEM
• Is a number system with the base of 8.
• It uses eight (8) unique symbols to represent values.
0 1 2 3 4 5 6 7
1. 𝟏𝟐𝟕𝟖
• n = 3, b = 8
• 1 × 82 + 2 × 81 + 7 × 80
• 1 × 64 + 2 × 8 + 7 × 1
• 64 + 16 + 7
• So the equivalent decimal number is Eighty Seven
Example 1.c - Octal Number System, Positional Values
HEXADECIMAL number system
HEXADECIMAL NUMBER SYSTEM
• Is a number system with the base of 16.
• It uses sixteen (16) unique symbols to represent values.
0 1 2 3 4 5 6 7 8 9 A B C D E F
1. 𝑨𝟏𝟗𝟏𝟔
• n = 3, b = 16
• 𝐴 × 162 + 1 × 161 + 9 × 160
• 10 × 256 + 1 × 16 + 9 × 1
• 256 + 16 + 9
• So the equivalent decimal number is Two Hundred Eighty
Example 1.d - Hexadecimal Number System, Positional Values
Decimal Binary Octal Hexadecimal
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 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
DECIMAL to BASE n conversions
START
Create an empty destination
(v).
Divide the source (s) by the
destination base (b).
Insert the remainder at the
destination (v).
STOP
The quotient becomes the
new source (s).
TRUE
FALSE
Condition: Is the quotient zero?
Given:
s = Source Number
b = Destination Base
Return:
v = Destination Value
Figure 1.a - Conversion from Decimal to any Base (Integral Part)
DECIMAL TO BINARY conversion
INTEGRAL VALUES
Convert the number 𝟏𝟑𝟏𝟎 to binary.
Results: 𝟏𝟑𝟏𝟎 = 𝟏𝟏𝟎𝟏𝟐
Example 1.e - Decimal to Binary Conversion (IntegralValues)
13
6
1 3
0
1
0
1
1
Source
Destination
DECIMAL TO OCTAL conversion
INTEGRAL VALUES
Example 1.f - Decimal to Octal Conversion (IntegralValues)
Convert the number 𝟏𝟐𝟔𝟏𝟎 to octal.
Results: 𝟏𝟐𝟔𝟏𝟎 = 𝟏𝟕𝟔𝟖
126
15
0 1
6
7
1
Source
Destination
DECIMAL TO HEXADECIMAL conversion
INTEGRAL VALUES
Example 1.g - Decimal to Hexadecimal Conversion (IntegralValues)
Convert the number 𝟏𝟐𝟔𝟏𝟎 to octal.
Results: 𝟏𝟐𝟔𝟏𝟎 = 𝟕𝑬𝟏𝟔
126
7
0
E
7
Source
Destination
START
Create an empty destination
(v).
Multiply the source (s) by the
destination base (b).
Insert the integral part at the
destination (v).
STOP
The fractional part becomes
the new source (s).
TRUE
FALSE
Condition: Is the fractional part zero?
Given:
s = Source Number
b = Destination Base
Return:
v = Destination Value
Figure 1.b - Conversion from Decimal to any Base (Fractional Part)
DECIMAL TO BINARY conversion
FRACTIONAL VALUES
Convert 0.62510 to Binary.
Results: 𝟎. 𝟔𝟐𝟓𝟏𝟎 = 𝟎. 𝟏𝟎𝟏𝟐
Example 1.h - Decimal to Binary Conversion (FractionalValues)
0.625 0.25 0.50 0.00
1 0 1
DECIMAL TO OCTAL conversion
FRACTIONAL VALUES
Convert 𝟎. 𝟔𝟑𝟒𝟏𝟎 to Octal.
Results: 𝟎. 𝟔𝟑𝟒𝟏𝟎 = 𝟎. 𝟓𝟎𝟒𝟖
Example 1.h - Decimal to Octal Conversion (FractionalValues)
0.634 0.072 0.576 0.608
5 0 4
DECIMAL TO HEXADECIMAL conversion
FRACTIONAL VALUES
Convert 𝟎. 𝟔𝟒𝟏𝟎 to Hexadecimal.
Results: 𝟎. 𝟔𝟒𝟏𝟎 = 𝟎. 𝑨𝟑𝑫𝟏𝟔
Example 1.h - Decimal to Hexadecimal Conversion (FractionalValues)
0.64 0.24 0.84 0.44
A 3 D
BINARY to OCTAL conversion
𝑩𝒊 Binary Digit
𝑶𝒊 Octal Digit
Figure 1.c - Binary to Octal Conversion
𝐵𝑚 𝐵𝑚−1 𝐵𝑚−2 𝐵5 𝐵4 𝐵3 𝐵2 𝐵1 𝐵0
…
𝑂𝑚
𝑂1 𝑂0
BINARY to HEXADECIMAL conversion
𝑩𝒊 Binary Digit
𝑯𝒊 Octal Digit
𝐵𝑚 𝐵𝑚−1 𝐵𝑚−2 𝐵𝑚−3 𝐵7 𝐵6 𝐵5 𝐵4 𝐵3 𝐵2 𝐵1 𝐵0
…
𝐻𝑚
𝐻1 𝐻0
OCTAL to HEXADECIMAL conversion
𝐻2 𝐻1 𝐻0
1 0 0 1 1 0 1 0 1 0 1 0
𝑂3 𝑂2 𝑂1 𝑂0

More Related Content

Similar to 1b-150720094704-lva1-app6892.pdf

Number system....
Number system....Number system....
Number system....
mshoaib15
 
Lesson 1 basic theory of information
Lesson 1   basic theory of informationLesson 1   basic theory of information
Lesson 1 basic theory of information
Roma Kimberly Erolin
 
Lesson 1 basic theory of information
Lesson 1   basic theory of informationLesson 1   basic theory of information
Lesson 1 basic theory of information
Roma Kimberly Erolin
 
Number System.pptx
Number System.pptxNumber System.pptx
Number System.pptx
Lovely Professional University
 

Similar to 1b-150720094704-lva1-app6892.pdf (20)

Digital Electronics Notes.pdf
Digital Electronics Notes.pdfDigital Electronics Notes.pdf
Digital Electronics Notes.pdf
 
JPC#8 Foundation of Computer Science
JPC#8 Foundation of Computer ScienceJPC#8 Foundation of Computer Science
JPC#8 Foundation of Computer Science
 
Chapter two FHI.pptx
Chapter two FHI.pptxChapter two FHI.pptx
Chapter two FHI.pptx
 
Chapter 2.1 introduction to number system
Chapter 2.1 introduction to number systemChapter 2.1 introduction to number system
Chapter 2.1 introduction to number system
 
W2 Chapter 2A Notes CCB1223 Digital Logic.pdf
W2 Chapter 2A Notes CCB1223 Digital Logic.pdfW2 Chapter 2A Notes CCB1223 Digital Logic.pdf
W2 Chapter 2A Notes CCB1223 Digital Logic.pdf
 
Lecture 2 ns
Lecture 2 nsLecture 2 ns
Lecture 2 ns
 
number system
number systemnumber system
number system
 
Number system....
Number system....Number system....
Number system....
 
005618132.pdf
005618132.pdf005618132.pdf
005618132.pdf
 
data representation
 data representation data representation
data representation
 
Lec 02
Lec 02Lec 02
Lec 02
 
Lesson 1 basic theory of information
Lesson 1   basic theory of informationLesson 1   basic theory of information
Lesson 1 basic theory of information
 
Lesson 1 basic theory of information
Lesson 1   basic theory of informationLesson 1   basic theory of information
Lesson 1 basic theory of information
 
Number system and their conversion
Number system and their conversionNumber system and their conversion
Number system and their conversion
 
Chapter 1
Chapter   1Chapter   1
Chapter 1
 
CDS Fundamentals of digital communication system UNIT 1 AND 2.pdf
CDS Fundamentals of digital communication system UNIT 1 AND 2.pdfCDS Fundamentals of digital communication system UNIT 1 AND 2.pdf
CDS Fundamentals of digital communication system UNIT 1 AND 2.pdf
 
Number System.pptx
Number System.pptxNumber System.pptx
Number System.pptx
 
Cit 1101 lec 02
Cit 1101 lec 02Cit 1101 lec 02
Cit 1101 lec 02
 
Lecture 1 PPT Number systems & conversions part.pptx
Lecture 1 PPT Number systems & conversions part.pptxLecture 1 PPT Number systems & conversions part.pptx
Lecture 1 PPT Number systems & conversions part.pptx
 
uyuyuy.pdf
uyuyuy.pdfuyuyuy.pdf
uyuyuy.pdf
 

More from DrBashirMSaad (11)

DS basics functions.ppt
DS basics functions.pptDS basics functions.ppt
DS basics functions.ppt
 
Algorithm analysis.pptx
Algorithm analysis.pptxAlgorithm analysis.pptx
Algorithm analysis.pptx
 
Searching Informed Search.pdf
Searching Informed Search.pdfSearching Informed Search.pdf
Searching Informed Search.pdf
 
procress and threads.ppt
procress and threads.pptprocress and threads.ppt
procress and threads.ppt
 
2.02.Data_structures_and_algorithms (1).pptx
2.02.Data_structures_and_algorithms (1).pptx2.02.Data_structures_and_algorithms (1).pptx
2.02.Data_structures_and_algorithms (1).pptx
 
01_intro-cpp.ppt
01_intro-cpp.ppt01_intro-cpp.ppt
01_intro-cpp.ppt
 
Lecture 7-BinarySearchTrees.ppt
Lecture 7-BinarySearchTrees.pptLecture 7-BinarySearchTrees.ppt
Lecture 7-BinarySearchTrees.ppt
 
lec06-programming.ppt
lec06-programming.pptlec06-programming.ppt
lec06-programming.ppt
 
CS351-L1.ppt
CS351-L1.pptCS351-L1.ppt
CS351-L1.ppt
 
Matlab_Simulink_Tutorial.ppt
Matlab_Simulink_Tutorial.pptMatlab_Simulink_Tutorial.ppt
Matlab_Simulink_Tutorial.ppt
 
002 AWSSlides.pdf
002 AWSSlides.pdf002 AWSSlides.pdf
002 AWSSlides.pdf
 

Recently uploaded

FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756
FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756
FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756
dollysharma2066
 
AKTU Computer Networks notes --- Unit 3.pdf
AKTU Computer Networks notes ---  Unit 3.pdfAKTU Computer Networks notes ---  Unit 3.pdf
AKTU Computer Networks notes --- Unit 3.pdf
ankushspencer015
 
Call Now ≽ 9953056974 ≼🔝 Call Girls In New Ashok Nagar ≼🔝 Delhi door step de...
Call Now ≽ 9953056974 ≼🔝 Call Girls In New Ashok Nagar  ≼🔝 Delhi door step de...Call Now ≽ 9953056974 ≼🔝 Call Girls In New Ashok Nagar  ≼🔝 Delhi door step de...
Call Now ≽ 9953056974 ≼🔝 Call Girls In New Ashok Nagar ≼🔝 Delhi door step de...
9953056974 Low Rate Call Girls In Saket, Delhi NCR
 
Call Girls in Ramesh Nagar Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
Call Girls in Ramesh Nagar Delhi 💯 Call Us 🔝9953056974 🔝 Escort ServiceCall Girls in Ramesh Nagar Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
Call Girls in Ramesh Nagar Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
9953056974 Low Rate Call Girls In Saket, Delhi NCR
 
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
ssuser89054b
 

Recently uploaded (20)

Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...
Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...
Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...
 
chapter 5.pptx: drainage and irrigation engineering
chapter 5.pptx: drainage and irrigation engineeringchapter 5.pptx: drainage and irrigation engineering
chapter 5.pptx: drainage and irrigation engineering
 
PVC VS. FIBERGLASS (FRP) GRAVITY SEWER - UNI BELL
PVC VS. FIBERGLASS (FRP) GRAVITY SEWER - UNI BELLPVC VS. FIBERGLASS (FRP) GRAVITY SEWER - UNI BELL
PVC VS. FIBERGLASS (FRP) GRAVITY SEWER - UNI BELL
 
FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756
FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756
FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756
 
AKTU Computer Networks notes --- Unit 3.pdf
AKTU Computer Networks notes ---  Unit 3.pdfAKTU Computer Networks notes ---  Unit 3.pdf
AKTU Computer Networks notes --- Unit 3.pdf
 
Unleashing the Power of the SORA AI lastest leap
Unleashing the Power of the SORA AI lastest leapUnleashing the Power of the SORA AI lastest leap
Unleashing the Power of the SORA AI lastest leap
 
Call Girls Walvekar Nagar Call Me 7737669865 Budget Friendly No Advance Booking
Call Girls Walvekar Nagar Call Me 7737669865 Budget Friendly No Advance BookingCall Girls Walvekar Nagar Call Me 7737669865 Budget Friendly No Advance Booking
Call Girls Walvekar Nagar Call Me 7737669865 Budget Friendly No Advance Booking
 
VIP Model Call Girls Kothrud ( Pune ) Call ON 8005736733 Starting From 5K to ...
VIP Model Call Girls Kothrud ( Pune ) Call ON 8005736733 Starting From 5K to ...VIP Model Call Girls Kothrud ( Pune ) Call ON 8005736733 Starting From 5K to ...
VIP Model Call Girls Kothrud ( Pune ) Call ON 8005736733 Starting From 5K to ...
 
Call Now ≽ 9953056974 ≼🔝 Call Girls In New Ashok Nagar ≼🔝 Delhi door step de...
Call Now ≽ 9953056974 ≼🔝 Call Girls In New Ashok Nagar  ≼🔝 Delhi door step de...Call Now ≽ 9953056974 ≼🔝 Call Girls In New Ashok Nagar  ≼🔝 Delhi door step de...
Call Now ≽ 9953056974 ≼🔝 Call Girls In New Ashok Nagar ≼🔝 Delhi door step de...
 
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete Record
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete RecordCCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete Record
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete Record
 
Call Girls in Ramesh Nagar Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
Call Girls in Ramesh Nagar Delhi 💯 Call Us 🔝9953056974 🔝 Escort ServiceCall Girls in Ramesh Nagar Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
Call Girls in Ramesh Nagar Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
 
Intze Overhead Water Tank Design by Working Stress - IS Method.pdf
Intze Overhead Water Tank  Design by Working Stress - IS Method.pdfIntze Overhead Water Tank  Design by Working Stress - IS Method.pdf
Intze Overhead Water Tank Design by Working Stress - IS Method.pdf
 
Thermal Engineering -unit - III & IV.ppt
Thermal Engineering -unit - III & IV.pptThermal Engineering -unit - III & IV.ppt
Thermal Engineering -unit - III & IV.ppt
 
Top Rated Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
Top Rated  Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...Top Rated  Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
Top Rated Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
 
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
 
Bhosari ( Call Girls ) Pune 6297143586 Hot Model With Sexy Bhabi Ready For ...
Bhosari ( Call Girls ) Pune  6297143586  Hot Model With Sexy Bhabi Ready For ...Bhosari ( Call Girls ) Pune  6297143586  Hot Model With Sexy Bhabi Ready For ...
Bhosari ( Call Girls ) Pune 6297143586 Hot Model With Sexy Bhabi Ready For ...
 
Double rodded leveling 1 pdf activity 01
Double rodded leveling 1 pdf activity 01Double rodded leveling 1 pdf activity 01
Double rodded leveling 1 pdf activity 01
 
Roadmap to Membership of RICS - Pathways and Routes
Roadmap to Membership of RICS - Pathways and RoutesRoadmap to Membership of RICS - Pathways and Routes
Roadmap to Membership of RICS - Pathways and Routes
 
Thermal Engineering-R & A / C - unit - V
Thermal Engineering-R & A / C - unit - VThermal Engineering-R & A / C - unit - V
Thermal Engineering-R & A / C - unit - V
 
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
 

1b-150720094704-lva1-app6892.pdf

  • 1. NUMBER SYSTEMS & DATA REPRESENTATIONS FUNDAMENTALS OF COMPUTER & PROGRAMMING (COMP 1) PREPARED BY: PHILLIP GLENN LIBAY
  • 3. NUMBER SYSTEM Is a method of expressing values, using a set of symbols in a consistent manner. Several number systems has been used in the past which can be categorized into two (2): positional and non-positional number systems.
  • 5. POSITIONAL NUMBER SYSTEM In a positional number system, the position the symbol occupies determines the value it represents, thus, it is also often called the PLACE VALUE system.
  • 6. HOW DOES IT WORKS? If number is represented as: ± 𝒔𝒏−𝟏 ⋯ 𝒔𝟏 𝒔𝟎 . 𝒔−𝟏 𝒔−𝟐 ⋯ 𝒃 Then it has the value of: 𝒗 = ± 𝒔𝒏−𝟏 × 𝒃𝒏−𝟏 + ⋯ + 𝒔𝟏 × 𝒃𝟏 + 𝒔𝟎 × 𝒃𝟎 + 𝒔−𝟏 × 𝒃−𝟏 + 𝒔−𝟐 × 𝒃−𝟐 + ⋯
  • 8. DECIMAL NUMBER SYSTEM • Is a number system with the base of 10. • It uses ten (10) unique symbols to represent values. 0 1 2 3 4 5 6 7 8 9
  • 9. 1. 𝟏𝟐𝟑𝟏𝟎 • n = 3, b = 10 • 1 × 102 + 2 × 101 + 3 × 100 • 1 × 100 + 2 × 10 + (3 × 1) • 100 + 20 + 3 • The equivalent decimal number is One Hundred Twenty Example 1.a - Decimal Number System, Positional Values
  • 11. BINARY NUMBER SYSTEM • Is a number system with the base of 2. • It uses two (2) unique symbols to represent values. 0 1
  • 12. 1. 𝟏𝟎𝟎𝟏𝟐 • n = 4, b = 2 • 1 × 23 + 0 × 22 + 0 × 21 + 1 × 20 • 1 × 8 + 0 × 4 + 0 × 2 + (1 × 1) • 8 + 0 + 0 + 1 • The equivalent decimal number is Nine Example 1.b - Binary Number System, Positional Values
  • 14. OCTAL NUMBER SYSTEM • Is a number system with the base of 8. • It uses eight (8) unique symbols to represent values. 0 1 2 3 4 5 6 7
  • 15. 1. 𝟏𝟐𝟕𝟖 • n = 3, b = 8 • 1 × 82 + 2 × 81 + 7 × 80 • 1 × 64 + 2 × 8 + 7 × 1 • 64 + 16 + 7 • So the equivalent decimal number is Eighty Seven Example 1.c - Octal Number System, Positional Values
  • 17. HEXADECIMAL NUMBER SYSTEM • Is a number system with the base of 16. • It uses sixteen (16) unique symbols to represent values. 0 1 2 3 4 5 6 7 8 9 A B C D E F
  • 18. 1. 𝑨𝟏𝟗𝟏𝟔 • n = 3, b = 16 • 𝐴 × 162 + 1 × 161 + 9 × 160 • 10 × 256 + 1 × 16 + 9 × 1 • 256 + 16 + 9 • So the equivalent decimal number is Two Hundred Eighty Example 1.d - Hexadecimal Number System, Positional Values
  • 19. Decimal Binary Octal Hexadecimal 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 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
  • 20. DECIMAL to BASE n conversions
  • 21. START Create an empty destination (v). Divide the source (s) by the destination base (b). Insert the remainder at the destination (v). STOP The quotient becomes the new source (s). TRUE FALSE Condition: Is the quotient zero? Given: s = Source Number b = Destination Base Return: v = Destination Value Figure 1.a - Conversion from Decimal to any Base (Integral Part)
  • 22. DECIMAL TO BINARY conversion INTEGRAL VALUES
  • 23. Convert the number 𝟏𝟑𝟏𝟎 to binary. Results: 𝟏𝟑𝟏𝟎 = 𝟏𝟏𝟎𝟏𝟐 Example 1.e - Decimal to Binary Conversion (IntegralValues) 13 6 1 3 0 1 0 1 1 Source Destination
  • 24. DECIMAL TO OCTAL conversion INTEGRAL VALUES
  • 25. Example 1.f - Decimal to Octal Conversion (IntegralValues) Convert the number 𝟏𝟐𝟔𝟏𝟎 to octal. Results: 𝟏𝟐𝟔𝟏𝟎 = 𝟏𝟕𝟔𝟖 126 15 0 1 6 7 1 Source Destination
  • 26. DECIMAL TO HEXADECIMAL conversion INTEGRAL VALUES
  • 27. Example 1.g - Decimal to Hexadecimal Conversion (IntegralValues) Convert the number 𝟏𝟐𝟔𝟏𝟎 to octal. Results: 𝟏𝟐𝟔𝟏𝟎 = 𝟕𝑬𝟏𝟔 126 7 0 E 7 Source Destination
  • 28. START Create an empty destination (v). Multiply the source (s) by the destination base (b). Insert the integral part at the destination (v). STOP The fractional part becomes the new source (s). TRUE FALSE Condition: Is the fractional part zero? Given: s = Source Number b = Destination Base Return: v = Destination Value Figure 1.b - Conversion from Decimal to any Base (Fractional Part)
  • 29. DECIMAL TO BINARY conversion FRACTIONAL VALUES
  • 30. Convert 0.62510 to Binary. Results: 𝟎. 𝟔𝟐𝟓𝟏𝟎 = 𝟎. 𝟏𝟎𝟏𝟐 Example 1.h - Decimal to Binary Conversion (FractionalValues) 0.625 0.25 0.50 0.00 1 0 1
  • 31. DECIMAL TO OCTAL conversion FRACTIONAL VALUES
  • 32. Convert 𝟎. 𝟔𝟑𝟒𝟏𝟎 to Octal. Results: 𝟎. 𝟔𝟑𝟒𝟏𝟎 = 𝟎. 𝟓𝟎𝟒𝟖 Example 1.h - Decimal to Octal Conversion (FractionalValues) 0.634 0.072 0.576 0.608 5 0 4
  • 33. DECIMAL TO HEXADECIMAL conversion FRACTIONAL VALUES
  • 34. Convert 𝟎. 𝟔𝟒𝟏𝟎 to Hexadecimal. Results: 𝟎. 𝟔𝟒𝟏𝟎 = 𝟎. 𝑨𝟑𝑫𝟏𝟔 Example 1.h - Decimal to Hexadecimal Conversion (FractionalValues) 0.64 0.24 0.84 0.44 A 3 D
  • 35. BINARY to OCTAL conversion
  • 36. 𝑩𝒊 Binary Digit 𝑶𝒊 Octal Digit Figure 1.c - Binary to Octal Conversion 𝐵𝑚 𝐵𝑚−1 𝐵𝑚−2 𝐵5 𝐵4 𝐵3 𝐵2 𝐵1 𝐵0 … 𝑂𝑚 𝑂1 𝑂0
  • 37. BINARY to HEXADECIMAL conversion
  • 38. 𝑩𝒊 Binary Digit 𝑯𝒊 Octal Digit 𝐵𝑚 𝐵𝑚−1 𝐵𝑚−2 𝐵𝑚−3 𝐵7 𝐵6 𝐵5 𝐵4 𝐵3 𝐵2 𝐵1 𝐵0 … 𝐻𝑚 𝐻1 𝐻0
  • 39. OCTAL to HEXADECIMAL conversion
  • 40. 𝐻2 𝐻1 𝐻0 1 0 0 1 1 0 1 0 1 0 1 0 𝑂3 𝑂2 𝑂1 𝑂0