1. HAFTA BLM323 SAYISAL ANALİZ Okt. Yasin ORTAKCI 2 Karabük Üniversitesi Uzaktan Eğitim Uygulama ve Araştırma Merkezi Binary Machine Numbers A 64-bit (binary digit) representation

Please download to get full document.

View again

of 5
All materials on our website are shared by users. If you have any questions about copyright issues, please report us to resolve them. We are always happy to assist you.

Press Releases

Publish on:

Views: 7 | Pages: 5

Extension: PDF | Download: 0

1. HAFTA BLM323 SAYISAL ANALİZ Okt. Yasin ORTAKCI 2 Karabük Üniversitesi Uzaktan Eğitim Uygulama ve Araştırma Merkezi Binary Machine Numbers A 64-bit (binary digit) representation is used for a real number. The first bit is a sign indicator, denoted s. This is followed by an 11-bit exponent, c, called the characteristic,and a 52-bit binary fraction, f, called the mantissa. The base for the exponent is 2. According to IEEE standart a 64-bit (binary digit) representation is used for a real number.the parts of a real number representation is shown in the below: s (sign bit):1 bit c (characteristic) : 11 bit f (fraction): 52 bit Since 52 binary digits correspond to between 16 and 17 decimal digits, we can assume that a number represented in this system has at least 16 decimal digits of precision. The exponent of 11 binary digits gives a range of 0 to = However, using only positive integers for the exponent would not permit an adequate representation of numbers with small magnitude. To ensure that numbers with small magnitude are equally representable, 1023 is subtracted from the characteristic, so the range of the exponent is actually from 1023 to To save storage and provide a unique representation for each floating-point number, a normalization is imposed. Using this system gives a floating-point number of the form: ( 1) s 2 c 1023 (1 + f) The maximum value that c can take is Example: Consider the machine number and convert it to decimal number Solution: 3 The left most bit is s = 0, which indicates that the number is positive. The next 11 bits, , give the characteristic and are equivalent to the decimal number Characterictic (c)= = 1027 Fraction (f)= = = 0, Decimal Number= ( 1) (1 + 0, )= 27, The next smallest machine number is and the next largest machine number is This means that our original machine number represents not only , but also half of the real numbers that are between and the next smallest machine number, as well as half the numbers between and the next largest machine number. To be precise, it represents any real number in the interval [ ( ), ( ) ). 4 There are endless number of reel number in this interval. So there are many reel numbers in this interval which can not be represented by using 64-bit (binary digit) representation. The smallest normalized positive number that can be represented has s = 0, c = 1, and f = 0 and is equivalent to dır. = ( 1) (1 + 0) 0, dir. and the largest has s = 0, c = 2047, and f = and is equivalent to dır. = ( 1) ( ) dir. Numbers occurring in calculations that have a magnitude less than ( 1 + 0) result in underflow and are generally set to zero. Numbers greater than ( ) result in overflow and typically cause the computations to stop (unless the program has been designed to detect this occurrence). Note that there are two representations for the number zero; a positive 0 when s = 0, c = 0 and f = 0, and a negative 0 when s = 1, c = 0 and f = 0. Decimal Numbers Numbers with decimal part are written in a normalized floating-point form where only significant digits are stored. 5 ±0, d 1 d 2. d k d k+1 10 n 0 d i 9 ve i = 2,3,., k Example: 159,789 = 0, The floating-point form of any reel number is obtained by terminating the mantissa of the number at k decimal digits. There are two common ways of performing this termination. 1.Rounding Method: If d k+1 5 increase d k one more and the number transforms to; ±0, d 1 d 2. d k 10 n ( d k = d k + 1 ) 2. Chopping Method: It is to simply chop off the digits d k +1, d k+2...and the number transforms to; ±0, d 1 d 2. d k 10 n Ex: Determine the five-digits (a) chopping and (b) rounding values of the irrational number π.. π = 3, Written in normalized decimal form,: π = 0, a. By chopping π = b.by rounding π = Source Richard L. Burden, Richard L. Burden (2009). Numerical Analysis Brooks/Cole Cengage Learning, Boston.
Related Search
We Need Your Support
Thank you for visiting our website and your interest in our free products and services. We are nonprofit website to share and download documents. To the running of this website, we need your help to support us.

Thanks to everyone for your continued support.

No, Thanks