Solved

the range of a unsigned 32-bit integer?

Posted on 2001-08-28
8
633 Views
Last Modified: 2012-06-27
is the range of a unsigned 32-bit integer from 0 to 2^31-1 ?
0
Comment
Question by:Trou
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
8 Comments
 
LVL 4

Accepted Solution

by:
IainHere earned 50 total points
ID: 6431500
2^32-1 if unsigned
0
 
LVL 32

Expert Comment

by:jhance
ID: 6431777
Isn't this one of those implementation defined constants?  
0
 

Expert Comment

by:Fearum
ID: 6431790
It's 0..4294967295
0
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 

Expert Comment

by:Fearum
ID: 6431797
So no, it is not.

The range is 2^32-1.
0
 

Expert Comment

by:ComTech
ID: 6431855
Fearum, you have been here long enough to know not to block or lock questions.   You may be right, but that is up to the User to decide, if he/she  uses you comment as an answer, then good for you.

I must reject the proposed answer and return it to the active question listin.

Thanks,
ComTech
Community Suppport
0
 
LVL 32

Expert Comment

by:jhance
ID: 6431862
Even it the answer Fearum gave is right, IT'S EXACTLY WHAT IanHere posted several hours ago.
0
 
LVL 4

Expert Comment

by:AssafLavie
ID: 6432153
yes.

To find out programmatically you can use:

#include <limits>
main
{
cout << "limit of unisgned int" << std::numeric_limits<unsigned int>::max();
};
0
 

Author Comment

by:Trou
ID: 6432245
I found it out from one book.But in my opinion  the range  is 0-2^32-1,or 0-0ffffffffh.

0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Often, when implementing a feature, you won't know how certain events should be handled at the point where they occur and you'd rather defer to the user of your function or class. For example, a XML parser will extract a tag from the source code, wh…
Many modern programming languages support the concept of a property -- a class member that combines characteristics of both a data member and a method.  These are sometimes called "smart fields" because you can add logic that is applied automaticall…
The viewer will learn how to clear a vector as well as how to detect empty vectors in C++.
The viewer will be introduced to the technique of using vectors in C++. The video will cover how to define a vector, store values in the vector and retrieve data from the values stored in the vector.

624 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question