Hi, I recently got this question on a computer science quiz. There is only one right answer:

Which of the following is true of the binary number 101110110111011101 ?

a. It is an even number (divisible by two)

b. It can be either even or odd depending on how an app interprets it.

c. It is definitely a negative number.

d. it is an odd number (not divisible by two)

e. When converted to decimal, it is the year 2018.

Now I picked b. and I know that the number ends with a 1 and therefore it should be an odd number conventionally. It turns out the right answer was d. and I think it shouldn't be because you could write code that interprets the number as an even number (lets say the first digit from the right determines the numbers sign). How do you think I should bring this up to my professor ? The question was worth a lot of points.. Is my logic flawed ? I think if you asked a computer the same question it would definitely say the right answer is b.

Please share your thoughts and any advice!

## 2 Replies - 396 Views - Last Post: 08 September 2017 - 08:16 PM

### #1

# Which of the following is true of the binary numb. 101110110111011101?

Posted 08 September 2017 - 04:09 PM

##
**Replies To:** Which of the following is true of the binary numb. 101110110111011101?

### #2

## Re: Which of the following is true of the binary numb. 101110110111011101?

Posted 08 September 2017 - 07:39 PM

Quote

and I know that the number ends with a 1 and therefore it should be an odd number conventionally. It turns out the right answer was d.

It seems you answered your own question.

Quote

and I think it shouldn't be because you could write code that interprets the number as an even number (lets say the first digit from the right determines the numbers sign).

Even if the binary string is being interpreted using the two's complement interpretation, a 1 in the last digit indicates the number is odd. (See: https://en.wikipedia...epresentation). Furthermore, I wouldn't go looking for alternative interpretations if they were not specified in the problem statement.

Quote

Is my logic flawed ?

Yes. See above.

### #3

## Re: Which of the following is true of the binary numb. 101110110111011101?

Posted 08 September 2017 - 08:16 PM

In principle you're correct. b says "depending on how an app interprets it" and as you say, you could come up with a representation which would make this an even number. The easiest, I suppose, would be to invert the sense of the digits, so that 0 represents the multiplicative identity element - the number you multiply by to get the thing you started with - and 1 represents the additive identity. Then this number would be even, despite the fact that it's odd under every system of binary representation that's actually used.

So you could make this case, and see how your prof likes it. If you do a good job, you might get the points, and he'll probably rewrite the question for next year's exam. />

However, in order to make this case, you have to also show that you understand why d was the intended answer, and ideally that you understand what the question was trying to get you to think about.

The key to making your case, I think, is that b is the only answer that respects the fact that sequences of symbols are only meaningful in combination with some system of interpretation, and you cannot in general deduce the system of interpretation from the sequence. This is actually a really important notion, which some programmers have a hard time with.

So you could make this case, and see how your prof likes it. If you do a good job, you might get the points, and he'll probably rewrite the question for next year's exam. />

However, in order to make this case, you have to also show that you understand why d was the intended answer, and ideally that you understand what the question was trying to get you to think about.

The key to making your case, I think, is that b is the only answer that respects the fact that sequences of symbols are only meaningful in combination with some system of interpretation, and you cannot in general deduce the system of interpretation from the sequence. This is actually a really important notion, which some programmers have a hard time with.

Page 1 of 1