Pregunta de entrevista
Entrevista de Computer Engineer
"What is the size of an integer on a 32-bit system?"
Respuestas de entrevistas
2^32= 4 billionish ?
Reading these answers now I understand why would ask the question. According to C/C++ standards the size of an integer, regardless of any hardware limitations, is at least 16 bits; but usually the size of an integer is 32 bits. It has nothing to do with it being signed or unsigned (question asks about size, not range).
Depends if it's signed or unsigned...
Depends on the CPU and compiler. It is really arbritary how a regular integer is defined, though you must know what they chose. In Microsoft .net, a regular integer is 32-bit. In their prior Visual Studio 6, it was 16-bit. In TI Code Composer (for TI DSP chips), even a Boolean (true/false) occupied 32-bits of memory.
Found excellent read: bit.ly/faang100
Four? A byte is 8-bits. 8/32 = 4
Andrew Gardiner en