×
In life, NO ONE and NOTHING will help you until you start helping YOURSELF.

# Note for Numerical Methods - NM by Suhas Mondal

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

#### Text from page-2

Similarly, a fractional part of a decimal number can be expressed as Binary system: Binary system is the positional system consisting of two symbols i.e. 0,1 and '2' as its base. Any binary number actually represents a decimal value given by where Consider the binary number 10101. The decimal equivalent of 10101 is given by Hexadecimal System: The Hexadecimal system is the positional system consisting of sixteen symbols, 0,1,2...9,A,B,C,D,E,F, and '16' as its base. Here the symbols A denotes 10, B denotes 11 and so on. The decimal equivalent of the given hexadecimal number is given by . For example consider . We can convert a binary number directly to a hexadecimal number by grouping the binary digits, starting from the right, into sets of four and converting each group to its equivalent hexadecimal digit. If in such a grouping the last set falls short of four binary digits then do the obvious thing of prefixing it with adequate number of binary digit '0'. 2

#### 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