patternMinor
Which number representation takes the largest amount of memory?
Viewed 0 times
numbertheamountlargestmemorywhichrepresentationtakes
Problem
Options are:
This is the question from an 'example of a previous exam' I've been given at university. Answers were not provided.
As far as I understand only one answer must be chosen, but I'm not seeing which one.
My attempt at solution
As we see from Signed number representations wikipedia article, both 1. Signed magnitude and 2. One's complement can be chosen as representations requiring the largest amount of memory, because they take up space for both negative and positive 0 (unlike 3. Two's complement and 4. Excess notation).
Is this reasonable, can we say that both 1. and 2. should be chosen as answers here despite question requiring only one answer?
- Signed magnitude
- One's complement
- Two's complement
- Excess notation
This is the question from an 'example of a previous exam' I've been given at university. Answers were not provided.
As far as I understand only one answer must be chosen, but I'm not seeing which one.
My attempt at solution
As we see from Signed number representations wikipedia article, both 1. Signed magnitude and 2. One's complement can be chosen as representations requiring the largest amount of memory, because they take up space for both negative and positive 0 (unlike 3. Two's complement and 4. Excess notation).
Is this reasonable, can we say that both 1. and 2. should be chosen as answers here despite question requiring only one answer?
Solution
The question seems rather bizarre.
Using n bits, each representation can represent $2^n$ different values. Two of them have different representations for +0 and -0. I would assume that signed-magnitude and one's complement are used if someone values the ability to distinguish +0 and -0.
If the question was "which representation takes the largest amount of memory", then that question is already nonsense because no matter what you think about +/- 0, one's complement and signed magnitude are the same. If the question was "which representations take the largest amount of memory", then I'd still say that claiming one (or two) take more than the others is very misguided.
(And the number $-2^{n-1}$ that can be represented with n bits two's complement or signed magnitude has its own problems where both negation and division can lead to overflow).
Using n bits, each representation can represent $2^n$ different values. Two of them have different representations for +0 and -0. I would assume that signed-magnitude and one's complement are used if someone values the ability to distinguish +0 and -0.
If the question was "which representation takes the largest amount of memory", then that question is already nonsense because no matter what you think about +/- 0, one's complement and signed magnitude are the same. If the question was "which representations take the largest amount of memory", then I'd still say that claiming one (or two) take more than the others is very misguided.
(And the number $-2^{n-1}$ that can be represented with n bits two's complement or signed magnitude has its own problems where both negation and division can lead to overflow).
Context
StackExchange Computer Science Q#86092, answer score: 3
Revisions (0)
No revisions yet.