Microcontroller › Arduino › Is that integer size would be differ for every 16bit, 32bit controller?? › integer size
January 21, 2017 at 7:33 am #14353
Hari Prasaath K
Integers are your primary data-type for number storage.
On the Arduino Uno (and other ATMega based boards) an int stores a 16-bit (2-byte) value. This yields a range of -32,768 to 32,767 (minimum value of -2^15 and a maximum value of (2^15) – 1).
On the Arduino Due and SAMD based boards, an int stores a 32-bit (4-byte) value. This yields a range of -2,147,483,648 to 2,147,483,647 (minimum value of -2^31 and a maximum value of (2^31) – 1).