File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

what will be the size of 0x1f400000L in MB

 
chandrakanth boga
Ranch Hand
Posts: 49
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 1970
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Stefan Wagner
Ranch Hand
Posts: 1923
Linux Postgres Database Scala
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Jim Yingst
Wanderer
Sheriff
Posts: 18671
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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...
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic