Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
Ahmad Shelbaya
1 First, convert to decimal number that is 2.285. Then convert the integer part
and the decimal part separately. The integer part can be converted to binary by using the following formula:
the quotient x1. The remainder is , and then use equation 2 to calculate
(1)
Where x the decimal number and m are the mantissa parts. Divide x by 2, calling
Continue this process till so integer 2 is converted to 10 in binary.
(2)
(3)
Multiply by 2, the integer becomes ,and then remove the integer part to get the new fraction. Then use equation 4 to get :
Continue so on to get the rest of bits. The result .01001000111101011100001 Combining both parts to get: 10.01001000111101011100001
(4)
To normalize the binary number, move the binary point one significant digits to the left. Then calculate the exponent. e = 1+127= 128 then convert it to binary which is equal to 1000000
the hidden bit is equal to 1 and sing is positive so it has a zero bet and the final binary number is:
0100000000100100011110101110000 2.a The machine epsilon mach is found by calculating the difference between 1 and the next positive integer number that can be represented, which is equal to 2 to the negative power of the number of bits used for mantissa 31 in this case. So
mach ! 2 31
2.b The largest positive number is represented in binary as 0 11111111 1111111111111111111111111111111 Where the exponent and mantissa are filled. so the largest positive number is
v2 1
2.c
The smallest normalized number is represented in binary as 0 00000001 0000000000000000000000000000000 So (1.0000)x 2 126 = ! 1.2 v 10 38
2.d The total number of machine numbers can be obtained by multipliying the bit size of the sign, exponent and the mantissa as follow:
3. The smallest positive integer that is not exist in the single precision is equal to the largest postive integer plus one so; (1.00000000000000000000000)x + 1=