Welcome to Scribd, the world's digital library. Read, publish, and share books and documents. See more
Standard view
Full view
of .
0 of .
Results for:
P. 1
Computer Number Systems, Approximation in Numerical Computation

Computer Number Systems, Approximation in Numerical Computation

Ratings: (0)|Views: 980|Likes:
Computer Number Systems, Approximation in Numerical Computation
Computer Number Systems, Approximation in Numerical Computation

Availability:

See more
See less

02/08/2012

pdf

text

original

Computer Representation of Numbers and Computer Arithmetic
In a Computer numbers are represented by binary digits 0 and 1. Computers employbinary arithmetic for performing operations on numbers. Since it gets cumbersome todisplay large numbers in binary form computers usually display them in hexadecimal oroctal or decimal system. All of these number systems are positional systems. In apositional system a number is represented by a set of symbols. Each of these symbolsdenote a particular value depending on its position. The number of symbols used in apositional system depends on its 'base'. Let us now discuss about various positionalnumber systems:
Decimal System
:The decimal system uses 10 as its base value and employs ten symbols 0 to 9 inrepresenting numbers. Let us consider a decimal number 7402 consisting of foursymbols 7,4,0,2. In terms of base 10 it can be expressed as follows.So each of the symbols from a set of symbols denoting a number is multiplied withpower of the base (10) depending on its position counted from the right. The countalways begins with 0.In general a decimal number consisting of symbols can beexpressed as:where,
mywbut.com 1

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 itsbase. Any binary number actually represents a decimal value given bywhereConsider the binary number 10101. The decimal equivalent of 10101 is given by
: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 denotes11 and so on. The decimal equivalent of the given hexadecimal number isgiven by . For example consider.We can convert a binary number directly to a hexadecimal number by grouping thebinary digits, starting from the right, into sets of four and converting each group to itsequivalent hexadecimal digit. If in such a grouping the last set falls short of four binarydigits then do the obvious thing of prefixing it with adequate number of binary digit '0'.
mywbut.com 2

For example let us find the hexadecimal equivalent ofThe vice-versa is also true.
Octal System:
The octal system is the positional system that uses 8 as its base andas its symbol set of size 8. The decimal equivalent of an octal numberis given by . Forexample considerWe 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 setsto its octal equivalent. If such a grouping results in a last set having less number ofdigits it may be prefixed with adequate number of binary digit 0. As an example theoctal 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 theinteger 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 ofthe new number system. The remainder will constitute the rightmost digit of the integer
mywbut.com 3