Thursday, June 17, 2010

Number System-I, Very Systematic


As promised, coming back after a week. this time we will talk about Number System and its conversation.

Positional number systems

Our decimal number system is known as a positional number system, because the value of the number depends on the position of the digits. For example, the number 156 has a very different value than the number 165, although the same digits are used in both numbers.

In a positional number system, the value of each digit is determined by which place it appears in the full number. The lowest place value is the rightmost position, and each successive position to the left has a higher place value.

In our decimal number system, the rightmost position represents the "ones" column, the next position represents the "tens" column, the next position represents "hundreds", etc. Therefore, the number 156 represents 1 hundred and 5 tens and 6 ones, whereas the number 165 represents 1 hundreds and 6 tens and 5 one.

Other number systems use different bases. The binary number system uses base 2, so the place values of the digits of a binary number correspond to powers of 2. The octal number system uses base 8, so the place values of the digits of a octal number correspond to powers of 8. The Hexadecimal number system uses base 16, so the place values of the digits of a binary number correspond to powers of 16. However, Hexadecimal number system also represent by alphabets. From 0 to 9 as numbers and 10 to 15 numbers are represent by alphabet A-F.

Decimal to Binary

(75.625)10 -> (?)2 First take the whole number and divide by 2, the radix or base of binary number or to which number system you want to convert.

Integer Part :

NotesProcessQuotientRemainder
Start by dividing the number by 2
In this case, 75 divided by 2
Quotient is 37 and the remainder is 1
75 / 2371
Then, divide the quotient again by 2,
and repeat it .
37 /2181
18 / 290
9 / 24 1
4 / 220
2 / 210
Stop because the result is already 0 (0 divided by 2 will always be 0). Write down the numbers in remainders column in reverse order, last digit to the first.1 / 201



Decimal Part

NotesProcessResultWhole number
Multiply the decimal part by 2 and The whole number part of the result is the first binary digit to the right of the point, put away it and continue multiple the fraction part.625 * 21.251
No whole number indicate a '0'.25 * 2.500
When there are no fraction left, the conversion is complete. Here you have to write the values top to bottom order.50 * 21.001
Sometime you will find the process going infinite nos. of times, just do till five or six places and write result with [approx]



The result : (75.625)10 -> (1001011.101)2

The process for converting decimal to octal or decimal to Hexadecimal will be same only the radix or base will change from 2 to 8 or 16.

Decimal to Octal

(75.625)10 -> (?)8 First take the whole number and divide by 2, the radix or base of binary number or to which number system you want to convert.

Integer Part :

NotesProcessQuotientRemainder
Start by dividing the number by 8
In this case, 75 divided by 8
Quotient is and the remainder is
75 / 893
Then, divide the quotient again by 8,
and repeat it .
9 /811
Stop because the result is already 0 (0 divided by 8 will always be 0). Write down the numbers in remainders column in reverse order, last digit to the first. 1 / 801

Decimal Part

NotesProcessResultWhole number
Multiply the decimal part by 8 and The whole number part of the result is the first binary digit to the right of the point, put away it and continue multiple the fraction part.625 * 85.0005
When there are no fraction left, the conversion is complete. Here you have to write the values top to bottom order
Sometime you will find the process going infinite nos. of times, just do till five or six places and write result with [approx]


Result : (75.625)10 = (113.5)8

Decimal to Hexadecimal

(75.625)10 -> (?)16 First take the whole number and divide by 2, the radix or base of binary number or to which number system you want to convert.

Integer Part :

NotesProcessQuotientRemainder
Start by dividing the number by 16
In this case, 75 divided by 16
Quotient is and the remainder is
75 / 16411
Then, divide the quotient again by 16,
and repeat it .
4 / 1604
Stop because the result is already 0 (0 divided by 8 will always be 0). Write down the numbers in remainders column in reverse order, last digit to the first.

Decimal Part

NotesProcessResultWhole number
Multiply the decimal part by 16and The whole number part of the result is the first binary digit to the right of the point, put away it and continue multiple the fraction part.625 * 1612.00012
When there are no fraction left, the conversion is complete. Here you have to write the values top to bottom order
Sometime you will find the process going infinite nos. of times, just do till five or six places and write result with [approx]


Result : (75.625)10 -> (4B.C)16

Following chart show the relation between the four number system.

Decimal Binary Octal Hexadecimal
0 0000 0 0
1 0001 1 1
2 0010 2 2
3 0011 3 3
4 0100 4 4
5 0101 5 5
6 0110 6 6
7 0111 7 7
8 1000 10 8
9 1001 11 9
10 1010 12 A
11 1011 13 B
12 1100 14 C
13 1101 15 D
14 1110 16 E
15 1111 17 F
16 10000 20 10

After fortnight I will back with converting other number system to decimal.

No comments: