1

I found an exercise asking the representation of $F2_{(16)}$ in 2's complement with 8bits.

I've made de conversion to binary: $11110010_{(2)}$

And I followed the procedure:

  1. transform the $1$'s to $0$'s and $0$'s to $1$'s;
  2. add $1$;

and got: $00001110$

But as I was doing it I was thinking $F2_{(16)}$ is $242$ and using 2's complement and 8 bit let's me represent numbers up to $127$. Then I went to several online converters and some showed the result I got and others that it was impossible since the convertion would need 9bits.

My question is: is it possible that the question is wrong or am I just not correct about the number limit that can be represented in this way? (I believe there are only 255 different numbers that can be represented)

EDIT: Taking into account this is a translation, the exercise is as follows: Which are the integers represented in 2's complement with 8 bits by $F2_{16}$, $157_{8}$, $4F_{16}$, $10010000$, $00000000$? Is it possible that I'm not even interpreting the exercise correctly?

Concept7
  • 405
  • Please quote what the exercise asks, precisely. – Weather Vane Apr 05 '18 at 20:35
  • @WeatherVane I've added the exercise the most faithfully I could. – Concept7 Apr 05 '18 at 20:51
  • If you are thinking about 2's complement this will be a negative number in 8 bits, in decimal -14. – Weather Vane Apr 05 '18 at 21:00
  • 1
    Yes you are interpreting the question wrongly, which seems to omit the *output format* to be in decimal. All of the five examples can be held in 8 bits, and can be interpreted as a 2's complement 8-bit number, with different input formats. The second example 157 is octal. The first case hex F2h is decimal -14. – Weather Vane Apr 05 '18 at 21:31
  • I get it now (I think)! I have to write the numbers in binary and interpret them as already being in two's complement and then say which number (decimal) it is. Correct @WeatherVane? – Concept7 Apr 06 '18 at 08:16
  • 1
    I think so. In the octal case the bits are in groups of 3 (from the right). But 9 bits are not needed because the first (left) bit is 0. – Weather Vane Apr 06 '18 at 08:30

0 Answers0