Translate the number 2110 в binary like this:
the Integer part of the number is divided by the base of the new number system:
21 | 2 | | | | |
-20 | 10 | 2 | | | |
1 | -10 | 5 | 2 | | |
| 0 | -4 | 2 | 2 | |
| | 1 | -2 | 1 | |
| | | 0 | | |
|
the result of the conversion was:
2110 = 101012
You specified the size of your number 1 byte.
Add a signed bit to the number like this:
101012 = 100101012
Since the number you entered is negative, you need to translate it from the direct code to the additional one.
to do this, first perform the conversion from direct code to reverse by inverting all bits except the signed one, then get the direct code by adding 1 bit.
1 | 0 | 0 | 1 | 0 | 1 | 0 | 1 | direct code |
| | | | | | | | |
1 | 1 | 1 | 0 | 1 | 0 | 1 | 0 | reverse code |
| | | | | | + | 1 | +1 bit |
1 | 1 | 1 | 0 | 1 | 0 | 1 | 1 | additional code |
answer: -2110 = 111010112 (1 byte)