In Cheat Engine we can search for different values of different types (int, float, double, string). This values can have various lengths (1,2,4,8,16 bytes and so on). How CE knows what kind of value starts in some particular memory cell and how long it is? In memory, we have just the bunch of zeros and ones in every cell. How we can know the meaning of this data?
How CE knows what kind of value starts in some particular memory cell and how long it is?: It uses functions from your operating systems api which gives it that information.
For example if you're on Windows you can call ReadProcessMemory(process_name, address_location, data_size) function in c++ which will give you that information.
// Pseudocode of how CE might do it
for (int address = 0x0000; address < 0xFFFF; i += sizeof(int) {
int value = ReadProcessMemory('notepad.exe', address, sizeof(int));
int* value_address = &value;
}
In memory, we have just the bunch of zeros and ones in every cell. How we can know the meaning of this data?: 1ns and 0s is a binary type of data, 0 to 10 is decimal, 0 to F is hexadecimal, you just convert binary data to a different type of data (0101 = 5), the same way you would convert fahrenheit to celsius and vice versa.