How do computers store neg binary numbers?

Click For Summary
SUMMARY

The 8-bit binary number 11000001 is stored using the two's complement convention, representing the decimal value of -63. The first bit indicates the sign, with '1' denoting a negative value. By converting the binary number to its two's complement, the calculation yields 00111111, which equals 63 in decimal. Therefore, the correct interpretation of the number is -63, confirmed through both conversion and bitwise addition methods.

PREREQUISITES
  • Understanding of binary number representation
  • Familiarity with two's complement notation
  • Basic knowledge of bitwise operations
  • Ability to perform binary to decimal conversions
NEXT STEPS
  • Study the mechanics of two's complement representation in depth
  • Learn about binary arithmetic operations
  • Explore the implications of signed vs. unsigned binary numbers
  • Investigate the role of the most significant bit (MSB) in binary systems
USEFUL FOR

Students studying computer science, software engineers working with low-level programming, and anyone interested in understanding binary number systems and their applications in computing.

_buddha
Messages
6
Reaction score
0

Homework Statement


Which of the following numbers will be stored in an 8-bit computer as 11000001? This computer uses the 2's compliment convention.

a)-64 b)-63 c)63 d)64


Homework Equations


1's and 2's compliment


The Attempt at a Solution


The answer is -63 and after trial and error i get that answer, but I am just wondering what exactly happens to the actual number. This is what my understanding is, so since the first digit in the number is a 1, therefore its negative. And after converting it to its compliment i get 00111111, which equals to 63 in base 10. So therefore the answer is -63. Is this the correct way of handling this question?
 
Physics news on Phys.org
You can also just add the bits together, except remembering that for 2's complement, the MSB is negative.

-1 * 128 + 1 * 64 + 0 * 32 + 0 * 16 + 0 * 8 + 0 * 4 + 0 * 2 + 1 * 1 = -128 + 64 + 1 = -63
 

Similar threads

  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 3 ·
Replies
3
Views
3K
  • · Replies 4 ·
Replies
4
Views
2K
  • · Replies 5 ·
Replies
5
Views
2K
  • · Replies 10 ·
Replies
10
Views
2K
  • · Replies 2 ·
Replies
2
Views
2K
Replies
2
Views
3K
Replies
1
Views
2K
  • · Replies 5 ·
Replies
5
Views
2K
  • · Replies 6 ·
Replies
6
Views
2K