Signed, Un Signed , Fixed and Floating Point numbers
 
  • Signed numbers allow representing of numbers in positive and negative ranges.
    -128 , -2, 0 , 1, 127
  • Unsigned numbers allow representing only positive numbers.

    0, 1, 2, 3, 4, 255

Consider a space with 255 values.
Unsigned number can represent positive values from 0 to 255,
Signed numbers can represent -128 to +127.

the range differs in signed and unsigned numbers.

Fixed point numbers
A fixed point number has a specific number of digits reserved for the integer part before the decimal point and a specific number of digits in the fractional part after the decimal point.


The number 45.234 has 2 integer numbers and 3 numbers.
You can't store 452.34 in above as it has only two integer positions.

consider number format IIIII.FFFFF with 5 integer and 5 decimal positions.

The largest number can be represented is 99999.99999
The smallest number would be 00000.00001

MSD : Most significant Digit
Meaning of MSD is that its value is most significant to the value of the number.
Changing MSD has much effect the value of the whole number.
in 72345 MSD is 7.
What is if changed it to 2 ?

LSD : Least significant Digit
Meaning of LSD is that its value is least significant to the value of the number.
Changing LSD does not much effect the value of the whole number.
in 72345 LSD is 5.
What is if changed it to 2 ?

Floating point numbers
dividing 20 by 3 gives 3.3333333333333333333...... like a value.

A floating point number does not reserve a specific number of digits for the integer part and decimal part.


It reserves a certain number of digits called the mantissa or significand
and a certain number of bits within that number for decimal places called exponent.

A floating point number taking 10 digits with 2 digits reserved for the exponent
will represent a largest value of 9.9999999e+99 = 9.9999999 x 1099
and a smallest value of 0.0000001e-99. = 0.0000001 x 10-99

Based on the precision numbers have different sizes in programming.

(c) Shilpa Sayura Foundation 2006-2017