Problem !! 
Author Message
 Problem !!

Hi all,

    I am a fresh user of assembly. So I have a problem as follows :-

----------------------------------------------------------------------------
    How to represent the single precision floating-point number ?

 Length            :  32 bits
 Format            :  1 bit sign, 8 bit exponent, 23 bit mantissa
 Sign              :  1 - negative, 0 - positive
 Exponent          :  Excess-127
 Mantissa          :  With implicit 1.0

 Range             :  +1.11111111111111111111111 x 2^(255-127) to
                      -1.11111111111111111111111 x 2^(255-127)

 Largest positive  :  +1.11111111111111111111111 x 2^(255-127)

 Largest negative  :  -1.11111111111111111111111 x 2^(255-127)

 Smallest positive :  +1.00000000000000000000000 x 2^(1-127)

 Smallest negative :  -1.00000000000000000000000 x 2^(1-127)

 EXACT zero        :  "0" in all 32 bits

 Infinity (+/-)    :  +/-1.11111111111111111111111 x 2255-127    
-----------------------------------------------------------------------------

 I divide the number into 3 pieces and add them individually !! Is that
 right ?

 for example

 DATA_SEG     SEGMENT
 ; float number  represent +1.11111111111111111111111 X 2^(255-127)
 FNUMS             DB    0b
 FNUM1             DW   11111111111111111111111b
 FNUM1E            DB    1111111b ; = 128
 ; float number  rperesent +1.00000000000000000000000 X  2^(0)
 FNUMS             DB   0b
 FNUM2             DW   00000000000000000000000b
 FNUM2E            DB   00000000b ; = 0
 ; result
 RESULTS           DB   ?
 RESULT            DW   ?
 RESULTE           DB    ?
 DATA_SEG     ENDS
---------------------------------------------------------------------------

 THen add this two numbers and put back into the result, is that OK?

 Thanks for answering

Regards.



Thu, 26 Aug 1999 03:00:00 GMT  
 
 [ 1 post ] 

 Relevant Pages 

1. Problems, problems, problems

2. Eiffel Problems, Problems, Problems

3. Finn Idiom problems and Re: {rho} problem

4. Combinatorial Problem [ & a new Combinatorial Problem ]

5. Database problem/Memory problem??

6. CW 2003 - Focus problem & a select problem

7. 32bit problem - one problem solved & another found

8. GForth problem or my problem?

9. REXX DLL problems solved (was Re: Problems getting C subcommand to work)

10. HTTP-Access2 problem (was Ruby Google problem)

11. Problem with this excercise problem.

12. RSX problems and texture problems

 

 
Powered by phpBB® Forum Software