what does
signed
and
unsigned
mean when dealing with variables?
and i have searched.
Printable View
what does
signed
and
unsigned
mean when dealing with variables?
and i have searched.
signed means the data can contain a - (negative) sign.
ex.
| signed int = -1024 through 1024 |
| unsigned int = 0 through 2048 |
Unsigned is essential in working with bit's because you can use the whole data field instead of half. Other than that, the choice is up to you.
signed uses the highest binary bit to identify the sign