Bifalgorithm post · Brisk · Chapter 1

What value does the two’s-complement bit pattern 1010 represent?

What value does the two’s-complement bit pattern 1010 represent? (Brisk · Chapter 1) — "1010 was meant to represent a two’s-complement number, what value would…

Ideas in this flowchart

  • Valeur de 1010 en complément à deux
  • Le bit le plus à gauche est 1, donc le nombre est négatif.
  • Pour déterminer la valeur, il faut inverser tous les bits puis ajouter un.
  • L’inversion des bits de 1010 donne 0101.
  • Ajouter un à 0101 donne 0110, avec une retenue.
  • Le nombre binaire 0110 représente six, une valeur positive.
  • Ainsi, 1010 représente moins six.
Feed/

What value does the two’s-complement bit pattern 1010 represent?

Channel

Brisk

1 page

"1010 was meant to represent a two’s-complement number, what value would it represent? Negative six. The left-most bit is 1, so it’s negative. This means in order to figure out the value, we have to flip all the bits and add one. Flipping them yields 0101, and adding one to that gives 0110 (we had to do one carry). Since the binary number 0110 is positive six, that must mean that what we started with – 1010 – must be negative six."

Flowchart preview
Series cover
👍
0
0 comments0 shares

Sign in to view and post comments.