Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

In two’s complement method, why is there one more negative number than there are

ID: 3623799 • Letter: I

Question

In two’s complement method, why is there one more negative number than there are positive numbers?

Explanation / Answer

let's take the casee of 8 bits,from 8 bits we can form numbers from 10000000 to 01111111. here 10000000 is a negative numbers which represents -128 . 01111111 is a positive number indicating 127. in signed representation 0 indicates positive value and 1 indicates negative value. so by simply inspecting the MSB of a number we can tell that a number is positive or negative. to illustrate why there is one more negative number than positive numbers lets take the maximum number possible with 8 bits i.e. 01111111 which is +127. now adding 1 to +127 will give us 10000000 which is a negative number since its MSB is 1.how's that possible? since we have the maximum storage of 8 bits in which the MSB is the sign bit,rest of the bits denotes the magnitude of the number.so when adding 1 to 127 we get 128 but the result is wrapped around to give us the result -128. so we can not have any positive number of the form 2^(n-1) with n bits in sign -complement representation. now consider the case when -128 is decreased by 1 unit. i.e. (-128)-1 => (-128)+(-1) -128 : 10000000 in 2's complement form -1 : 11111111 in 2's complement form the sum produces the result 101111111 which is of 9 bits so the end carry is discarded.and the result is 01111111 which is +127. in this case also the result is wrapped around when we wanted to decrease -128 by one unit. hence this functionality of 2's complement causes number of postive numbers are one less than number of negative numbers.

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote