The basic types include-integer, real, and enumeration type!
Data is always stored in binary format in the memory. The value is indicated by a complement.
Integer:
A positive complement is the same as its original code. The Complement Method of a negative number is to add 1 to the binary form of its absolute value"
Real Type:
Memory occupies 4 bytes and is stored in exponential form. Real data is divided into fractional and exponential parts, respectively! The computer uses binary to represent the fractional part, and the power of 2 to represent the exponential part!
Character Type:
In memory, character storage actually refers to the ASCII corresponding to characters.CodeStored in a storage unit. These ASCII code values are also stored in binary form in the computer. This is similar to integer storage. Therefore, the conversion between these two classes is also convenient!
The following is from another one (Chenchao note)
Iii. Storage Format and usage of character data in memory
When the system expresses a character type data, it does not store the character shape into the memory, but only saves the ASCII code of the character into the memory. All the data in the memory is stored in binary format. In the above example, 'x' and 'y' are represented in the memory as follows:
The ASCII codes of 'X' and 'y' are 120 and 121. The binary formats of 120 and 121 are 1111000 and 1111001.
Therefore, the memory values of 'A' and 'B' are 1111000 and 1111001.