C/C++/Arduino Datatypes

Type Byte Bit Typical Range
boolean 1 8 true/false
char 1 8 -128 to 127
signed char 1 8 -128 to 127
unsigned char 1 8 0 to 255
byte 1 8 0 to 255
uint8_t 1 8 0 to 255
int 2 16 -32,768 to 32,767
short 2 16 -32,768 to 32,767
signed int 2 16 -32,768 to 32,767
unsigned int 2 16 0 to 65,535
word 2 16 0 to 65,535
uint16_t 2 16 0 to 65,535
long 4 32 -2,147,483,648 to 2,147,483,647
float 4 32 3.4E +/- 38 (7 digits)
unsigned long 4 32 0 to 4,294,967,295
uint32_t 4 32 0 to 4,294,967,295
double 8 64 1.7E +/- 308 (15 digits)
uint64_t 8 64 0 to 18,446,744,073,709,551,615