Crossware

Table of Contents        Previous topic       Next topic       

C COMPILER->C Language Definition->Data Sizes

The data sizes for the Crossware 8051 C compiler are given in the following table.  Signed is the default type but may be explicitly declared for all data sizes using the signed keyword.

(1 byte is 8 bits)
    
TypeStorage Size
    
Char1 byte
short int2 bytes
long int4 bytes
int2 bytes
unsigned char1 byte
unsigned short int2 bytes
unsigned long int4 bytes
unsigned int2 bytes
float4 bytes
double8 bytes
long double8 bytes
enumUp to 4 bytes
bit fieldsUp to 32 bits
bit1 bit

Integers are stored least significant byte first.
Floating point types are stored internally in IEEE 754 format, lease significant byte first.

Note for users upgrading from the 8051PSDS:  The 8051PSDS-A stores variables in the reverse order to the 8051PSDS.