Unsigned

Unsigned Integers

If you know an integer will always be positive then you can double the range of the positive value limit as the negative value limit will be reduced to zero in favor of expanding the positive limit.

DeclarationSizeSupported number rangeStandard-defined minimum size
unsigned char myVar;8 bits0 to 2558 bits
unsigned short myVar;16 bits0 to 65,53516 bits
unsigned long myVar;32 bits0 to 4,294,967,29532 bits
unsigned long long myVar;64 bits0 to 184,467,440,737,095,551,61564 bits
unsigned int myVar;32 bits0 to 4,294,967,29516 bits