cplusplus
.com
TUTORIALS
REFERENCE
ARTICLES
FORUM
C++
Tutorials
Reference
Articles
Forum
Forum
Beginners
Windows Programming
UNIX/Linux Programming
General C++ Programming
Lounge
Jobs
Forum
Beginners
Signed integer representation in memory
Signed integer representation in memory
May 1, 2010 at 1:33pm UTC
mynameisokay
(2)
I know three ways of representing integers in memory: sign magnitude representation, one's complement representation and two's compliment representation. But which method is used in c++ to represent integers? Thanks in advance for your help.
May 1, 2010 at 2:04pm UTC
Bazzy
(6281)
C++ uses the way used by the machine on which the program is running on ( on modern computers is likely to be 2's complement )
May 1, 2010 at 3:38pm UTC
mynameisokay
(2)
Thanks bazzy
May 1, 2010 at 3:40pm UTC
magnificence7
(188)
In other words, C++ does not doesn't have a standard way to do that, it's up to the compiler and machine.
Topic archived. No new replies allowed.