Numbers To Know easy
What is the size of a standard 32-bit Integer (`int` in Java/C++)?
- A 1 Byte
- B 2 Bytes
- C 4 Bytes
- D 8 Bytes
Answer: C. 4 Bytes
A standard 32-bit integer (`int` in most languages) occupies 4 Bytes of memory (32 bits / 8 bits per Byte). This size allows the integer to represent any value between approximately -2 Billion and +2 Billion. For many applications, this range is sufficient; however, for systems dealing with very large counts (like global user IDs or high-precision timestamps), engineers must use a 64-bit integer, which takes up 8 Bytes. Choosing the correct integer size is a fundamental trade-off between the 'safe range' of your data and the memory/storage throughput of your system.
One system design question a day, with spaced repetition so the ones you miss come back.
Get the appRelated questions
- What is the maximum allowed downtime per year for a system targeting '99.9%' (Three Nines) availability?
- What is the typical size of a standard ASCII character (e.g., 'A')?
- What is the typical Round Trip Time (RTT) for a single network packet traveling between New York and London (Transatlantic)?
- Network bandwidth is usually denoted in **bits** per second (Gbps), while storage is in **Bytes** (GB). What is the conversion ratio?
- Storing a password using a secure algorithm like bcrypt (cost 10) or Argon2 typically consumes how much storage per user?
- How much power does a typical fully-loaded rack-mount server consume?