bit

C language has a function named ‘size of’, it can be used to get how many bytes does a type variable used.

For example, int type, we could get sizeof(int) is 4. That’s is to say, it used 4 bytes.

And 1 byte is 8 bits. So int type takes 32bits in total. And the maximum value of type int is 2 ** 31(C use one bit to indicate positive and negative).

By the way, letter ‘b’ in kb is “byte” not “bit”. That makes me confused for a long time until I get over it today.