asked 88.1k views
4 votes
what is the largest number we can represent in 2's complement if we have 9 bits? write your answer in decimal.

asked
User Leyna
by
8.2k points

1 Answer

6 votes

Answer: 255

Step-by-step explanation:

With 9 bits, the largest number we can represent in 2's complement is (2^8) - 1, where 8 is the number of bits used to represent the magnitude of the number (since the leftmost bit is reserved for the sign in 2's complement).

Therefore, the largest number we can represent in 2's complement with 9 bits is (2^8) - 1 = 255 in decimal.

answered
User Richard Willis
by
8.9k points