Can anyone tell sth about what is int data type in C++, drilling the headers I can find
typedef int INT;
What/where is the linkage between type in text code and physical storage in RAM? Compiler must know what is this int. And I ask – where it is explained to compiler?
An
intis an integer. At the most rudimentary level, it is simply a set of bytes intepreted as a numeric value. Modern processors (and operating systems) support multiple sizes of integer, though 32-bit and 64-bit (4 and 8 bytes respectively) are most common.In terms of representation in hardware, they’re simply data lines set to high and low voltages. A 32-bit parallel data bus will have 32 data lines, each representing one bit. If you want to represent the number 100, you convert it to a binary representation (i.e.
1100100) and therefore set lines 3, 6 and 7 high, and the rest low. The processor and other microcontrollers can interpret this signal based on their internal functionality and programming.