How do signed and unsigned numbers affect memory?



How do signed and unsigned numbers affect memory?..

Answer / Shishir Saxena

Signed numbers in most systems, such as C/C++, use two's complement representation which requires an extra bit to signify the number as negative. On the other hand, unsigned numbers only need positive values, hence they don't require a sign bit. This means that for the same size (e.g., 32-bit or 64-bit), unsigned integers can store a slightly larger range of numbers compared to signed integers.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More Data Structures Interview Questions

Define structure property in a heap?

1 Answers  


Explain Linked List

1 Answers   Tech Mahindra,


What should be done in the base case for this recursive problem?

1 Answers  


Describe binary tree and its property.

1 Answers  


Why do we need arrays if all the operations that are performed on arrays can be performed on arraylist?

1 Answers  


what is the different between B-tree and B+ tree.

8 Answers   Syntel,


Differentiate between file and structure storage structure.

1 Answers  


Why do we use different types of data structures?

1 Answers  


Describe the merge sort principle and what will be its time complexity?

1 Answers   Wipro,


What is data type with example?

1 Answers  


What is declaring array?

1 Answers  


What is the difference between hashmap and arraylist?

1 Answers  


Categories