Topic 4 Number System
Topic 4 Number System
1/23
Number System
“Computer Fundamentals”, Pradeep K. Sinha and Priti Sinh, 6th Edition, 2011.
Outlines
2/23
“Computer Fundamentals”, Pradeep K. Sinha and Priti Sinh, 6th Edition, 2011.
Two Types of Number System
3/23
“Computer Fundamentals”, Pradeep K. Sinha and Priti Sinh, 6th Edition, 2011.
Positional Number System
5/23
“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
Since there are only 8 digits, 3 bits (23=8) are sufficient to represent any
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
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 2: Multiply the obtained column values by the digits in the corresponding
columns.
“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 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 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
“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.