Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

What are the possible value for Integers in IEEE?

 
sabari nath
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator


Hi to all,
what are the possible value for integers in IEEE?
 
Ulf Dittmer
Rancher
Pie
Posts: 42967
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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)
 
Jesper de Jong
Java Cowboy
Saloon Keeper
Posts: 15207
36
Android IntelliJ IDE Java Scala Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Integers (byte, short, int, long, char) are stored in [url=http://en.wikipedia.org/wiki/Two%27s_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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic