Current location - Plastic Surgery and Aesthetics Network - Plastic surgery and beauty - Why should integer variables in C# be stored in 4 bytes?
Why should integer variables in C# be stored in 4 bytes?
In a computer, numbers are stored in hexadecimal 16, and 1 byte is 8 bits. If it is hexadecimal 16, the number size that can be saved is 0 to FFFF, and if it is decimal, it is 0 to 6553. Whether there is a negative sign in front of it is not considered here, so if you save data with int, even if you save a 0, saving 6535 will take up 4 bytes.