Solved

the range of a unsigned 32-bit integer?

Posted on 2001-08-28
8
613 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
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
 

Expert Comment

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

The range is 2^32-1.
0
Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

 

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

Why You Should Analyze Threat Actor TTPs

After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

Join & Write a Comment

What is C++ STL?: STL stands for Standard Template Library and is a part of standard C++ libraries. It contains many useful data structures (containers) and algorithms, which can spare you a lot of the time. Today we will look at the STL Vector. …
This article shows you how to optimize memory allocations in C++ using placement new. Applicable especially to usecases dealing with creation of large number of objects. A brief on problem: Lets take example problem for simplicity: - I have a G…
The goal of the tutorial is to teach the user how to use functions in C++. The video will cover how to define functions, how to call functions and how to create functions prototypes. Microsoft Visual C++ 2010 Express will be used as a text editor an…
The goal of the video will be to teach the user the concept of local variables and scope. An example of a locally defined variable will be given as well as an explanation of what scope is in C++. The local variable and concept of scope will be relat…

705 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

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now