×
Expect problems and eat them for breakfast.

# Note for Numerical Methods - NM by Suhas Mondal

• Numerical Methods - NM
• Note
• West Bengal University of technology - WBUT
• Civil Engineering
• B.Tech
• 12 Topics
• 2914 Views
0 User(s)

#### Text from page-3

For example let us find the hexadecimal equivalent of The vice-versa is also true. Octal System: The octal system is the positional system that uses 8 as its base and as its symbol set of size 8. The decimal equivalent of an octal number is given by . For example consider We can get the octal equivalent of a binary number by grouping the binary digits, starting from the right, into sets of three binary digits and converting each of these sets to its octal equivalent. If such a grouping results in a last set having less number of digits it may be prefixed with adequate number of binary digit 0. As an example the octal equivalent of Conversion of decimal system to non-decimal system: To convert a decimal number to a number of any other system we should consider the integer and fractional parts separately and follow the following procedure: Conversion of integer part: (a) Consider the integer part of a given decimal number and divide it by the base b of the new number system. The remainder will constitute the rightmost digit of the integer 3

#### Text from page-4

part of the new number. (b) Next divide the quotient again by the base b. The remainder will constitute second digit from the right in the new system. Continue this process until we end up with a zero-quotient. The last remainder is the leftmost digit of the new number. Conversion of fractional part: (a) Consider the fractional part of the given decimal number and multiply it with the base b of the new system. The integral part of the product constitutes the leftmost digit of the fractional part in the new system. (b) Now again multiply the fractional part resulting in step (a) by the base b of the new system. The integral part of the resultant product is the second digit from the left in the new system. Repeat the above step until we encounter a zero-fractional part or a duplicate fractional part. The integer part of this last product will be the rightmost digit of the fractional part of the new number. Eg: Convert 54.45 into its binary equivalent. (a) Consider the integer part i.e. 54 and apply the steps listed under conversion of integer part i.e. (b) Conversion of fractional part: Product integral part Binary number 4

#### Text from page-5

0.45 2 = 0.90 0 0.9 2 = 1.80 1 0.8 2 = 1.6 1 0.6 2 = 1.2 1 0.2 2 = 0.4 0 0.4 2 = 0.8 0 0.8 2 = 1.6 1 0.6 2 = 1.2 1 0.2 2 = 0.4 0 0.4 2 = 0.8 0 0.8 2 = 1.6 1 Here the overbar denotes the repetition of the binary digits. Note: Using binary system as an intermediate stage we can easily convert octal numbers to hexadecimal numbers and vice-versa. 5

#### Text from page-6

In the above two examples we have grouped the binary digits suitably either to quadruplets or triplets to convert octal to hexadecimal and hexadecimal to octal numbers respectively. 6