Number stored in memory

suppose we give a number for storage so how the compilers knows that number is to be treated as positive or negetive .