An integer data type is any type of number without a fractional part.
Signed vs unsigned of any data type refers to whether or not that data type can store negative numbers (numbers with a negative sign). The typical way to store the sign information for a number is to reserve one bit of information to do so.
For a signed 32-bit integer (a common integer size), this means that there are 31 bits available to hold information about the value of the number and 1 bit reserved for signifying negatives. This means that the range of data for a 32-bit signed integer is [-2147483648, 2147483647].
If you use an unsigned 32-bit integer, you can use that extra bit to store more positive number values. The range of data for a 32-bit unsigned integer is [0, 4294967295].
in short law FOR n bits
signed rang[-2n-1 -------- 2n-1 -1]
unsigned rang [0----------2n-1]
Copyright © 2026 eLLeNow.com All Rights Reserved.