Data Representation on machines…

The most important thing to notice here is that all the data stored on the machine or memory is in the form of two’s compliment. So, all the arithmetic what so ever happens on the data in C or C++ languages happen on the two’s compliment’s data residing in the memory. And all the calculations happen on the same data. For example int a = -5 and unsigned int b = -5 is same in the memory because -5 is stored in 2’s compliment in both the cases, and when processor picks this data then it applies the typecasting on this.

therefore, if you check this condition , if (a==b) then this condition will come true.

THE MOST IMPORTANT PPT ON THIS TOPIC IS : Data Representation

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s