[an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] (none) [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] (none) [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive]
 
[an error occurred while processing this directive] [an error occurred while processing this directive]
Skåne Sjælland Linux User Group - http://www.sslug.dk Home   Subscribe   Mail Archive   Forum   Calendar   Search
MhonArc Date: [Date Prev] [Date Index] [Date Next]   Thread: [Date Prev] [Thread Index] [Date Next]   MhonArc
 

Intergers vs. floats?



Hejsa SSLUG,

Jeg var egentligt af den opfattelse, at når man declarede en 'int', blev
værdien gemt i "2's complement" binær..?
Det synes ikke rigtigt at passe. Så skulle en int med hex værdien 0xFF
være -1? Det er det jo ikke...(255, ik' :)

Problemet er at jeg roder lidt med noget lowlevel stuff (nej, kan ikke
benytte assembler, da det skal være platform independant). 
Jeg henter en 9bit 2's complemented variabel fra et register, og så
snart værdien er positiv, virker det fint. Men når den går negativ...som
f.eks. -1 (0xFF) skriver C selvfølgeligt 255. Hmm....Nogen der har
erfaringer inden for dette?

Og nu vi er ved det: Hvilken notation bruger float?

Mvh

/Brix

PS: Tak for hjælpen med 'sendmail' tidligere...:)


 
Home   Subscribe   Mail Archive   Index   Calendar   Search

 
 
Questions about the web-pages to <www_admin>. Last modified 2005-08-10, 20:07 CEST [an error occurred while processing this directive]
This page is maintained by [an error occurred while processing this directive]MHonArc [an error occurred while processing this directive] # [an error occurred while processing this directive] *