In 2 complements I read from wikipedia, the range is from -128 to 127. So I wonder how do we represent 128 in 2 complement as it is out of range above?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You use more bits.
The range -128 to +127 is 256 unique values, which is 8 bits. If you need a larger range, you need more bits.
There is nothing restricting 2s-complement numbers to 8-bit values. For instance, a 16-bit 2s-complement number ranges from -32768 to +32767.