88.4k views
0 votes
a computer has a word length of 8 bits (including sign). if 2’s complement is used to represent negative numbers. what range of numbers can be stored in the computer? if 1’s complement is used?

User DazDylz
by
7.2k points

1 Answer

6 votes

Final answer:

A computer with a word length of 8 bits can represent numbers from -128 to +127 in 2's complement, and from -127 to +127 in 1's complement due to the existence of negative zero.

Step-by-step explanation:

A computer with a word length of 8 bits can represent a range of numbers using either 2's complement or 1's complement for negative numbers. In 2's complement, the range of numbers that can be represented is from -128 to +127. In the case of 1's complement, the range is from -127 to +127, as 1's complement allows for a negative zero which uses up one representation. A computer with a word length of 8 bits (including sign) can store a range of numbers using 2's complement or 1's complement.

With 2's complement, the range of numbers that can be stored is from -128 to 127. The leftmost bit is used to represent the sign, with 0 indicating a positive number and 1 indicating a negative number. The remaining 7 bits represent the magnitude of the number.

With 1's complement, the range of numbers that can be stored is from -127 to 127. The leftmost bit is still used for the sign, but the remaining 7 bits represent the magnitude of the number using the 1's complement representation.

User Nick Audenaerde
by
7.3k points