This transfer is possible in two ways: direct transfer and using the decimal system.
first, let\'s make a direct transfer.
let\'s do a direct translation from octal to binary like this:
2318 = 2 3 1 = 2(=010) 3(=011) 1(=001) = 0100110012
answer: 2318 = 100110012
now let\'s make the transfer using the decimal system.
let\'s translate to decimal like this:
the Sign bit is not included in the translation!
0∙82+3∙81+1∙80 = 0∙64+3∙8+1∙1 = 0+24+1 = 2510
Since the number is signed and has a signed bit, the result will have a negative sign
got It: 2318 =-2510
Translate the number -2510 в binary like this:
the Integer part of the number is divided by the base of the new number system:
| 25 | 2 | | | | |
| -24 | 12 | 2 | | | |
| 1 | -12 | 6 | 2 | | |
| 0 | -6 | 3 | 2 | |
| | 0 | -2 | 1 | |
| | | 1 | | |
 |
the result of the conversion was:
-2510 = 110012
You specified the size of your number 1 byte.
Add a signed bit to the number like this:
110012 = 100110012
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 | 1 | 0 | 0 | 1 | direct code |
| | | | | | | | | |
| 1 | 1 | 1 | 0 | 0 | 1 | 1 | 0 | reverse code |
| | | | | | + | 1 | +1 bit |
| 1 | 1 | 1 | 0 | 0 | 1 | 1 | 1 | additional code |
answer: 2318 = 111001112 (1 byte)