File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Java in General and the fly likes what will be the size of 0x1f400000L in MB Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Java in General
Bookmark "what will be the size of 0x1f400000L in MB" Watch "what will be the size of 0x1f400000L in MB" New topic
Author

what will be the size of 0x1f400000L in MB

chandrakanth boga
Ranch Hand

Joined: Mar 15, 2006
Posts: 49
Hi ,

Please tell me what will be the size of long in MB ...
what will be the max size of long...
what will it be 0x1f400000L if converted to MB
Peter Chase
Ranch Hand

Joined: Oct 30, 2001
Posts: 1970
Sounds like attempt to get someone to do his homework, so I'm not giving a direct answer and hope others won't either.

1MB, meaning a megabyte, is usually 1024*1024 bytes. Occasionally, people have been known to re-define megabyte as 1000*1024 bytes, or even 1000*1000 bytes. This practice seems to be most common amongst storage device manufacturers, since it allows them to claim higher capacity.

A Java long is a 64-bit signed two's complement integer.


Betty Rubble? Well, I would go with Betty... but I'd be thinking of Wilma.
Stefan Wagner
Ranch Hand

Joined: Jun 02, 2003
Posts: 1923

Hm. M is a international standardized way to express Mega which is one Million which is 1000*1000.
IT-folk created their own convention by translating Mega to 1024*1024 but that's not correct.
Today we have MiB to express 1024*1024.
here is a more detailed information: http://en.wikipedia.org/wiki/MiB

For homework I would use a comment to show I'm aware of the 1024*1024-habit - perhaps the teacher never heared of mebibyte before.


http://home.arcor.de/hirnstrom/bewerbung
Jim Yingst
Wanderer
Sheriff

Joined: Jan 30, 2000
Posts: 18671
I'm not even sure what's really being asked here. Another interpretation is that the size of a long is 8 bytes, period. (It could theoretically be more on some implementations, but that seems extremely unlikely.) It takes 8 bytes to store a value like 0x1f400000L. If you want to convert that to MB, go ahead...


"I'm not back." - Bill Harding, Twister
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: what will be the size of 0x1f400000L in MB