Data Structures Question:
Download Questions PDF

What is impact of signed numbers on the memory using Data Structures?

Answer:

Sign of the number is the first bit of the storage allocated for that number. So you get one bit less for storing the number. For example if you are storing an 8-bit number, without sign, the range is 0-255. If you decide to store sign you get 7 bits for the number plus one bit for the sign. So the range is -128 to +127.

Download Data Structures Interview Questions And Answers PDF

Previous QuestionNext Question
What is precision in Data Structures?How memory is reserved using a declaration statement in data structure?