Click here to load reader

Computers and Numbers. Types of Numbers Computers store two different types of numbers: Whole Numbers AKA Integers (mathematics) AKA Fixed Point Numbers

Embed Size (px)

Citation preview

Computers and Numbers

Computers and NumbersTypes of NumbersComputers store two different types of numbers:Whole NumbersAKA Integers (mathematics)AKA Fixed Point Numbers (computing)Decimal Numbers (and Fractions)AKA Real Numbers (mathematics)AKA Floating Point Numbers (computing)So on a computer the number 5 is different from 5.0 since the first is a whole number and the second is a decimal.Storage of NumbersComputers store numbers in binary form.For whole numbers the values are exact but are limited in range to about + or 2.15 billion.For decimal numbers the values are almost always approximations with approximately 7 significant digits and a magnitude from e-38 to e+38. By using extended precision numbers 15 significant digits can be achieved with a magnitude range from e-308 to e+308.Negative numbers are stored by a method called twos complement. This is done so that processors dont need separate circuitry for subtraction.If these restrictions are unsuitable then numbers will need to be manipulated with special software which will probably slow down computations by several orders of magnitude.