Wednesday, June 12, 2019
Numerical Precision Assignment Example | Topics and Well Written Essays - 1000 words
Numerical Precision - Assignment Example32 bits. Floating window pane flakes is composed of two components that is, the mantissa and the exponent. The exponent consists of eight bits value which ranges from zero to 255. On the other hand, the mantissa is twenty four bit farseeing with 1 being its most significant bit which is usually never stored. Also, there is a sign bit (+ and -) which is used to indicate whether the number is prejudicious or positive Floating point numbers in arithmetic calculations Floating point numbers calculations vary from machine to machine depending on the precision of the machine. Precision is the degree of correctness a given quantity can be expressed this includes 32-bit single precision and 64-bit double precision that be stored as 8 and 10 bytes respectively. This representation makes it very easy for hardware manipulation. Assignment of these values doesnt require the knowledge of how the various numbers are stored in depot. For calculation pu rposes, this requires the pulling of individual parts of the numbers involved and manipulating them accordingly. Floating point used in arithmetic computations are easy to work with since they are expressed to base 2 and the exponent is a decimal value that can be expressed as binary within the computer. The fixed number notation of representing floating point numbers may lead to loss of precision such as expressing results in form of 32 bits and they may be greater than 32 bits. Floating point arithmetic is slow and because less efficient compared to integer arithmetic. Also, floating point arithmetic is less stainless due to round off errors. Floating point do is not memory efficient at all. This is because the results of computation exit require additional computer storage in memory which may be limited. This is usually the case with majority of computers especially personal computers and its therefore advisable to let dedicated devices to effect floating point computations . Binary Coded Decimal format This format is a format for representing decimal numbers such that each number is represented by a number of bits (four or eight bits).There is the packed and unpacked varied binary coded decimal formats. In the packed format, each decimal number is represented utilize 4 bits (nibble) while in the unpacked format each decimal is represented using a byte (8 bits). For example to represent a number like 41 in binary coded decimal format will be Packed format 0100 0001 and the unpacked format will be 0000 0100 0001 The packed BCD format is more memory efficient since it reduces on the number of unused bits added to a number. Comparison of the BCD format to the floating point format Precision BCD values are very perfect as compared to floating point numbers. This is because BCD numbers are simply decimal numbers expressed in terms of bits and floating point number format is a scientific notation of large and small values. Performance in calculations BCD n umbers are easy to convert and use in arithmetic hence the overall arithmetic computation is always very fast and efficient. Floating point format numbers must undergo various steps of vicissitude before they can be used in any computation. These results in some overhead in terms of memory and time hence the computations will be slow. Memory Usage BCD format is efficient in memory usage if the packed version is used. The unpacked version results
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment