SlideShare a Scribd company logo
1 of 40
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)
1361 30
1011
Source
Destination
DECIMAL TO OCTAL conversion
INTEGRAL VALUES
Example 1.f - Decimal to Octal Conversion (IntegralValues)
Convert the number 𝟏𝟐𝟔 𝟏𝟎 to octal.
Results: 𝟏𝟐𝟔 𝟏𝟎 = 𝟏𝟕𝟔 𝟖
126150 1
671
Source
Destination
DECIMAL TO HEXADECIMAL conversion
INTEGRAL VALUES
Example 1.g - Decimal to Hexadecimal Conversion (IntegralValues)
Convert the number 𝟏𝟐𝟔 𝟏𝟎 to octal.
Results: 𝟏𝟐𝟔 𝟏𝟎 = 𝟕𝑬 𝟏𝟔
12670
E7
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

What's hot (20)

Computer Number system
Computer Number systemComputer Number system
Computer Number system
 
Representation Of Numbers and Characters
Representation Of Numbers and CharactersRepresentation Of Numbers and Characters
Representation Of Numbers and Characters
 
Floating point arithmetic
Floating point arithmeticFloating point arithmetic
Floating point arithmetic
 
Number system
Number systemNumber system
Number system
 
Binary code - Beginning
Binary code - BeginningBinary code - Beginning
Binary code - Beginning
 
Number system and codes
Number system and codesNumber system and codes
Number system and codes
 
Binary codes
Binary codesBinary codes
Binary codes
 
11 octal number system
11   octal number system11   octal number system
11 octal number system
 
Slide03 Number System and Operations Part 1
Slide03 Number System and Operations Part 1Slide03 Number System and Operations Part 1
Slide03 Number System and Operations Part 1
 
Binary number system
Binary number systemBinary number system
Binary number system
 
Computer data processing
Computer data processingComputer data processing
Computer data processing
 
Codes
CodesCodes
Codes
 
Digital Electronics- Number systems & codes
Digital Electronics- Number systems & codes Digital Electronics- Number systems & codes
Digital Electronics- Number systems & codes
 
Input,output & storage device ppt
Input,output & storage device pptInput,output & storage device ppt
Input,output & storage device ppt
 
DATA REPRESENTATION
DATA  REPRESENTATIONDATA  REPRESENTATION
DATA REPRESENTATION
 
Binary Arithmetic Operations
Binary Arithmetic OperationsBinary Arithmetic Operations
Binary Arithmetic Operations
 
Ebcdic code 24 1
Ebcdic code 24 1Ebcdic code 24 1
Ebcdic code 24 1
 
Data Representation
Data RepresentationData Representation
Data Representation
 
Number System (Binary,octal,Decimal,Hexadecimal)
Number System (Binary,octal,Decimal,Hexadecimal)Number System (Binary,octal,Decimal,Hexadecimal)
Number System (Binary,octal,Decimal,Hexadecimal)
 
Binary, Decimal and Hexadecimal
Binary, Decimal and HexadecimalBinary, Decimal and Hexadecimal
Binary, Decimal and Hexadecimal
 

Viewers also liked

Computer number systems
Computer number systemsComputer number systems
Computer number systemsRevi Shahini
 
Oop design principles (2013 08 16 19_18_36 utc)
Oop design principles (2013 08 16 19_18_36 utc)Oop design principles (2013 08 16 19_18_36 utc)
Oop design principles (2013 08 16 19_18_36 utc)Sayed Ahmed
 
Cmp104 lec 2 number system
Cmp104 lec 2 number systemCmp104 lec 2 number system
Cmp104 lec 2 number systemkapil078
 
Mba i-ifm-u-1- computer hardware system
Mba i-ifm-u-1- computer hardware systemMba i-ifm-u-1- computer hardware system
Mba i-ifm-u-1- computer hardware systemRai University
 
Number System in CoMpUtEr
Number System in CoMpUtErNumber System in CoMpUtEr
Number System in CoMpUtErvishal bansal
 
Components of Multimedia
Components of MultimediaComponents of Multimedia
Components of Multimediaasasmultimedia
 
Multimedia Components
Multimedia ComponentsMultimedia Components
Multimedia ComponentsDjBlain
 
[1] Data Representation
[1] Data Representation[1] Data Representation
[1] Data RepresentationMr McAlpine
 
Multimedia in research: What is it? Why use it? How to use it?
Multimedia in research: What is it? Why use it? How to use it?  Multimedia in research: What is it? Why use it? How to use it?
Multimedia in research: What is it? Why use it? How to use it? ILRI
 
number system school ppt ninth class
number system school ppt ninth classnumber system school ppt ninth class
number system school ppt ninth classManan Jain
 
Number System
Number SystemNumber System
Number Systemitutor
 
number system
number systemnumber system
number systemvirly dwe
 
LinkedIn SlideShare: Knowledge, Well-Presented
LinkedIn SlideShare: Knowledge, Well-PresentedLinkedIn SlideShare: Knowledge, Well-Presented
LinkedIn SlideShare: Knowledge, Well-PresentedSlideShare
 

Viewers also liked (18)

Computer number systems
Computer number systemsComputer number systems
Computer number systems
 
Oop design principles (2013 08 16 19_18_36 utc)
Oop design principles (2013 08 16 19_18_36 utc)Oop design principles (2013 08 16 19_18_36 utc)
Oop design principles (2013 08 16 19_18_36 utc)
 
Cmp104 lec 2 number system
Cmp104 lec 2 number systemCmp104 lec 2 number system
Cmp104 lec 2 number system
 
Mba i-ifm-u-1- computer hardware system
Mba i-ifm-u-1- computer hardware systemMba i-ifm-u-1- computer hardware system
Mba i-ifm-u-1- computer hardware system
 
Number System in CoMpUtEr
Number System in CoMpUtErNumber System in CoMpUtEr
Number System in CoMpUtEr
 
Number systems
Number systemsNumber systems
Number systems
 
Number System
Number SystemNumber System
Number System
 
Components of Multimedia
Components of MultimediaComponents of Multimedia
Components of Multimedia
 
Number system
Number systemNumber system
Number system
 
Multimedia Components
Multimedia ComponentsMultimedia Components
Multimedia Components
 
[1] Data Representation
[1] Data Representation[1] Data Representation
[1] Data Representation
 
Multimedia in research: What is it? Why use it? How to use it?
Multimedia in research: What is it? Why use it? How to use it?  Multimedia in research: What is it? Why use it? How to use it?
Multimedia in research: What is it? Why use it? How to use it?
 
Number system
Number systemNumber system
Number system
 
number system school ppt ninth class
number system school ppt ninth classnumber system school ppt ninth class
number system school ppt ninth class
 
Number System
Number SystemNumber System
Number System
 
number system
number systemnumber system
number system
 
Number System
Number SystemNumber System
Number System
 
LinkedIn SlideShare: Knowledge, Well-Presented
LinkedIn SlideShare: Knowledge, Well-PresentedLinkedIn SlideShare: Knowledge, Well-Presented
LinkedIn SlideShare: Knowledge, Well-Presented
 

Similar to Number systems and data representations fundamentals

1b-150720094704-lva1-app6892.pdf
1b-150720094704-lva1-app6892.pdf1b-150720094704-lva1-app6892.pdf
1b-150720094704-lva1-app6892.pdfDrBashirMSaad
 
Number system by ammar nawab
Number system by ammar nawabNumber system by ammar nawab
Number system by ammar nawabAmmar_n
 
DATA REPRESENTATION.pptx
DATA REPRESENTATION.pptxDATA REPRESENTATION.pptx
DATA REPRESENTATION.pptxMamataAnilgod
 
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.pptxmust322322
 
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.pdfMOHDZAMRIBINIBRAHIM1
 
data representation
 data representation data representation
data representationHaroon_007
 
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.pdfshubhangisonawane6
 
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 systemISMT College
 
Chapter two FHI.pptx
Chapter two FHI.pptxChapter two FHI.pptx
Chapter two FHI.pptxODAATUBE1
 
Number system and their conversion
Number system and their conversionNumber system and their conversion
Number system and their conversionRam Pratap Singh
 

Similar to Number systems and data representations fundamentals (20)

1b-150720094704-lva1-app6892.pdf
1b-150720094704-lva1-app6892.pdf1b-150720094704-lva1-app6892.pdf
1b-150720094704-lva1-app6892.pdf
 
NUMBER SYSTEM.pptx
NUMBER SYSTEM.pptxNUMBER SYSTEM.pptx
NUMBER SYSTEM.pptx
 
Number_Systems (2).ppt
Number_Systems (2).pptNumber_Systems (2).ppt
Number_Systems (2).ppt
 
Number system by ammar nawab
Number system by ammar nawabNumber system by ammar nawab
Number system by ammar nawab
 
DATA REPRESENTATION.pptx
DATA REPRESENTATION.pptxDATA REPRESENTATION.pptx
DATA REPRESENTATION.pptx
 
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
Number systemNumber system
Number system
 
Lecture 2 ns
Lecture 2 nsLecture 2 ns
Lecture 2 ns
 
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
 
Okkkkk
OkkkkkOkkkkk
Okkkkk
 
Digital Electronics Notes.pdf
Digital Electronics Notes.pdfDigital Electronics Notes.pdf
Digital Electronics Notes.pdf
 
data representation
 data representation data representation
data representation
 
005618132.pdf
005618132.pdf005618132.pdf
005618132.pdf
 
JPC#8 Foundation of Computer Science
JPC#8 Foundation of Computer ScienceJPC#8 Foundation of Computer Science
JPC#8 Foundation of Computer Science
 
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
 
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
 
Lec 02
Lec 02Lec 02
Lec 02
 
Chapter two FHI.pptx
Chapter two FHI.pptxChapter two FHI.pptx
Chapter two FHI.pptx
 
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
 

Recently uploaded

Data Science Jobs and Salaries Analysis.pptx
Data Science Jobs and Salaries Analysis.pptxData Science Jobs and Salaries Analysis.pptx
Data Science Jobs and Salaries Analysis.pptxFurkanTasci3
 
Industrialised data - the key to AI success.pdf
Industrialised data - the key to AI success.pdfIndustrialised data - the key to AI success.pdf
Industrialised data - the key to AI success.pdfLars Albertsson
 
VIP High Class Call Girls Jamshedpur Anushka 8250192130 Independent Escort Se...
VIP High Class Call Girls Jamshedpur Anushka 8250192130 Independent Escort Se...VIP High Class Call Girls Jamshedpur Anushka 8250192130 Independent Escort Se...
VIP High Class Call Girls Jamshedpur Anushka 8250192130 Independent Escort Se...Suhani Kapoor
 
Dubai Call Girls Wifey O52&786472 Call Girls Dubai
Dubai Call Girls Wifey O52&786472 Call Girls DubaiDubai Call Girls Wifey O52&786472 Call Girls Dubai
Dubai Call Girls Wifey O52&786472 Call Girls Dubaihf8803863
 
{Pooja: 9892124323 } Call Girl in Mumbai | Jas Kaur Rate 4500 Free Hotel Del...
{Pooja:  9892124323 } Call Girl in Mumbai | Jas Kaur Rate 4500 Free Hotel Del...{Pooja:  9892124323 } Call Girl in Mumbai | Jas Kaur Rate 4500 Free Hotel Del...
{Pooja: 9892124323 } Call Girl in Mumbai | Jas Kaur Rate 4500 Free Hotel Del...Pooja Nehwal
 
GA4 Without Cookies [Measure Camp AMS]
GA4 Without Cookies [Measure Camp AMS]GA4 Without Cookies [Measure Camp AMS]
GA4 Without Cookies [Measure Camp AMS]📊 Markus Baersch
 
(PARI) Call Girls Wanowrie ( 7001035870 ) HI-Fi Pune Escorts Service
(PARI) Call Girls Wanowrie ( 7001035870 ) HI-Fi Pune Escorts Service(PARI) Call Girls Wanowrie ( 7001035870 ) HI-Fi Pune Escorts Service
(PARI) Call Girls Wanowrie ( 7001035870 ) HI-Fi Pune Escorts Serviceranjana rawat
 
Schema on read is obsolete. Welcome metaprogramming..pdf
Schema on read is obsolete. Welcome metaprogramming..pdfSchema on read is obsolete. Welcome metaprogramming..pdf
Schema on read is obsolete. Welcome metaprogramming..pdfLars Albertsson
 
办理(Vancouver毕业证书)加拿大温哥华岛大学毕业证成绩单原版一比一
办理(Vancouver毕业证书)加拿大温哥华岛大学毕业证成绩单原版一比一办理(Vancouver毕业证书)加拿大温哥华岛大学毕业证成绩单原版一比一
办理(Vancouver毕业证书)加拿大温哥华岛大学毕业证成绩单原版一比一F La
 
办理学位证中佛罗里达大学毕业证,UCF成绩单原版一比一
办理学位证中佛罗里达大学毕业证,UCF成绩单原版一比一办理学位证中佛罗里达大学毕业证,UCF成绩单原版一比一
办理学位证中佛罗里达大学毕业证,UCF成绩单原版一比一F sss
 
PKS-TGC-1084-630 - Stage 1 Proposal.pptx
PKS-TGC-1084-630 - Stage 1 Proposal.pptxPKS-TGC-1084-630 - Stage 1 Proposal.pptx
PKS-TGC-1084-630 - Stage 1 Proposal.pptxPramod Kumar Srivastava
 
Call Us ➥97111√47426🤳Call Girls in Aerocity (Delhi NCR)
Call Us ➥97111√47426🤳Call Girls in Aerocity (Delhi NCR)Call Us ➥97111√47426🤳Call Girls in Aerocity (Delhi NCR)
Call Us ➥97111√47426🤳Call Girls in Aerocity (Delhi NCR)jennyeacort
 
EMERCE - 2024 - AMSTERDAM - CROSS-PLATFORM TRACKING WITH GOOGLE ANALYTICS.pptx
EMERCE - 2024 - AMSTERDAM - CROSS-PLATFORM  TRACKING WITH GOOGLE ANALYTICS.pptxEMERCE - 2024 - AMSTERDAM - CROSS-PLATFORM  TRACKING WITH GOOGLE ANALYTICS.pptx
EMERCE - 2024 - AMSTERDAM - CROSS-PLATFORM TRACKING WITH GOOGLE ANALYTICS.pptxthyngster
 
Predictive Analysis - Using Insight-informed Data to Determine Factors Drivin...
Predictive Analysis - Using Insight-informed Data to Determine Factors Drivin...Predictive Analysis - Using Insight-informed Data to Determine Factors Drivin...
Predictive Analysis - Using Insight-informed Data to Determine Factors Drivin...ThinkInnovation
 
20240419 - Measurecamp Amsterdam - SAM.pdf
20240419 - Measurecamp Amsterdam - SAM.pdf20240419 - Measurecamp Amsterdam - SAM.pdf
20240419 - Measurecamp Amsterdam - SAM.pdfHuman37
 
DBA Basics: Getting Started with Performance Tuning.pdf
DBA Basics: Getting Started with Performance Tuning.pdfDBA Basics: Getting Started with Performance Tuning.pdf
DBA Basics: Getting Started with Performance Tuning.pdfJohn Sterrett
 

Recently uploaded (20)

Data Science Jobs and Salaries Analysis.pptx
Data Science Jobs and Salaries Analysis.pptxData Science Jobs and Salaries Analysis.pptx
Data Science Jobs and Salaries Analysis.pptx
 
Industrialised data - the key to AI success.pdf
Industrialised data - the key to AI success.pdfIndustrialised data - the key to AI success.pdf
Industrialised data - the key to AI success.pdf
 
VIP High Class Call Girls Jamshedpur Anushka 8250192130 Independent Escort Se...
VIP High Class Call Girls Jamshedpur Anushka 8250192130 Independent Escort Se...VIP High Class Call Girls Jamshedpur Anushka 8250192130 Independent Escort Se...
VIP High Class Call Girls Jamshedpur Anushka 8250192130 Independent Escort Se...
 
Dubai Call Girls Wifey O52&786472 Call Girls Dubai
Dubai Call Girls Wifey O52&786472 Call Girls DubaiDubai Call Girls Wifey O52&786472 Call Girls Dubai
Dubai Call Girls Wifey O52&786472 Call Girls Dubai
 
Call Girls in Saket 99530🔝 56974 Escort Service
Call Girls in Saket 99530🔝 56974 Escort ServiceCall Girls in Saket 99530🔝 56974 Escort Service
Call Girls in Saket 99530🔝 56974 Escort Service
 
{Pooja: 9892124323 } Call Girl in Mumbai | Jas Kaur Rate 4500 Free Hotel Del...
{Pooja:  9892124323 } Call Girl in Mumbai | Jas Kaur Rate 4500 Free Hotel Del...{Pooja:  9892124323 } Call Girl in Mumbai | Jas Kaur Rate 4500 Free Hotel Del...
{Pooja: 9892124323 } Call Girl in Mumbai | Jas Kaur Rate 4500 Free Hotel Del...
 
GA4 Without Cookies [Measure Camp AMS]
GA4 Without Cookies [Measure Camp AMS]GA4 Without Cookies [Measure Camp AMS]
GA4 Without Cookies [Measure Camp AMS]
 
꧁❤ Aerocity Call Girls Service Aerocity Delhi ❤꧂ 9999965857 ☎️ Hard And Sexy ...
꧁❤ Aerocity Call Girls Service Aerocity Delhi ❤꧂ 9999965857 ☎️ Hard And Sexy ...꧁❤ Aerocity Call Girls Service Aerocity Delhi ❤꧂ 9999965857 ☎️ Hard And Sexy ...
꧁❤ Aerocity Call Girls Service Aerocity Delhi ❤꧂ 9999965857 ☎️ Hard And Sexy ...
 
Deep Generative Learning for All - The Gen AI Hype (Spring 2024)
Deep Generative Learning for All - The Gen AI Hype (Spring 2024)Deep Generative Learning for All - The Gen AI Hype (Spring 2024)
Deep Generative Learning for All - The Gen AI Hype (Spring 2024)
 
(PARI) Call Girls Wanowrie ( 7001035870 ) HI-Fi Pune Escorts Service
(PARI) Call Girls Wanowrie ( 7001035870 ) HI-Fi Pune Escorts Service(PARI) Call Girls Wanowrie ( 7001035870 ) HI-Fi Pune Escorts Service
(PARI) Call Girls Wanowrie ( 7001035870 ) HI-Fi Pune Escorts Service
 
Schema on read is obsolete. Welcome metaprogramming..pdf
Schema on read is obsolete. Welcome metaprogramming..pdfSchema on read is obsolete. Welcome metaprogramming..pdf
Schema on read is obsolete. Welcome metaprogramming..pdf
 
办理(Vancouver毕业证书)加拿大温哥华岛大学毕业证成绩单原版一比一
办理(Vancouver毕业证书)加拿大温哥华岛大学毕业证成绩单原版一比一办理(Vancouver毕业证书)加拿大温哥华岛大学毕业证成绩单原版一比一
办理(Vancouver毕业证书)加拿大温哥华岛大学毕业证成绩单原版一比一
 
办理学位证中佛罗里达大学毕业证,UCF成绩单原版一比一
办理学位证中佛罗里达大学毕业证,UCF成绩单原版一比一办理学位证中佛罗里达大学毕业证,UCF成绩单原版一比一
办理学位证中佛罗里达大学毕业证,UCF成绩单原版一比一
 
VIP Call Girls Service Charbagh { Lucknow Call Girls Service 9548273370 } Boo...
VIP Call Girls Service Charbagh { Lucknow Call Girls Service 9548273370 } Boo...VIP Call Girls Service Charbagh { Lucknow Call Girls Service 9548273370 } Boo...
VIP Call Girls Service Charbagh { Lucknow Call Girls Service 9548273370 } Boo...
 
PKS-TGC-1084-630 - Stage 1 Proposal.pptx
PKS-TGC-1084-630 - Stage 1 Proposal.pptxPKS-TGC-1084-630 - Stage 1 Proposal.pptx
PKS-TGC-1084-630 - Stage 1 Proposal.pptx
 
Call Us ➥97111√47426🤳Call Girls in Aerocity (Delhi NCR)
Call Us ➥97111√47426🤳Call Girls in Aerocity (Delhi NCR)Call Us ➥97111√47426🤳Call Girls in Aerocity (Delhi NCR)
Call Us ➥97111√47426🤳Call Girls in Aerocity (Delhi NCR)
 
EMERCE - 2024 - AMSTERDAM - CROSS-PLATFORM TRACKING WITH GOOGLE ANALYTICS.pptx
EMERCE - 2024 - AMSTERDAM - CROSS-PLATFORM  TRACKING WITH GOOGLE ANALYTICS.pptxEMERCE - 2024 - AMSTERDAM - CROSS-PLATFORM  TRACKING WITH GOOGLE ANALYTICS.pptx
EMERCE - 2024 - AMSTERDAM - CROSS-PLATFORM TRACKING WITH GOOGLE ANALYTICS.pptx
 
Predictive Analysis - Using Insight-informed Data to Determine Factors Drivin...
Predictive Analysis - Using Insight-informed Data to Determine Factors Drivin...Predictive Analysis - Using Insight-informed Data to Determine Factors Drivin...
Predictive Analysis - Using Insight-informed Data to Determine Factors Drivin...
 
20240419 - Measurecamp Amsterdam - SAM.pdf
20240419 - Measurecamp Amsterdam - SAM.pdf20240419 - Measurecamp Amsterdam - SAM.pdf
20240419 - Measurecamp Amsterdam - SAM.pdf
 
DBA Basics: Getting Started with Performance Tuning.pdf
DBA Basics: Getting Started with Performance Tuning.pdfDBA Basics: Getting Started with Performance Tuning.pdf
DBA Basics: Getting Started with Performance Tuning.pdf
 

Number systems and data representations fundamentals

  • 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) 1361 30 1011 Source Destination
  • 24. DECIMAL TO OCTAL conversion INTEGRAL VALUES
  • 25. Example 1.f - Decimal to Octal Conversion (IntegralValues) Convert the number 𝟏𝟐𝟔 𝟏𝟎 to octal. Results: 𝟏𝟐𝟔 𝟏𝟎 = 𝟏𝟕𝟔 𝟖 126150 1 671 Source Destination
  • 26. DECIMAL TO HEXADECIMAL conversion INTEGRAL VALUES
  • 27. Example 1.g - Decimal to Hexadecimal Conversion (IntegralValues) Convert the number 𝟏𝟐𝟔 𝟏𝟎 to octal. Results: 𝟏𝟐𝟔 𝟏𝟎 = 𝟕𝑬 𝟏𝟔 12670 E7 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