| Author |
How the values are stored?
|
dinesh Venkatesan
Ranch Hand
Joined: Oct 12, 2006
Posts: 134
|
|
Hi all, This is a very basic question. Consider the following code snippet. int a = 5; int b = 1; How the value 5 is stored inside memory. Since int are 32 bit values will it be stored like 0000 0000 0000 0000 0000 0000 0000 0101. if i am correct about this, then while performing an operation like this, int c = ~b; will it reult in a value like this? 1111 1111 1111 1111 1111 1111 1111 1010. Please clarify me. Thanks in advance! V.dinesh.
|
 |
Ernest Friedman-Hill
author and iconoclast
Marshal
Joined: Jul 08, 2003
Posts: 24039
|
|
|
Yes, and yes. Everything you've stated is correct.
|
[Jess in Action][AskingGoodQuestions]
|
 |
dinesh Venkatesan
Ranch Hand
Joined: Oct 12, 2006
Posts: 134
|
|
|
Thank you.
|
 |
dinesh Venkatesan
Ranch Hand
Joined: Oct 12, 2006
Posts: 134
|
|
|
Thank you.
|
 |
 |
|
|
subject: How the values are stored?
|
|
|