SlideShare a Scribd company logo
1 of 28
2.1
NumberNumber
SystemsSystems
2.2
2-1 INTRODUCTION2-1 INTRODUCTION
AA number systemnumber system defines how a number can bedefines how a number can be
represented using distinct symbols. A number can berepresented using distinct symbols. A number can be
represented differently in different systems. For example,represented differently in different systems. For example,
the two numbers (2A)the two numbers (2A)1616 and (52)and (52)88 both refer to the sameboth refer to the same
quantity, (42)quantity, (42)1010, but their representations are different., but their representations are different.
.There are 4 types of number system.There are 4 types of number system
 Binary number system(11100)Binary number system(11100)22
 Decimal Number system(783)10Decimal Number system(783)10
 Octal Number system(67)8Octal Number system(67)8
 Hexa Decimal Number system(ABCD)16Hexa Decimal Number system(ABCD)16
2.3
1- Binary Number system: Binary Number system are those number system, which having
base 2. it means it can contain only two numbers that is 0
and 1 for example (0101010)2.
2- octal number system: The octal number systems are those number system, which having
base 8. it means I can contain 8 number (0,1,2,3,4,5,6,7) for example
(765)8.
3- Decimal Number system: The Decimal number systems are those number system, which having
base 10. it means It can contain 8 number (0,1,2,3,4,5,6,7,8,9) for
example (7659)10.
4- Hexa Decimal number system: The octal number systems are those number system, which
having base 16. it means It can contain 8 number
(0,1,2,3,4,5,6,7,8,9,A,B,C,D,E,F) for example (765DE)16.
Types of Number systemTypes of Number system
2.4
S = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9}
The decimal system (base 10)
The word decimal is derived from the Latin root decem
(ten). In this system the base b = 10 and we use ten symbols
The symbols in this system are often referred to as decimal
digits or just digits.
2.5
Example 2.1
The following shows the place values for the integer +224 in theThe following shows the place values for the integer +224 in the
decimal system.decimal system.
Note that the digit 2 in position 1 has the value 20, but the sameNote that the digit 2 in position 1 has the value 20, but the same
digit in position 2 has the value 200. Also note that we normallydigit in position 2 has the value 200. Also note that we normally
drop the plus sign, but it is implicit.drop the plus sign, but it is implicit.
2.6
Example 2.2
The following shows the place values for the decimal numberThe following shows the place values for the decimal number
−7508. We have used 1, 10, 100, and 1000 instead of powers of−7508. We have used 1, 10, 100, and 1000 instead of powers of
10.10.
Note that the digit 2 in position 1 has the value 20, but the sameNote that the digit 2 in position 1 has the value 20, but the same
digit in position 2 has the value 200. Also note that we normallydigit in position 2 has the value 200. Also note that we normally
drop the plus sign, but it is implicit.drop the plus sign, but it is implicit.
( ) Values
2.7
Reals
Example 2.3
The following shows the place values for the real number +24.13.The following shows the place values for the real number +24.13.
2.8
The word binary is derived from the Latin root bini (or two
by two). In this system the base b = 2 and we use only two
symbols,
The binary system (base 2)
S = {0, 1}
The symbols in this system are often referred to as binary
digits or bits (binary digit).
2.9
Example 2.4
The following shows that the number (11001)The following shows that the number (11001)22 in binary is thein binary is the
same as 25 in decimal. The subscript 2 shows that the base is 2.same as 25 in decimal. The subscript 2 shows that the base is 2.
The equivalent decimal number is N = 16 + 8 + 0 + 0 + 1 = 25.The equivalent decimal number is N = 16 + 8 + 0 + 0 + 1 = 25.
2.10
Reals
Example 2.5
The following shows that the number (101.11)The following shows that the number (101.11)22 in binary is equalin binary is equal
to the number 5.75 in decimal.to the number 5.75 in decimal.
2.11
The word hexadecimal is derived from the Greek root hex
(six) and the Latin root decem (ten). In this system the base
b = 16 and we use sixteen symbols to represent a number.
The set of symbols is
The hexadecimal system (base 16)
S = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, A, B, C, D, E, F}
Note that the symbols A, B, C, D, E, F are equivalent to 10,
11, 12, 13, 14, and 15 respectively. The symbols in this
system are often referred to as hexadecimal digits.
2.12
Example 2.6
The following shows that the number (2AE)16 in hexadecimal isThe following shows that the number (2AE)16 in hexadecimal is
equivalent to 686 in decimal.equivalent to 686 in decimal.
The equivalent decimal number is N = 512 + 160 + 14 = 686.The equivalent decimal number is N = 512 + 160 + 14 = 686.
2.13
The word octal is derived from the Latin root octo (eight). In
this system the base b = 8 and we use eight symbols to
represent a number. The set of symbols is
The octal system (base 8)
S = {0, 1, 2, 3, 4, 5, 6, 7}
2.14
Example 2.7
The following shows that the number (1256)The following shows that the number (1256)88 in octal is the samein octal is the same
as 686 in decimal.as 686 in decimal.
Note that the decimal number is N = 512 + 128 + 40 + 6 = 686.Note that the decimal number is N = 512 + 128 + 40 + 6 = 686.
2.15
Table 2.1 shows a summary of the four positional number
systems discussed in this chapter.
Summary of the four positional systems
2.16
Table 2.2 shows how the number 0 to 15 is represented in
different systems.
2.17
We need to know how to convert a number in one system to
the equivalent number in another system. Since the decimal
system is more familiar than the other systems, we first show
how to covert from any base to decimal. Then we show how
to convert from decimal to any base. Finally, we show how
we can easily convert from binary to hexadecimal or octal
and vice versa.
Conversion
2.18
Any base to decimal conversion
Figure 2.5 Converting other bases to decimal
2.19
Example 2.8
The following shows how to convert the binary number (110.11)The following shows how to convert the binary number (110.11)22
to decimal: (110.11)to decimal: (110.11)22 = 6.75.= 6.75.
2.20
Example 2.9
The following shows how to convert the hexadecimal numberThe following shows how to convert the hexadecimal number
(1A.23)(1A.23)1616 to decimal.to decimal.
Note that the result in the decimal notation is not exact, becauseNote that the result in the decimal notation is not exact, because
3 × 163 × 16−2−2
= 0.01171875. We have rounded this value to three= 0.01171875. We have rounded this value to three
digits (0.012).digits (0.012).
2.21
Example 2.10
The following shows how to convert (23.17)The following shows how to convert (23.17)88 to decimal.to decimal.
This means that (23.17)8 ≈ 19.234 in decimal. Again, we haveThis means that (23.17)8 ≈ 19.234 in decimal. Again, we have
rounded up 7 × 8rounded up 7 × 8−2−2
= 0.109375.= 0.109375.
2.22
Example 2.17
An alternative method for converting a small decimal integerAn alternative method for converting a small decimal integer
(usually less than 256) to binary is to break the number as the(usually less than 256) to binary is to break the number as the
sum of numbers that are equivalent to the binary place valuessum of numbers that are equivalent to the binary place values
shown:shown:
2.23
Example 2.18
A similar method can be used to convert a decimal fraction toA similar method can be used to convert a decimal fraction to
binary when the denominator is a power of two:binary when the denominator is a power of two:
The answer is then (0.011011)The answer is then (0.011011)22
2.24
Example 2.19
Show the hexadecimal equivalent of the binary numberShow the hexadecimal equivalent of the binary number
(110011100010)(110011100010)22..
SolutionSolution
We first arrange the binary number in 4-bit patterns:We first arrange the binary number in 4-bit patterns:
100 1110 0010100 1110 0010
Note that the leftmost pattern can have one to four bits. We thenNote that the leftmost pattern can have one to four bits. We then
use the equivalent of each pattern shown in Table 2.2 on page 25use the equivalent of each pattern shown in Table 2.2 on page 25
to change the number to hexadecimal: (4E2)16.to change the number to hexadecimal: (4E2)16.
2.25
Example 2.20
What is the binary equivalent of (24C)What is the binary equivalent of (24C)1616??
SolutionSolution
Each hexadecimal digit is converted to 4-bit patterns:Each hexadecimal digit is converted to 4-bit patterns:
2 → 0010, 4 → 0100, and C →2 → 0010, 4 → 0100, and C →
11001100
The result is (001001001100)The result is (001001001100)22..
2.26
Example 2.21
Show the octal equivalent of the binary number (101110010)Show the octal equivalent of the binary number (101110010)22..
SolutionSolution
Each group of three bits is translated into one octal digit. TheEach group of three bits is translated into one octal digit. The
equivalent of each 3-bit group is shown in Table 2.2 on page 25.equivalent of each 3-bit group is shown in Table 2.2 on page 25.
The result is (562)The result is (562)88..
101 110 010101 110 010
2.27
Example 2.22
What is the binary equivalent of for (24)What is the binary equivalent of for (24)88??
SolutionSolution
Write each octal digit as its equivalent bit pattern to getWrite each octal digit as its equivalent bit pattern to get
2 → 010 and 4 → 1002 → 010 and 4 → 100
The result is (010100)The result is (010100)22..
2.28
Octal-hexadecimal conversion
Figure 2.12 Octal to hexadecimal and hexadecimal to octal conversion

More Related Content

What's hot

Number system....
Number system....Number system....
Number system....
mshoaib15
 
Binary Arithmetic
Binary ArithmeticBinary Arithmetic
Binary Arithmetic
gavhays
 
Number system
Number systemNumber system
Number system
kashee99
 
Conversiones entre sistemas de numeración
Conversiones entre sistemas de numeraciónConversiones entre sistemas de numeración
Conversiones entre sistemas de numeración
Johnny Montenegro Molina
 

What's hot (20)

Number system....
Number system....Number system....
Number system....
 
Number system
Number systemNumber system
Number system
 
Computer Number system
Computer Number systemComputer Number system
Computer Number system
 
binary number system
 binary number system binary number system
binary number system
 
Number system
Number systemNumber system
Number system
 
Binary Arithmetic
Binary ArithmeticBinary Arithmetic
Binary Arithmetic
 
BINARY NUMBER SYSTEM
BINARY NUMBER SYSTEMBINARY NUMBER SYSTEM
BINARY NUMBER SYSTEM
 
Lecture-2(2): Number System & Conversion
Lecture-2(2): Number System & ConversionLecture-2(2): Number System & Conversion
Lecture-2(2): Number System & Conversion
 
Number System
Number SystemNumber System
Number System
 
Number system
Number systemNumber system
Number system
 
Binary addition.pptx
Binary addition.pptxBinary addition.pptx
Binary addition.pptx
 
dld 01-introduction
dld 01-introductiondld 01-introduction
dld 01-introduction
 
A practical tutorial to excel
A practical tutorial to excelA practical tutorial to excel
A practical tutorial to excel
 
Conversiones entre sistemas de numeración
Conversiones entre sistemas de numeraciónConversiones entre sistemas de numeración
Conversiones entre sistemas de numeración
 
Floating point representation
Floating point representationFloating point representation
Floating point representation
 
Number Systems
Number SystemsNumber Systems
Number Systems
 
Conversion of number system with base concept
Conversion of number system with base conceptConversion of number system with base concept
Conversion of number system with base concept
 
Binary to decimal Conversion
Binary to decimal ConversionBinary to decimal Conversion
Binary to decimal Conversion
 
Data representation
Data representationData representation
Data representation
 
Decimal number system
Decimal number systemDecimal number system
Decimal number system
 

Similar to Number system

Similar to Number system (20)

Number system 1
Number system 1Number system 1
Number system 1
 
Chap02_1473751047_598100.ppt
Chap02_1473751047_598100.pptChap02_1473751047_598100.ppt
Chap02_1473751047_598100.ppt
 
Number system and conversions between different number systems
Number system and conversions between different number systemsNumber system and conversions between different number systems
Number system and conversions between different number systems
 
Data representation and boolean algebra
Data representation and boolean algebraData representation and boolean algebra
Data representation and boolean algebra
 
Number system by ammar nawab
Number system by ammar nawabNumber system by ammar nawab
Number system by ammar nawab
 
Number system
Number systemNumber system
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...
 
NUMBER SYSTEM.pptx
NUMBER SYSTEM.pptxNUMBER SYSTEM.pptx
NUMBER SYSTEM.pptx
 
computer Unit 2
computer Unit 2computer Unit 2
computer Unit 2
 
Chapter 3.pptx
Chapter 3.pptxChapter 3.pptx
Chapter 3.pptx
 
Data representation
Data representationData representation
Data representation
 
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
 
Number System and Boolean Algebra
Number System and Boolean AlgebraNumber System and Boolean Algebra
Number System and Boolean Algebra
 
Data repersentation.
Data repersentation.Data repersentation.
Data repersentation.
 
Chapter two FHI.pptx
Chapter two FHI.pptxChapter two FHI.pptx
Chapter two FHI.pptx
 
Number system
Number systemNumber system
Number system
 
DATA PRESENTATION
DATA PRESENTATIONDATA PRESENTATION
DATA PRESENTATION
 
Module 1 number systems and code1
Module 1  number systems and code1Module 1  number systems and code1
Module 1 number systems and code1
 
numbersystem-211022083557.pdf
numbersystem-211022083557.pdfnumbersystem-211022083557.pdf
numbersystem-211022083557.pdf
 
Okkkkk
OkkkkkOkkkkk
Okkkkk
 

More from RajThakuri

Pdf. learn html.....html_course_(basic___advance_)_for_7_days
Pdf. learn html.....html_course_(basic___advance_)_for_7_daysPdf. learn html.....html_course_(basic___advance_)_for_7_days
Pdf. learn html.....html_course_(basic___advance_)_for_7_days
RajThakuri
 

More from RajThakuri (20)

Share Market.pptx
Share Market.pptxShare Market.pptx
Share Market.pptx
 
Statistical table
Statistical tableStatistical table
Statistical table
 
All Computer shortcuts for beginners....
All Computer shortcuts for beginners....All Computer shortcuts for beginners....
All Computer shortcuts for beginners....
 
Pdf. learn html.....html_course_(basic___advance_)_for_7_days
Pdf. learn html.....html_course_(basic___advance_)_for_7_daysPdf. learn html.....html_course_(basic___advance_)_for_7_days
Pdf. learn html.....html_course_(basic___advance_)_for_7_days
 
Programming language
Programming languageProgramming language
Programming language
 
Networking
NetworkingNetworking
Networking
 
Software
SoftwareSoftware
Software
 
Operating system
Operating systemOperating system
Operating system
 
Output devices
Output devicesOutput devices
Output devices
 
Input devices
Input devicesInput devices
Input devices
 
Internet
InternetInternet
Internet
 
Computer memory & Memory Storage Devices.
Computer memory & Memory Storage Devices.Computer memory & Memory Storage Devices.
Computer memory & Memory Storage Devices.
 
Artificial inteligence
Artificial inteligenceArtificial inteligence
Artificial inteligence
 
Testing of hypotheses
Testing of hypothesesTesting of hypotheses
Testing of hypotheses
 
Formulas to measure_central_tendency_(mean,_median,_mode)
Formulas to measure_central_tendency_(mean,_median,_mode)Formulas to measure_central_tendency_(mean,_median,_mode)
Formulas to measure_central_tendency_(mean,_median,_mode)
 
Leadership, its styles_&_leadership_theories...
Leadership, its styles_&_leadership_theories...Leadership, its styles_&_leadership_theories...
Leadership, its styles_&_leadership_theories...
 
Role of managerial_economics_in_business_decision_making
Role of managerial_economics_in_business_decision_makingRole of managerial_economics_in_business_decision_making
Role of managerial_economics_in_business_decision_making
 
Approaches of organizational_behavior
Approaches of organizational_behaviorApproaches of organizational_behavior
Approaches of organizational_behavior
 
Vivo v17 pro Review
Vivo v17 pro ReviewVivo v17 pro Review
Vivo v17 pro Review
 
Vivo x27 first_look
Vivo x27 first_lookVivo x27 first_look
Vivo x27 first_look
 

Recently uploaded

Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
WSO2
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
?#DUbAI#??##{{(☎️+971_581248768%)**%*]'#abortion pills for sale in dubai@
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 

Recently uploaded (20)

FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
 
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
 
A Beginners Guide to Building a RAG App Using Open Source Milvus
A Beginners Guide to Building a RAG App Using Open Source MilvusA Beginners Guide to Building a RAG App Using Open Source Milvus
A Beginners Guide to Building a RAG App Using Open Source Milvus
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
 
Ransomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdfRansomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdf
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 

Number system

  • 2. 2.2 2-1 INTRODUCTION2-1 INTRODUCTION AA number systemnumber system defines how a number can bedefines how a number can be represented using distinct symbols. A number can berepresented using distinct symbols. A number can be represented differently in different systems. For example,represented differently in different systems. For example, the two numbers (2A)the two numbers (2A)1616 and (52)and (52)88 both refer to the sameboth refer to the same quantity, (42)quantity, (42)1010, but their representations are different., but their representations are different. .There are 4 types of number system.There are 4 types of number system  Binary number system(11100)Binary number system(11100)22  Decimal Number system(783)10Decimal Number system(783)10  Octal Number system(67)8Octal Number system(67)8  Hexa Decimal Number system(ABCD)16Hexa Decimal Number system(ABCD)16
  • 3. 2.3 1- Binary Number system: Binary Number system are those number system, which having base 2. it means it can contain only two numbers that is 0 and 1 for example (0101010)2. 2- octal number system: The octal number systems are those number system, which having base 8. it means I can contain 8 number (0,1,2,3,4,5,6,7) for example (765)8. 3- Decimal Number system: The Decimal number systems are those number system, which having base 10. it means It can contain 8 number (0,1,2,3,4,5,6,7,8,9) for example (7659)10. 4- Hexa Decimal number system: The octal number systems are those number system, which having base 16. it means It can contain 8 number (0,1,2,3,4,5,6,7,8,9,A,B,C,D,E,F) for example (765DE)16. Types of Number systemTypes of Number system
  • 4. 2.4 S = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9} The decimal system (base 10) The word decimal is derived from the Latin root decem (ten). In this system the base b = 10 and we use ten symbols The symbols in this system are often referred to as decimal digits or just digits.
  • 5. 2.5 Example 2.1 The following shows the place values for the integer +224 in theThe following shows the place values for the integer +224 in the decimal system.decimal system. Note that the digit 2 in position 1 has the value 20, but the sameNote that the digit 2 in position 1 has the value 20, but the same digit in position 2 has the value 200. Also note that we normallydigit in position 2 has the value 200. Also note that we normally drop the plus sign, but it is implicit.drop the plus sign, but it is implicit.
  • 6. 2.6 Example 2.2 The following shows the place values for the decimal numberThe following shows the place values for the decimal number −7508. We have used 1, 10, 100, and 1000 instead of powers of−7508. We have used 1, 10, 100, and 1000 instead of powers of 10.10. Note that the digit 2 in position 1 has the value 20, but the sameNote that the digit 2 in position 1 has the value 20, but the same digit in position 2 has the value 200. Also note that we normallydigit in position 2 has the value 200. Also note that we normally drop the plus sign, but it is implicit.drop the plus sign, but it is implicit. ( ) Values
  • 7. 2.7 Reals Example 2.3 The following shows the place values for the real number +24.13.The following shows the place values for the real number +24.13.
  • 8. 2.8 The word binary is derived from the Latin root bini (or two by two). In this system the base b = 2 and we use only two symbols, The binary system (base 2) S = {0, 1} The symbols in this system are often referred to as binary digits or bits (binary digit).
  • 9. 2.9 Example 2.4 The following shows that the number (11001)The following shows that the number (11001)22 in binary is thein binary is the same as 25 in decimal. The subscript 2 shows that the base is 2.same as 25 in decimal. The subscript 2 shows that the base is 2. The equivalent decimal number is N = 16 + 8 + 0 + 0 + 1 = 25.The equivalent decimal number is N = 16 + 8 + 0 + 0 + 1 = 25.
  • 10. 2.10 Reals Example 2.5 The following shows that the number (101.11)The following shows that the number (101.11)22 in binary is equalin binary is equal to the number 5.75 in decimal.to the number 5.75 in decimal.
  • 11. 2.11 The word hexadecimal is derived from the Greek root hex (six) and the Latin root decem (ten). In this system the base b = 16 and we use sixteen symbols to represent a number. The set of symbols is The hexadecimal system (base 16) S = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, A, B, C, D, E, F} Note that the symbols A, B, C, D, E, F are equivalent to 10, 11, 12, 13, 14, and 15 respectively. The symbols in this system are often referred to as hexadecimal digits.
  • 12. 2.12 Example 2.6 The following shows that the number (2AE)16 in hexadecimal isThe following shows that the number (2AE)16 in hexadecimal is equivalent to 686 in decimal.equivalent to 686 in decimal. The equivalent decimal number is N = 512 + 160 + 14 = 686.The equivalent decimal number is N = 512 + 160 + 14 = 686.
  • 13. 2.13 The word octal is derived from the Latin root octo (eight). In this system the base b = 8 and we use eight symbols to represent a number. The set of symbols is The octal system (base 8) S = {0, 1, 2, 3, 4, 5, 6, 7}
  • 14. 2.14 Example 2.7 The following shows that the number (1256)The following shows that the number (1256)88 in octal is the samein octal is the same as 686 in decimal.as 686 in decimal. Note that the decimal number is N = 512 + 128 + 40 + 6 = 686.Note that the decimal number is N = 512 + 128 + 40 + 6 = 686.
  • 15. 2.15 Table 2.1 shows a summary of the four positional number systems discussed in this chapter. Summary of the four positional systems
  • 16. 2.16 Table 2.2 shows how the number 0 to 15 is represented in different systems.
  • 17. 2.17 We need to know how to convert a number in one system to the equivalent number in another system. Since the decimal system is more familiar than the other systems, we first show how to covert from any base to decimal. Then we show how to convert from decimal to any base. Finally, we show how we can easily convert from binary to hexadecimal or octal and vice versa. Conversion
  • 18. 2.18 Any base to decimal conversion Figure 2.5 Converting other bases to decimal
  • 19. 2.19 Example 2.8 The following shows how to convert the binary number (110.11)The following shows how to convert the binary number (110.11)22 to decimal: (110.11)to decimal: (110.11)22 = 6.75.= 6.75.
  • 20. 2.20 Example 2.9 The following shows how to convert the hexadecimal numberThe following shows how to convert the hexadecimal number (1A.23)(1A.23)1616 to decimal.to decimal. Note that the result in the decimal notation is not exact, becauseNote that the result in the decimal notation is not exact, because 3 × 163 × 16−2−2 = 0.01171875. We have rounded this value to three= 0.01171875. We have rounded this value to three digits (0.012).digits (0.012).
  • 21. 2.21 Example 2.10 The following shows how to convert (23.17)The following shows how to convert (23.17)88 to decimal.to decimal. This means that (23.17)8 ≈ 19.234 in decimal. Again, we haveThis means that (23.17)8 ≈ 19.234 in decimal. Again, we have rounded up 7 × 8rounded up 7 × 8−2−2 = 0.109375.= 0.109375.
  • 22. 2.22 Example 2.17 An alternative method for converting a small decimal integerAn alternative method for converting a small decimal integer (usually less than 256) to binary is to break the number as the(usually less than 256) to binary is to break the number as the sum of numbers that are equivalent to the binary place valuessum of numbers that are equivalent to the binary place values shown:shown:
  • 23. 2.23 Example 2.18 A similar method can be used to convert a decimal fraction toA similar method can be used to convert a decimal fraction to binary when the denominator is a power of two:binary when the denominator is a power of two: The answer is then (0.011011)The answer is then (0.011011)22
  • 24. 2.24 Example 2.19 Show the hexadecimal equivalent of the binary numberShow the hexadecimal equivalent of the binary number (110011100010)(110011100010)22.. SolutionSolution We first arrange the binary number in 4-bit patterns:We first arrange the binary number in 4-bit patterns: 100 1110 0010100 1110 0010 Note that the leftmost pattern can have one to four bits. We thenNote that the leftmost pattern can have one to four bits. We then use the equivalent of each pattern shown in Table 2.2 on page 25use the equivalent of each pattern shown in Table 2.2 on page 25 to change the number to hexadecimal: (4E2)16.to change the number to hexadecimal: (4E2)16.
  • 25. 2.25 Example 2.20 What is the binary equivalent of (24C)What is the binary equivalent of (24C)1616?? SolutionSolution Each hexadecimal digit is converted to 4-bit patterns:Each hexadecimal digit is converted to 4-bit patterns: 2 → 0010, 4 → 0100, and C →2 → 0010, 4 → 0100, and C → 11001100 The result is (001001001100)The result is (001001001100)22..
  • 26. 2.26 Example 2.21 Show the octal equivalent of the binary number (101110010)Show the octal equivalent of the binary number (101110010)22.. SolutionSolution Each group of three bits is translated into one octal digit. TheEach group of three bits is translated into one octal digit. The equivalent of each 3-bit group is shown in Table 2.2 on page 25.equivalent of each 3-bit group is shown in Table 2.2 on page 25. The result is (562)The result is (562)88.. 101 110 010101 110 010
  • 27. 2.27 Example 2.22 What is the binary equivalent of for (24)What is the binary equivalent of for (24)88?? SolutionSolution Write each octal digit as its equivalent bit pattern to getWrite each octal digit as its equivalent bit pattern to get 2 → 010 and 4 → 1002 → 010 and 4 → 100 The result is (010100)The result is (010100)22..
  • 28. 2.28 Octal-hexadecimal conversion Figure 2.12 Octal to hexadecimal and hexadecimal to octal conversion