Integer |
Bits |
Minimum |
Maximum |
---|---|---|---|
char (SPARC) (x86) |
8 |
-128 |
127 |
signed char |
8 |
-128 |
127 |
unsigned char |
8 |
0 |
255 |
short |
16 |
-32768 |
32767 |
signed short |
16 |
-32768 |
32767 |
unsigned short |
16 |
0 |
65535 |
int |
32 |
-2147483648 |
2147483647 |
signed int |
32 |
-2147483648 |
2147483647 |
unsigned int |
32 |
0 |
4294967295 |
long (SPARC) v8 |
32 |
-2147483648 |
2147483647 |
long (SPARC) v9 |
64 |
-9223372036854775808 |
9223372036854775807 |
signed long (SPARC) v8 |
32 |
-2147483648 |
2147483647 |
signed long (SPARC) v9 |
64 |
-9223372036854775808 |
9223372036854775807 |
unsigned long (SPARC) v8 |
32 |
0 |
4294967295 |
unsigned long (SPARC) v9 |
64 |
0 |
18446744073709551615 |
long long |
64 |
-9223372036854775808 |
9223372036854775807 |
64 |
-9223372036854775808 |
9223372036854775807 |
|
unsigned long long |
64 |
0 |
18446744073709551615 |
When an integer is converted to a shorter signed integer, the low order bits are copied from the longer integer to the shorter signed integer. The result may be negative.
When an unsigned integer is converted to a signed integer of equal size, the low order bits are copied from the unsigned integer to the signed integer. The result may be negative.
The result of a bitwise operation applied to a signed type is the bitwise operation of the operands, including the sign bit. Thus, each bit in the result is set if—and only if—each of the corresponding bits in both of the operands is set.
The result is the same sign as the dividend; thus, the remainder of -23/4 is -3.