# Thread: on 16-bit system long will guarantee 4-bit integer type?

1. ## on 16-bit system long will guarantee 4-bit integer type?

Hi

To cut the long story short. The books says int is system dependant, short takes 2 bytes and long takes 4 bytes and are system independent.

First, could you please tell me what that 16-bit, 32-bit and 64-bit systems are? Please remember I'm a beginner and if you think the reply is going to fly over my head then you can simply tell me.

Second, it says using long on 16-bit system such as MS-DOS will gurantee a four-bit integer. But long takes always four bytes and is system independent. There are only two bytes in 16 bits. Could you please shed some light on this if yu think I could understand this stuff?

I offer my thanks for your help and time.

Regards
J

2. Originally Posted by jackson6612
To cut the long story short. The books says int is system dependant, short takes 2 bytes and long takes 4 bytes and are system independent.
Whatever books you are reading, they are wrong if they really state it as that. It is guaranteed that sizeof(short) <= sizeof(int) and sizeof(int) <= sizeof(long). Also, assuming an 8-bit byte, the minimum guaranteed ranges for short, int and long mean that sizeof(short) >= 2, sizeof(int) >= 2 and sizeof(long) >= 4.

Originally Posted by jackson6612
First, could you please tell me what that 16-bit, 32-bit and 64-bit systems are? Please remember I'm a beginner and if you think the reply is going to fly over my head then you can simply tell me.
Have you tried searching the Web? Explanations seem rather readily available online.