0% found this document useful (0 votes)
58 views23 pages

Topic 4 Number System

The document provides an overview of number systems, including non-positional and positional systems, with a focus on decimal, binary, octal, and hexadecimal systems. It explains the conversion methods between different bases and how to represent fractional numbers in binary. The document also outlines upcoming topics related to computer arithmetic.

Uploaded by

myatoothar5
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
58 views23 pages

Topic 4 Number System

The document provides an overview of number systems, including non-positional and positional systems, with a focus on decimal, binary, octal, and hexadecimal systems. It explains the conversion methods between different bases and how to represent fractional numbers in binary. The document also outlines upcoming topics related to computer arithmetic.

Uploaded by

myatoothar5
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 23

Yangon Technological University

1/23

Number System

By Dr. Thanda Win


Professor
Department of Computer Engineering and Information Technology
Yangon Technological University

“Computer Fundamentals”, Pradeep K. Sinha and Priti Sinh, 6th Edition, 2011.
Outlines
2/23

• Non-positional number system


• Position number system
• Decimal number system
• Octal number system
• Hexadecimal number system
• Conversion number system to another
• Fractional numbers in binary number system

“Computer Fundamentals”, Pradeep K. Sinha and Priti Sinh, 6th Edition, 2011.
Two Types of Number System
3/23

 Non-positional number system


 Characteristics
o Use symbols such as I for 1, II for 2, III for 3, IV for 4, etc,
o Each symbol represents the same value regardless of its position in the number.
o The symbols are simply added to find out the value of a particular number.
 Difficulty
o It is difficult to perform arithmetic with such a number system.

 Positional number system


 Characteristics
o Use only a few symbols called digits.
o These symbols represent different values depending on the position they occupy in
the number.
“Computer Fundamentals”, Pradeep K. Sinha and Priti Sinh, 6th Edition, 2011.
Positional Number System
4/23

 The value of each digit is determined by:

 The digit itself

 The position of the digit in the number

 The base of the number system

“Computer Fundamentals”, Pradeep K. Sinha and Priti Sinh, 6th Edition, 2011.
Positional Number System
5/23

 Decimal number system


 10 symbols or digits:0,1,2,3,4,5,6,7,8,9 (base=10)
 Each position of a digit represents a specific power of the base (10)

 Binary number system


 2 symbols or digits:
 0 and 1 (base=2)
 Each position of a digit represents a specific power of the base (2)
 This number is used in computers

 Octal number system


 8 symbols or digits:0,1,2,3,4,5,6,7 (base=8)
 Each position of a digit represents a specific power of the base (8)

 Hexadecimal number system,


 16 symbols or digits:0,1,2,3,4,5,6,7,8,9, A, B,C,D,E,F (base=16)
 Each position of a digit represents a specific power of the base (16)

“Computer Fundamentals”, Pradeep K. Sinha and Priti Sinh, 6th Edition, 2011.
Decimal Number System
6/23

 Example

“Computer Fundamentals”, Pradeep K. Sinha and Priti Sinh, 6th Edition, 2011.
Binary Number System
7/23

 Example

 Bit

 Bit stands for binary digit.

 A bit in computer terminology means either a 0 or a 1

 A binary number consisting of n bits is called an n-bit number.


 Representing Numbers in Different Number Systems
101012 =2110
“Computer Fundamentals”, Pradeep K. Sinha and Priti Sinh, 6th Edition, 2011.
Octal Number System
8/23

 Since there are only 8 digits, 3 bits (23=8) are sufficient to represent any

octal number in binary.

 Example

“Computer Fundamentals”, Pradeep K. Sinha and Priti Sinh, 6th Edition, 2011.
Hexadecimal Number System
9/23

 Since there are only 16 digits, 4 bits (24=16) are sufficient to represent any

hexadecimal number in binary.

 Example

“Computer Fundamentals”, Pradeep K. Sinha and Priti Sinh, 6th Edition, 2011.
Converting a Number of Another Base to a Decimal Number
10/23

 Method

 Step 1: Determine the column (positional) value of each digit.

 Step 2: Multiply the obtained column values by the digits in the corresponding
columns.

 Step 3: Calculate the sum of these products.

“Computer Fundamentals”, Pradeep K. Sinha and Priti Sinh, 6th Edition, 2011.
Contd.
11/23

 Example

“Computer Fundamentals”, Pradeep K. Sinha and Priti Sinh, 6th Edition, 2011.
Converting a Decimal Number to a Number of Another Base
12/23

 Division-Remainder Method

 Step 1: Divide the decimal number to be converted by the value of the new base.
 Step 2: Record the remainder from step 1 as the rightmost digit (least significant digit) of
the new base number
 Step 3: Divide the quotient of the previous divide by the new base.
 Step 4: Record the remainder from step 3 as the next digit (to the left) of the new base
number.
Repeat step 3 and 4, recording remainders from right to left, until the quotient becomes

zero in step 3.
• The last remainder thus obtained will be the most significant digit (MSD) of the new
base number.
“Computer Fundamentals”, Pradeep K. Sinha and Priti Sinh, 6th Edition, 2011.
Contd.
13/23

 Example

“Computer Fundamentals”, Pradeep K. Sinha and Priti Sinh, 6th Edition, 2011.
Converting a Number of Some Base to a Number of Another Base

14/23

 Method

 Step 1: Convert the origin number to a decimal number (base 10).

 Step 2: Convert the decimal number so obtained to the new base number.

 Example

“Computer Fundamentals”, Pradeep K. Sinha and Priti Sinh, 6th Edition, 2011.
Contd.
15/23

“Computer Fundamentals”, Pradeep K. Sinha and Priti Sinh, 6th Edition, 2011.
Converting a Binary Number to its Equivalent Octal Number
16/23

 Method
 Step 1: Divide the digits into group of three starting from the right
 Step 2: Convert each group of three binary digits to one octal digit using the
method of binary to decimal conversion.
 Example

“Computer Fundamentals”, Pradeep K. Sinha and Priti Sinh, 6th Edition, 2011.
Converting an Octal Number to its Equivalent Binary Number
17/23
 Method
 Step 1: Convert each octal digit to a 3 digit binary number (the octal digits may
be
 Step 2: Combine all the resulting binary groups (of 3 digits each) into a single
binary number.
 Example

“Computer Fundamentals”, Pradeep K. Sinha and Priti Sinh, 6th Edition, 2011.
Converting a Binary Number to its Equivalent Hexadecimal Number
18/23

 Method
 Step 1: Divide the binary digits into groups of four starting from the right.

 Step 2: Combine each group of four binary digits to one hexadecimal digit.
 Example

“Computer Fundamentals”, Pradeep K. Sinha and Priti Sinh, 6th Edition, 2011.
Converting a Hexadecimal Number to its Equivalent Binary Number
19/23

 Method

 Step 1: Convert the decimal equivalent of each hexadecimal digit to a 4 digit


binary number.

 Step 2: Combine all the resulting binary groups (of 4 digits each) in a single
binary number.
 Example

“Computer Fundamentals”, Pradeep K. Sinha and Priti Sinh, 6th Edition, 2011.
Formation of Fractional Number in Binary Number System
20/23

 Example

“Computer Fundamentals”, Pradeep K. Sinha and Priti Sinh, 6th Edition, 2011.
Formation of Fractional Number in Octal Number System
21/23

 Example

“Computer Fundamentals”, Pradeep K. Sinha and Priti Sinh, 6th Edition, 2011.
Next Lecture
22/23

 Computer Arithmetic

 Binary Addition

 Binary Subtraction

 Binary Multiplication

 Binary Division

• Signed Binary Numbers

• Additive Method of Multiplication and Division

“Computer Fundamentals”, Pradeep K. Sinha and Priti Sinh, 6th Edition, 2011.
23/23

ANY QUESTIONS?

“Computer Fundamentals”, Pradeep K. Sinha and Priti Sinh, 6th Edition, 2011.

You might also like