Operating System

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