jQuery in Action, 2nd edition*
The moose likes Beginning Java and the fly likes What are the possible value for Integers in IEEE? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCA/OCP Java SE 7 Programmer I & II Study Guide this week in the OCPJP forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "What are the possible value for Integers in IEEE?" Watch "What are the possible value for Integers in IEEE?" New topic
Author

What are the possible value for Integers in IEEE?

sabari nath
Greenhorn

Joined: Aug 31, 2009
Posts: 3


Hi to all,
what are the possible value for integers in IEEE?
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 42367
    
  64
What do you mean by "in IEEE"? I don't think the IEEE ever defined a format for integer numbers; IEEE-754 covers floating-point numbers only.

For integers represented in 2's complement format (the format commonly used today), the maximum values are

-2^31 to 2^32-1 (for 32 bit numbers)

-2^63 to 2^63-1 (for 64 bit numbers)


Ping & DNS - my free Android networking tools app
Jesper de Jong
Java Cowboy
Saloon Keeper

Joined: Aug 16, 2005
Posts: 14278
    
  21

Integers (byte, short, int, long, char) are stored in [url=http://en.wikipedia.org/wiki/Two's_complement]two's complement[/url] format.

Floating-point numbers (float, double) are stored in IEEE-754 format, float is a single precision and double is a double precision number.

Click the links for details.

Java Beginners FAQ - JavaRanch SCJP FAQ - The Java Tutorial - Java SE 8 API documentation
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: What are the possible value for Integers in IEEE?