A byte has 8 bits.
1byte = 1byte = 8bit can represent the eighth power of 2, and the maximum value is the eighth power of 2, 256.
Storage format XXXXXXXX
1 short= 2 bytes = 16bit can represent 2 to the power of 16, and the maximum is 2 to the power of 16, 65535.
Storage format xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
1 int (32) = 4 bytes = 32bit can represent the 32nd power of 2, and the maximum value is the 32nd power of 2. 4294967296
Storage format XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
Now, if you define several byte types A =1; (Maximum value is 256)
Its storage content is 00000 10 (binary). * * * Eight. The maximum value is111111(binary) converted to decimal: 256.
Now the int type is 255. 1 int(255) =32 bytes =256 bits. (overflow, so subtract one. You can understand that it has 255 people. The maximum value that can be stored is 2 to the 255th power.