SlideShare a Scribd company logo
2.1
NumberNumber
SystemsSystems
2.2
 Understand the concept of number systems.
 Distinguish between non-positional and positional number
systems.
 Describe the decimal, binary, hexadecimal and octal system.
Convert a number in binary, octal or hexadecimal to a
number in the decimal system.
 Convert a number in the decimal system to a number in
binary, octal and hexadecimal.
 Convert a number in binary to octal and vice versa.
 Convert a number in binary to hexadecimal and vice versa.
 Find the number of digits needed in each system to represent
a particular value.
ObjectivesObjectives
After studying this chapter, the student should be ableAfter studying this chapter, the student should be able
to:to:
2.3
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.
Several number systems have been used in the pastSeveral number systems have been used in the past
and can be categorized into two groups:and can be categorized into two groups: positionalpositional andand
non-positionalnon-positional systems. Our main goal is to discuss thesystems. Our main goal is to discuss the
positional number systems, but we also give examples ofpositional number systems, but we also give examples of
non-positional systems.non-positional systems.
Placemento
rs
Placemento
rs
2.6
2-2 POSITIONAL NUMBER SYSTEMS2-2 POSITIONAL NUMBER SYSTEMS
In aIn a positional number systempositional number system, the position a symbol, the position a symbol
occupies in the number determines the value itoccupies in the number determines the value it
represents. In this system, a number represented as:represents. In this system, a number represented as:
has the value of:has the value of:
in which S is the set of symbols, b is thein which S is the set of symbols, b is the basebase (or(or radixradix).).
2.7
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.8
Integers
Figure 2.1 Place values for an integer in the decimal system
2.9
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.10
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.11
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.12
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.13
Integers
Figure 2.2 Place values for an integer in the binary system
2.14
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.15
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.16
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.17
Integers
Figure 2.3 Place values for an integer in the hexadecimal system
2.18
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.19
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.20
Integers
Figure 2.3 Place values for an integer in the octal system
2.21
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.22
Table 2.1 shows a summary of the four positional number
systems discussed in this chapter.
Summary of the four positional systems
2.23
Table 2.2 shows how the number 0 to 15 is represented in
different systems.
2.24
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.25
Any base to decimal conversion
Figure 2.5 Converting other bases to decimal
2.26
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.27
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.28
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.29
Decimal to any base
Figure 2.6 Converting other bases to decimal (integral part)
2.30
Figure 2.7 Converting the integral part of a number in decimal to other bases
2.31
Example 2.11
The following shows how to convert 35 in decimal to binary. WeThe following shows how to convert 35 in decimal to binary. We
start with the number in decimal, we move to the left whilestart with the number in decimal, we move to the left while
continuously finding the quotients and the remainder of divisioncontinuously finding the quotients and the remainder of division
by 2. The result is 35 = (100011)by 2. The result is 35 = (100011)22..
2.32
Example 2.12
The following shows how to convert 126 in decimal to itsThe following shows how to convert 126 in decimal to its
equivalent in the octal system. We move to the right whileequivalent in the octal system. We move to the right while
continuously finding the quotients and the remainder of divisioncontinuously finding the quotients and the remainder of division
by 8. The result is 126 = (176)by 8. The result is 126 = (176)88..
2.33
Example 2.13
The following shows how we convert 126 in decimal to itsThe following shows how we convert 126 in decimal to its
equivalent in the hexadecimal system. We move to the rightequivalent in the hexadecimal system. We move to the right
while continuously finding the quotients and the remainder ofwhile continuously finding the quotients and the remainder of
division by 16. The result is 126 = (7E)division by 16. The result is 126 = (7E)1616
2.34
Figure 2.8 Converting the fractional part of a number in decimal to other bases
2.35
Figure 2.9 Converting the fractional part of a number in decimal to other bases
2.36
Example 2.14
Convert the decimal number 0.625 to binary.Convert the decimal number 0.625 to binary.
Since the number 0.625 = (0.101)Since the number 0.625 = (0.101)22 has no integral part, thehas no integral part, the
example shows how the fractional part is calculated.example shows how the fractional part is calculated.
2.37
Example 2.15
The following shows how to convert 0.634 to octal using aThe following shows how to convert 0.634 to octal using a
maximum of four digits. The result is 0.634 = (0.5044)maximum of four digits. The result is 0.634 = (0.5044)88. Note. Note
that we multiple by 8 (base octal).that we multiple by 8 (base octal).
2.38
Example 2.16
The following shows how to convert 178.6 in decimal toThe following shows how to convert 178.6 in decimal to
hexadecimal using only one digit to the right of the decimalhexadecimal using only one digit to the right of the decimal
point. The result is 178.6 = (B2.9)point. The result is 178.6 = (B2.9)1616 Note that we divide orNote that we divide or
multiple by 16 (base hexadecimal).multiple by 16 (base hexadecimal).
2.39
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.40
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.41
Binary-hexadecimal conversion
Figure 2.10 Binary to hexadecimal and hexadecimal to binary conversion
2.42
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.43
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.44
Binary-octal conversion
Figure 2.10 Binary to octal and octal to binary conversion
2.45
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.46
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.47
Octal-hexadecimal conversion
Figure 2.12 Octal to hexadecimal and hexadecimal to octal conversion
2.48
Example 2.23
Find the minimum number of binary digits required to storeFind the minimum number of binary digits required to store
decimal integers with a maximum of six digits.decimal integers with a maximum of six digits.
SolutionSolution
kk = 6, b= 6, b11 = 10, and b= 10, and b22 = 2. Then= 2. Then
xx == kk × (logb× (logb11 / logb/ logb22)) == 6 × (1 / 0.30103)6 × (1 / 0.30103) = 20.= 20.
The largest six-digit decimal number is 999,999 and the largestThe largest six-digit decimal number is 999,999 and the largest
20-bit binary number is 1,048,575. Note that the largest number20-bit binary number is 1,048,575. Note that the largest number
that can be represented by a 19-bit number is 524287, which isthat can be represented by a 19-bit number is 524287, which is
smaller than 999,999. We definitely need twenty bits.smaller than 999,999. We definitely need twenty bits.
2.49
2-3 NONPOSITIONAL NUMBER SYSTEMS2-3 NONPOSITIONAL NUMBER SYSTEMS
AlthoughAlthough non-positional number systemsnon-positional number systems are not usedare not used
in computers, we give a short review here forin computers, we give a short review here for
comparison with positional number systems. A non-comparison with positional number systems. A non-
positional number system still uses a limited number ofpositional number system still uses a limited number of
symbols in which each symbol has a value. However,symbols in which each symbol has a value. However,
the position a symbol occupies in the number normallythe position a symbol occupies in the number normally
bears no relation to its value—the value of each symbolbears no relation to its value—the value of each symbol
is fixed. To find the value of a number, we add the valueis fixed. To find the value of a number, we add the value
of all symbols present in the representation.of all symbols present in the representation.
2.50
In this system, a number is represented as:In this system, a number is represented as:
and has the value of:and has the value of:
There are some exceptions to the addition rule we justThere are some exceptions to the addition rule we just
mentioned, as shown in Example 2.24.mentioned, as shown in Example 2.24.
2.51
Example 2.24
Roman numerals are a good example of a non-positional numberRoman numerals are a good example of a non-positional number
system. This number system has a set of symbolssystem. This number system has a set of symbols
S = {I, V, X, L, C, D, M}. The values of each symbol are shownS = {I, V, X, L, C, D, M}. The values of each symbol are shown
in Table 2.3in Table 2.3
To find the value of a number, we need to add the value ofTo find the value of a number, we need to add the value of
symbols subject to specific rules (See the textbook).symbols subject to specific rules (See the textbook).
2.52
Example 2.24
The following shows some Roman numbers and their values.The following shows some Roman numbers and their values.
(Continued)(Continued)

More Related Content

What's hot

1's and 2's complement
1's and 2's complement 1's and 2's complement
1's and 2's complement
Shiraz Azeem
 
APPLICATION OF LINEAR ALGEBRA IN ECONOMICS
APPLICATION OF LINEAR ALGEBRA IN ECONOMICSAPPLICATION OF LINEAR ALGEBRA IN ECONOMICS
APPLICATION OF LINEAR ALGEBRA IN ECONOMICSAmit Garg
 
Chapter-1 Rational numbers Class 8th
Chapter-1 Rational numbers Class 8th Chapter-1 Rational numbers Class 8th
Chapter-1 Rational numbers Class 8th
Abhishek Mishra
 
NUMBER SYSTEM
NUMBER SYSTEMNUMBER SYSTEM
NUMBER SYSTEM
Rap Aishu
 
NUMBER SYSTEM CLASS-IX
NUMBER SYSTEM  CLASS-IXNUMBER SYSTEM  CLASS-IX
NUMBER SYSTEM CLASS-IXShikha Pandey
 
Number system
Number systemNumber system
Number system
Palash Sachan
 
Binary Codes and Number System
Binary Codes and Number SystemBinary Codes and Number System
Binary Codes and Number System
Debarati Das
 
Real Numbers & Number Lines (Geometry 2_1)
Real Numbers & Number Lines (Geometry 2_1)Real Numbers & Number Lines (Geometry 2_1)
Real Numbers & Number Lines (Geometry 2_1)
rfant
 
Geometric Progressions
Geometric ProgressionsGeometric Progressions
Geometric Progressionsitutor
 
Meaning and scope of accounting
Meaning and scope of accountingMeaning and scope of accounting
Meaning and scope of accounting
gherryta
 
Data Representation
Data RepresentationData Representation
Data Representation
Dilum Bandara
 
Power point presentation on knowing our numbers
Power point presentation on knowing our  numbersPower point presentation on knowing our  numbers
Power point presentation on knowing our numbers
Prakash Thapliyal
 
binary number system
 binary number system binary number system
binary number system
vishal gupta
 
Number System
Number SystemNumber System
Number System
Web Designer
 
Mathematics (Class VI) Day 1 chapter 1 Know our numbers
Mathematics (Class VI) Day 1 chapter 1   Know our numbersMathematics (Class VI) Day 1 chapter 1   Know our numbers
Mathematics (Class VI) Day 1 chapter 1 Know our numbers
Jasleen Samra
 
Clocks(quantitative aptitude)
Clocks(quantitative aptitude)Clocks(quantitative aptitude)
Clocks(quantitative aptitude)
Pawan Mishra
 
number system
number systemnumber system
number systemvirly dwe
 
Computer instructions
Computer instructionsComputer instructions
Computer instructionsAnuj Modi
 

What's hot (20)

1's and 2's complement
1's and 2's complement 1's and 2's complement
1's and 2's complement
 
Binary arithmetic
Binary arithmeticBinary arithmetic
Binary arithmetic
 
APPLICATION OF LINEAR ALGEBRA IN ECONOMICS
APPLICATION OF LINEAR ALGEBRA IN ECONOMICSAPPLICATION OF LINEAR ALGEBRA IN ECONOMICS
APPLICATION OF LINEAR ALGEBRA IN ECONOMICS
 
Chapter-1 Rational numbers Class 8th
Chapter-1 Rational numbers Class 8th Chapter-1 Rational numbers Class 8th
Chapter-1 Rational numbers Class 8th
 
NUMBER SYSTEM
NUMBER SYSTEMNUMBER SYSTEM
NUMBER SYSTEM
 
NUMBER SYSTEM CLASS-IX
NUMBER SYSTEM  CLASS-IXNUMBER SYSTEM  CLASS-IX
NUMBER SYSTEM CLASS-IX
 
Number system
Number systemNumber system
Number system
 
Binary Codes and Number System
Binary Codes and Number SystemBinary Codes and Number System
Binary Codes and Number System
 
Real Numbers & Number Lines (Geometry 2_1)
Real Numbers & Number Lines (Geometry 2_1)Real Numbers & Number Lines (Geometry 2_1)
Real Numbers & Number Lines (Geometry 2_1)
 
Geometric Progressions
Geometric ProgressionsGeometric Progressions
Geometric Progressions
 
Meaning and scope of accounting
Meaning and scope of accountingMeaning and scope of accounting
Meaning and scope of accounting
 
Data Representation
Data RepresentationData Representation
Data Representation
 
Power point presentation on knowing our numbers
Power point presentation on knowing our  numbersPower point presentation on knowing our  numbers
Power point presentation on knowing our numbers
 
binary number system
 binary number system binary number system
binary number system
 
Number System
Number SystemNumber System
Number System
 
Mathematics (Class VI) Day 1 chapter 1 Know our numbers
Mathematics (Class VI) Day 1 chapter 1   Know our numbersMathematics (Class VI) Day 1 chapter 1   Know our numbers
Mathematics (Class VI) Day 1 chapter 1 Know our numbers
 
Clocks(quantitative aptitude)
Clocks(quantitative aptitude)Clocks(quantitative aptitude)
Clocks(quantitative aptitude)
 
Number system conversion
Number system conversionNumber system conversion
Number system conversion
 
number system
number systemnumber system
number system
 
Computer instructions
Computer instructionsComputer instructions
Computer instructions
 

Similar to Number system 1

Number system
Number systemNumber system
Number system
RajThakuri
 
Chap02_1473751047_598100.ppt
Chap02_1473751047_598100.pptChap02_1473751047_598100.ppt
Chap02_1473751047_598100.ppt
NguyenThiTuBinhK17HL
 
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
wafaashalash
 
Data representation and boolean algebra
Data representation and boolean algebraData representation and boolean algebra
Data representation and boolean algebra
gourav kottawar
 
Data repersentation.
Data repersentation.Data repersentation.
Data repersentation.
Ritesh Saini
 
NUMBER SYSTEM.pptx
NUMBER SYSTEM.pptxNUMBER SYSTEM.pptx
NUMBER SYSTEM.pptx
AnaMarieFrane
 
DATA PRESENTATION
DATA PRESENTATIONDATA PRESENTATION
DATA PRESENTATION
shahzadebaujiti
 
Number system by ammar nawab
Number system by ammar nawabNumber system by ammar nawab
Number system by ammar nawab
Ammar_n
 
Data representation
Data representationData representation
Data representation
Manish Kumar
 
FYBSC IT Digital Electronics Unit I Chapter I Number System and Binary Arithm...
FYBSC IT Digital Electronics Unit I Chapter I Number System and Binary Arithm...FYBSC IT Digital Electronics Unit I Chapter I Number System and Binary Arithm...
FYBSC IT Digital Electronics Unit I Chapter I Number System and Binary Arithm...
Arti Parab Academics
 
computer Unit 2
computer Unit 2computer Unit 2
computer Unit 2
Aqeel Rehman
 
Module 1 number systems and code1
Module 1  number systems and code1Module 1  number systems and code1
Module 1 number systems and code1
Deepak John
 
Number System and Boolean Algebra
Number System and Boolean AlgebraNumber System and Boolean Algebra
Number System and Boolean Algebra
AMIE(I) Study Circle
 
numbersystem-150506052854-conversion-gate02 (3).pptx
numbersystem-150506052854-conversion-gate02 (3).pptxnumbersystem-150506052854-conversion-gate02 (3).pptx
numbersystem-150506052854-conversion-gate02 (3).pptx
anilmallah76
 
chapter2.pptx electrical engineering for student
chapter2.pptx electrical engineering for studentchapter2.pptx electrical engineering for student
chapter2.pptx electrical engineering for student
MidhaksaBelay
 
Computer Number system
Computer Number systemComputer Number system
Computer Number system
Anil Kumar Prajapati
 
numbersystem-211022083557.pdf
numbersystem-211022083557.pdfnumbersystem-211022083557.pdf
numbersystem-211022083557.pdf
AsthaChaurasia4
 
1. Digital Electronics - Number System PART 1.pptx
1. Digital Electronics - Number System PART 1.pptx1. Digital Electronics - Number System PART 1.pptx
1. Digital Electronics - Number System PART 1.pptx
vsigncontents
 
Data Representation
Data RepresentationData Representation
Data RepresentationRick Jamil
 
Chapter 1: Binary System
 Chapter 1: Binary System Chapter 1: Binary System
Chapter 1: Binary System
Er. Nawaraj Bhandari
 

Similar to Number system 1 (20)

Number system
Number systemNumber system
Number system
 
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
 
Data repersentation.
Data repersentation.Data repersentation.
Data repersentation.
 
NUMBER SYSTEM.pptx
NUMBER SYSTEM.pptxNUMBER SYSTEM.pptx
NUMBER SYSTEM.pptx
 
DATA PRESENTATION
DATA PRESENTATIONDATA PRESENTATION
DATA PRESENTATION
 
Number system by ammar nawab
Number system by ammar nawabNumber system by ammar nawab
Number system by ammar nawab
 
Data representation
Data representationData representation
Data representation
 
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...
 
computer Unit 2
computer Unit 2computer Unit 2
computer Unit 2
 
Module 1 number systems and code1
Module 1  number systems and code1Module 1  number systems and code1
Module 1 number systems and code1
 
Number System and Boolean Algebra
Number System and Boolean AlgebraNumber System and Boolean Algebra
Number System and Boolean Algebra
 
numbersystem-150506052854-conversion-gate02 (3).pptx
numbersystem-150506052854-conversion-gate02 (3).pptxnumbersystem-150506052854-conversion-gate02 (3).pptx
numbersystem-150506052854-conversion-gate02 (3).pptx
 
chapter2.pptx electrical engineering for student
chapter2.pptx electrical engineering for studentchapter2.pptx electrical engineering for student
chapter2.pptx electrical engineering for student
 
Computer Number system
Computer Number systemComputer Number system
Computer Number system
 
numbersystem-211022083557.pdf
numbersystem-211022083557.pdfnumbersystem-211022083557.pdf
numbersystem-211022083557.pdf
 
1. Digital Electronics - Number System PART 1.pptx
1. Digital Electronics - Number System PART 1.pptx1. Digital Electronics - Number System PART 1.pptx
1. Digital Electronics - Number System PART 1.pptx
 
Data Representation
Data RepresentationData Representation
Data Representation
 
Chapter 1: Binary System
 Chapter 1: Binary System Chapter 1: Binary System
Chapter 1: Binary System
 

More from Pawan Mishra

Logarithms
LogarithmsLogarithms
Logarithms
Pawan Mishra
 
Fundamentals of Quantitative Aptitude
Fundamentals of Quantitative AptitudeFundamentals of Quantitative Aptitude
Fundamentals of Quantitative Aptitude
Pawan Mishra
 
Important aptitude questions which are asked in the Infosys Placement
Important aptitude questions which are asked in the Infosys PlacementImportant aptitude questions which are asked in the Infosys Placement
Important aptitude questions which are asked in the Infosys Placement
Pawan Mishra
 
Calendars- Aptitude
Calendars- Aptitude Calendars- Aptitude
Calendars- Aptitude
Pawan Mishra
 
Infosys test pattern
Infosys test patternInfosys test pattern
Infosys test pattern
Pawan Mishra
 
Facts about number
Facts about numberFacts about number
Facts about number
Pawan Mishra
 
Maths fact
Maths factMaths fact
Maths fact
Pawan Mishra
 
number system
number systemnumber system
number system
Pawan Mishra
 
blood relation
blood relationblood relation
blood relation
Pawan Mishra
 
number system
number systemnumber system
number system
Pawan Mishra
 
number system
number systemnumber system
number system
Pawan Mishra
 
PERMUTATION & COMBINATION
PERMUTATION & COMBINATIONPERMUTATION & COMBINATION
PERMUTATION & COMBINATION
Pawan Mishra
 
Careers
CareersCareers
Careers
Pawan Mishra
 
Maths trick
Maths trickMaths trick
Maths trick
Pawan Mishra
 
Lateral puzzle
Lateral puzzleLateral puzzle
Lateral puzzle
Pawan Mishra
 
Maths shortcut
Maths shortcutMaths shortcut
Maths shortcut
Pawan Mishra
 
Amazing trick
Amazing trickAmazing trick
Amazing trick
Pawan Mishra
 
Ratio
Ratio Ratio
Ratio
Pawan Mishra
 
Ratio & propotion
Ratio & propotion Ratio & propotion
Ratio & propotion
Pawan Mishra
 

More from Pawan Mishra (20)

Logarithms
LogarithmsLogarithms
Logarithms
 
Fundamentals of Quantitative Aptitude
Fundamentals of Quantitative AptitudeFundamentals of Quantitative Aptitude
Fundamentals of Quantitative Aptitude
 
Important aptitude questions which are asked in the Infosys Placement
Important aptitude questions which are asked in the Infosys PlacementImportant aptitude questions which are asked in the Infosys Placement
Important aptitude questions which are asked in the Infosys Placement
 
Calendars- Aptitude
Calendars- Aptitude Calendars- Aptitude
Calendars- Aptitude
 
Infosys test pattern
Infosys test patternInfosys test pattern
Infosys test pattern
 
Facts about number
Facts about numberFacts about number
Facts about number
 
Maths fact
Maths factMaths fact
Maths fact
 
number system
number systemnumber system
number system
 
blood relation
blood relationblood relation
blood relation
 
number system
number systemnumber system
number system
 
number system
number systemnumber system
number system
 
PERMUTATION & COMBINATION
PERMUTATION & COMBINATIONPERMUTATION & COMBINATION
PERMUTATION & COMBINATION
 
Careers
CareersCareers
Careers
 
Maths trick
Maths trickMaths trick
Maths trick
 
Lateral puzzle
Lateral puzzleLateral puzzle
Lateral puzzle
 
Maths shortcut
Maths shortcutMaths shortcut
Maths shortcut
 
Magic math
Magic mathMagic math
Magic math
 
Amazing trick
Amazing trickAmazing trick
Amazing trick
 
Ratio
Ratio Ratio
Ratio
 
Ratio & propotion
Ratio & propotion Ratio & propotion
Ratio & propotion
 

Recently uploaded

2024.06.01 Introducing a competency framework for languag learning materials ...
2024.06.01 Introducing a competency framework for languag learning materials ...2024.06.01 Introducing a competency framework for languag learning materials ...
2024.06.01 Introducing a competency framework for languag learning materials ...
Sandy Millin
 
Unit 2- Research Aptitude (UGC NET Paper I).pdf
Unit 2- Research Aptitude (UGC NET Paper I).pdfUnit 2- Research Aptitude (UGC NET Paper I).pdf
Unit 2- Research Aptitude (UGC NET Paper I).pdf
Thiyagu K
 
Digital Tools and AI for Teaching Learning and Research
Digital Tools and AI for Teaching Learning and ResearchDigital Tools and AI for Teaching Learning and Research
Digital Tools and AI for Teaching Learning and Research
Vikramjit Singh
 
The approach at University of Liverpool.pptx
The approach at University of Liverpool.pptxThe approach at University of Liverpool.pptx
The approach at University of Liverpool.pptx
Jisc
 
Multithreading_in_C++ - std::thread, race condition
Multithreading_in_C++ - std::thread, race conditionMultithreading_in_C++ - std::thread, race condition
Multithreading_in_C++ - std::thread, race condition
Mohammed Sikander
 
Synthetic Fiber Construction in lab .pptx
Synthetic Fiber Construction in lab .pptxSynthetic Fiber Construction in lab .pptx
Synthetic Fiber Construction in lab .pptx
Pavel ( NSTU)
 
1.4 modern child centered education - mahatma gandhi-2.pptx
1.4 modern child centered education - mahatma gandhi-2.pptx1.4 modern child centered education - mahatma gandhi-2.pptx
1.4 modern child centered education - mahatma gandhi-2.pptx
JosvitaDsouza2
 
Chapter -12, Antibiotics (One Page Notes).pdf
Chapter -12, Antibiotics (One Page Notes).pdfChapter -12, Antibiotics (One Page Notes).pdf
Chapter -12, Antibiotics (One Page Notes).pdf
Kartik Tiwari
 
Supporting (UKRI) OA monographs at Salford.pptx
Supporting (UKRI) OA monographs at Salford.pptxSupporting (UKRI) OA monographs at Salford.pptx
Supporting (UKRI) OA monographs at Salford.pptx
Jisc
 
The basics of sentences session 5pptx.pptx
The basics of sentences session 5pptx.pptxThe basics of sentences session 5pptx.pptx
The basics of sentences session 5pptx.pptx
heathfieldcps1
 
The Accursed House by Émile Gaboriau.pptx
The Accursed House by Émile Gaboriau.pptxThe Accursed House by Émile Gaboriau.pptx
The Accursed House by Émile Gaboriau.pptx
DhatriParmar
 
BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...
BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...
BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...
Nguyen Thanh Tu Collection
 
Lapbook sobre os Regimes Totalitários.pdf
Lapbook sobre os Regimes Totalitários.pdfLapbook sobre os Regimes Totalitários.pdf
Lapbook sobre os Regimes Totalitários.pdf
Jean Carlos Nunes Paixão
 
Biological Screening of Herbal Drugs in detailed.
Biological Screening of Herbal Drugs in detailed.Biological Screening of Herbal Drugs in detailed.
Biological Screening of Herbal Drugs in detailed.
Ashokrao Mane college of Pharmacy Peth-Vadgaon
 
Francesca Gottschalk - How can education support child empowerment.pptx
Francesca Gottschalk - How can education support child empowerment.pptxFrancesca Gottschalk - How can education support child empowerment.pptx
Francesca Gottschalk - How can education support child empowerment.pptx
EduSkills OECD
 
The French Revolution Class 9 Study Material pdf free download
The French Revolution Class 9 Study Material pdf free downloadThe French Revolution Class 9 Study Material pdf free download
The French Revolution Class 9 Study Material pdf free download
Vivekanand Anglo Vedic Academy
 
Thesis Statement for students diagnonsed withADHD.ppt
Thesis Statement for students diagnonsed withADHD.pptThesis Statement for students diagnonsed withADHD.ppt
Thesis Statement for students diagnonsed withADHD.ppt
EverAndrsGuerraGuerr
 
A Survey of Techniques for Maximizing LLM Performance.pptx
A Survey of Techniques for Maximizing LLM Performance.pptxA Survey of Techniques for Maximizing LLM Performance.pptx
A Survey of Techniques for Maximizing LLM Performance.pptx
thanhdowork
 
special B.ed 2nd year old paper_20240531.pdf
special B.ed 2nd year old paper_20240531.pdfspecial B.ed 2nd year old paper_20240531.pdf
special B.ed 2nd year old paper_20240531.pdf
Special education needs
 
Digital Artifact 2 - Investigating Pavilion Designs
Digital Artifact 2 - Investigating Pavilion DesignsDigital Artifact 2 - Investigating Pavilion Designs
Digital Artifact 2 - Investigating Pavilion Designs
chanes7
 

Recently uploaded (20)

2024.06.01 Introducing a competency framework for languag learning materials ...
2024.06.01 Introducing a competency framework for languag learning materials ...2024.06.01 Introducing a competency framework for languag learning materials ...
2024.06.01 Introducing a competency framework for languag learning materials ...
 
Unit 2- Research Aptitude (UGC NET Paper I).pdf
Unit 2- Research Aptitude (UGC NET Paper I).pdfUnit 2- Research Aptitude (UGC NET Paper I).pdf
Unit 2- Research Aptitude (UGC NET Paper I).pdf
 
Digital Tools and AI for Teaching Learning and Research
Digital Tools and AI for Teaching Learning and ResearchDigital Tools and AI for Teaching Learning and Research
Digital Tools and AI for Teaching Learning and Research
 
The approach at University of Liverpool.pptx
The approach at University of Liverpool.pptxThe approach at University of Liverpool.pptx
The approach at University of Liverpool.pptx
 
Multithreading_in_C++ - std::thread, race condition
Multithreading_in_C++ - std::thread, race conditionMultithreading_in_C++ - std::thread, race condition
Multithreading_in_C++ - std::thread, race condition
 
Synthetic Fiber Construction in lab .pptx
Synthetic Fiber Construction in lab .pptxSynthetic Fiber Construction in lab .pptx
Synthetic Fiber Construction in lab .pptx
 
1.4 modern child centered education - mahatma gandhi-2.pptx
1.4 modern child centered education - mahatma gandhi-2.pptx1.4 modern child centered education - mahatma gandhi-2.pptx
1.4 modern child centered education - mahatma gandhi-2.pptx
 
Chapter -12, Antibiotics (One Page Notes).pdf
Chapter -12, Antibiotics (One Page Notes).pdfChapter -12, Antibiotics (One Page Notes).pdf
Chapter -12, Antibiotics (One Page Notes).pdf
 
Supporting (UKRI) OA monographs at Salford.pptx
Supporting (UKRI) OA monographs at Salford.pptxSupporting (UKRI) OA monographs at Salford.pptx
Supporting (UKRI) OA monographs at Salford.pptx
 
The basics of sentences session 5pptx.pptx
The basics of sentences session 5pptx.pptxThe basics of sentences session 5pptx.pptx
The basics of sentences session 5pptx.pptx
 
The Accursed House by Émile Gaboriau.pptx
The Accursed House by Émile Gaboriau.pptxThe Accursed House by Émile Gaboriau.pptx
The Accursed House by Émile Gaboriau.pptx
 
BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...
BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...
BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...
 
Lapbook sobre os Regimes Totalitários.pdf
Lapbook sobre os Regimes Totalitários.pdfLapbook sobre os Regimes Totalitários.pdf
Lapbook sobre os Regimes Totalitários.pdf
 
Biological Screening of Herbal Drugs in detailed.
Biological Screening of Herbal Drugs in detailed.Biological Screening of Herbal Drugs in detailed.
Biological Screening of Herbal Drugs in detailed.
 
Francesca Gottschalk - How can education support child empowerment.pptx
Francesca Gottschalk - How can education support child empowerment.pptxFrancesca Gottschalk - How can education support child empowerment.pptx
Francesca Gottschalk - How can education support child empowerment.pptx
 
The French Revolution Class 9 Study Material pdf free download
The French Revolution Class 9 Study Material pdf free downloadThe French Revolution Class 9 Study Material pdf free download
The French Revolution Class 9 Study Material pdf free download
 
Thesis Statement for students diagnonsed withADHD.ppt
Thesis Statement for students diagnonsed withADHD.pptThesis Statement for students diagnonsed withADHD.ppt
Thesis Statement for students diagnonsed withADHD.ppt
 
A Survey of Techniques for Maximizing LLM Performance.pptx
A Survey of Techniques for Maximizing LLM Performance.pptxA Survey of Techniques for Maximizing LLM Performance.pptx
A Survey of Techniques for Maximizing LLM Performance.pptx
 
special B.ed 2nd year old paper_20240531.pdf
special B.ed 2nd year old paper_20240531.pdfspecial B.ed 2nd year old paper_20240531.pdf
special B.ed 2nd year old paper_20240531.pdf
 
Digital Artifact 2 - Investigating Pavilion Designs
Digital Artifact 2 - Investigating Pavilion DesignsDigital Artifact 2 - Investigating Pavilion Designs
Digital Artifact 2 - Investigating Pavilion Designs
 

Number system 1

  • 2. 2.2  Understand the concept of number systems.  Distinguish between non-positional and positional number systems.  Describe the decimal, binary, hexadecimal and octal system. Convert a number in binary, octal or hexadecimal to a number in the decimal system.  Convert a number in the decimal system to a number in binary, octal and hexadecimal.  Convert a number in binary to octal and vice versa.  Convert a number in binary to hexadecimal and vice versa.  Find the number of digits needed in each system to represent a particular value. ObjectivesObjectives After studying this chapter, the student should be ableAfter studying this chapter, the student should be able to:to:
  • 3. 2.3 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. Several number systems have been used in the pastSeveral number systems have been used in the past and can be categorized into two groups:and can be categorized into two groups: positionalpositional andand non-positionalnon-positional systems. Our main goal is to discuss thesystems. Our main goal is to discuss the positional number systems, but we also give examples ofpositional number systems, but we also give examples of non-positional systems.non-positional systems.
  • 6. 2.6 2-2 POSITIONAL NUMBER SYSTEMS2-2 POSITIONAL NUMBER SYSTEMS In aIn a positional number systempositional number system, the position a symbol, the position a symbol occupies in the number determines the value itoccupies in the number determines the value it represents. In this system, a number represented as:represents. In this system, a number represented as: has the value of:has the value of: in which S is the set of symbols, b is thein which S is the set of symbols, b is the basebase (or(or radixradix).).
  • 7. 2.7 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.
  • 8. 2.8 Integers Figure 2.1 Place values for an integer in the decimal system
  • 9. 2.9 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.
  • 10. 2.10 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
  • 11. 2.11 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.
  • 12. 2.12 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).
  • 13. 2.13 Integers Figure 2.2 Place values for an integer in the binary system
  • 14. 2.14 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.
  • 15. 2.15 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.
  • 16. 2.16 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.
  • 17. 2.17 Integers Figure 2.3 Place values for an integer in the hexadecimal system
  • 18. 2.18 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.
  • 19. 2.19 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}
  • 20. 2.20 Integers Figure 2.3 Place values for an integer in the octal system
  • 21. 2.21 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.
  • 22. 2.22 Table 2.1 shows a summary of the four positional number systems discussed in this chapter. Summary of the four positional systems
  • 23. 2.23 Table 2.2 shows how the number 0 to 15 is represented in different systems.
  • 24. 2.24 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
  • 25. 2.25 Any base to decimal conversion Figure 2.5 Converting other bases to decimal
  • 26. 2.26 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.
  • 27. 2.27 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).
  • 28. 2.28 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.
  • 29. 2.29 Decimal to any base Figure 2.6 Converting other bases to decimal (integral part)
  • 30. 2.30 Figure 2.7 Converting the integral part of a number in decimal to other bases
  • 31. 2.31 Example 2.11 The following shows how to convert 35 in decimal to binary. WeThe following shows how to convert 35 in decimal to binary. We start with the number in decimal, we move to the left whilestart with the number in decimal, we move to the left while continuously finding the quotients and the remainder of divisioncontinuously finding the quotients and the remainder of division by 2. The result is 35 = (100011)by 2. The result is 35 = (100011)22..
  • 32. 2.32 Example 2.12 The following shows how to convert 126 in decimal to itsThe following shows how to convert 126 in decimal to its equivalent in the octal system. We move to the right whileequivalent in the octal system. We move to the right while continuously finding the quotients and the remainder of divisioncontinuously finding the quotients and the remainder of division by 8. The result is 126 = (176)by 8. The result is 126 = (176)88..
  • 33. 2.33 Example 2.13 The following shows how we convert 126 in decimal to itsThe following shows how we convert 126 in decimal to its equivalent in the hexadecimal system. We move to the rightequivalent in the hexadecimal system. We move to the right while continuously finding the quotients and the remainder ofwhile continuously finding the quotients and the remainder of division by 16. The result is 126 = (7E)division by 16. The result is 126 = (7E)1616
  • 34. 2.34 Figure 2.8 Converting the fractional part of a number in decimal to other bases
  • 35. 2.35 Figure 2.9 Converting the fractional part of a number in decimal to other bases
  • 36. 2.36 Example 2.14 Convert the decimal number 0.625 to binary.Convert the decimal number 0.625 to binary. Since the number 0.625 = (0.101)Since the number 0.625 = (0.101)22 has no integral part, thehas no integral part, the example shows how the fractional part is calculated.example shows how the fractional part is calculated.
  • 37. 2.37 Example 2.15 The following shows how to convert 0.634 to octal using aThe following shows how to convert 0.634 to octal using a maximum of four digits. The result is 0.634 = (0.5044)maximum of four digits. The result is 0.634 = (0.5044)88. Note. Note that we multiple by 8 (base octal).that we multiple by 8 (base octal).
  • 38. 2.38 Example 2.16 The following shows how to convert 178.6 in decimal toThe following shows how to convert 178.6 in decimal to hexadecimal using only one digit to the right of the decimalhexadecimal using only one digit to the right of the decimal point. The result is 178.6 = (B2.9)point. The result is 178.6 = (B2.9)1616 Note that we divide orNote that we divide or multiple by 16 (base hexadecimal).multiple by 16 (base hexadecimal).
  • 39. 2.39 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:
  • 40. 2.40 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
  • 41. 2.41 Binary-hexadecimal conversion Figure 2.10 Binary to hexadecimal and hexadecimal to binary conversion
  • 42. 2.42 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.
  • 43. 2.43 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..
  • 44. 2.44 Binary-octal conversion Figure 2.10 Binary to octal and octal to binary conversion
  • 45. 2.45 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
  • 46. 2.46 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..
  • 47. 2.47 Octal-hexadecimal conversion Figure 2.12 Octal to hexadecimal and hexadecimal to octal conversion
  • 48. 2.48 Example 2.23 Find the minimum number of binary digits required to storeFind the minimum number of binary digits required to store decimal integers with a maximum of six digits.decimal integers with a maximum of six digits. SolutionSolution kk = 6, b= 6, b11 = 10, and b= 10, and b22 = 2. Then= 2. Then xx == kk × (logb× (logb11 / logb/ logb22)) == 6 × (1 / 0.30103)6 × (1 / 0.30103) = 20.= 20. The largest six-digit decimal number is 999,999 and the largestThe largest six-digit decimal number is 999,999 and the largest 20-bit binary number is 1,048,575. Note that the largest number20-bit binary number is 1,048,575. Note that the largest number that can be represented by a 19-bit number is 524287, which isthat can be represented by a 19-bit number is 524287, which is smaller than 999,999. We definitely need twenty bits.smaller than 999,999. We definitely need twenty bits.
  • 49. 2.49 2-3 NONPOSITIONAL NUMBER SYSTEMS2-3 NONPOSITIONAL NUMBER SYSTEMS AlthoughAlthough non-positional number systemsnon-positional number systems are not usedare not used in computers, we give a short review here forin computers, we give a short review here for comparison with positional number systems. A non-comparison with positional number systems. A non- positional number system still uses a limited number ofpositional number system still uses a limited number of symbols in which each symbol has a value. However,symbols in which each symbol has a value. However, the position a symbol occupies in the number normallythe position a symbol occupies in the number normally bears no relation to its value—the value of each symbolbears no relation to its value—the value of each symbol is fixed. To find the value of a number, we add the valueis fixed. To find the value of a number, we add the value of all symbols present in the representation.of all symbols present in the representation.
  • 50. 2.50 In this system, a number is represented as:In this system, a number is represented as: and has the value of:and has the value of: There are some exceptions to the addition rule we justThere are some exceptions to the addition rule we just mentioned, as shown in Example 2.24.mentioned, as shown in Example 2.24.
  • 51. 2.51 Example 2.24 Roman numerals are a good example of a non-positional numberRoman numerals are a good example of a non-positional number system. This number system has a set of symbolssystem. This number system has a set of symbols S = {I, V, X, L, C, D, M}. The values of each symbol are shownS = {I, V, X, L, C, D, M}. The values of each symbol are shown in Table 2.3in Table 2.3 To find the value of a number, we need to add the value ofTo find the value of a number, we need to add the value of symbols subject to specific rules (See the textbook).symbols subject to specific rules (See the textbook).
  • 52. 2.52 Example 2.24 The following shows some Roman numbers and their values.The following shows some Roman numbers and their values. (Continued)(Continued)