## Invitation to Computer Science 8th Edition

The 10 bits would be represented as 9 bits for the magnitude and the leftmost bit for the sign. To represent the magnitude, we must rewrite 300 as the sum of powers of $2,$ as we did in the previous question. $300=256+32+8+4$ $\quad=2^{8}+2^{5}+2^{3}+2^{2}$ $\quad=100101100$ in 9 bits To make it a negative value, we must add a 1 bit (the negative sign) to the leftmost position of the number. \begin{aligned}-300 &=1100101100 \\ 254 &=128+64+32+16+8+4+2 \\ &=2^{7}+2^{6}+2^{5}+2^{4}+2^{3}+2^{1} \\ &=01111110 \text { to } 9 \text { bits of accuracy for the magnitude } \end{aligned} To make it a $+254,$ we must add a 0 (the $+$ sign $)$ to the leftmost position of the number. $+254=001111110$
The 10 bits would be represented as 9 bits for the magnitude and the leftmost bit for the sign. To represent the magnitude, we must rewrite 300 as the sum of powers of $2,$ as we did in the previous question. $300=256+32+8+4$ $\quad=2^{8}+2^{5}+2^{3}+2^{2}$ $\quad=100101100$ in 9 bits To make it a negative value, we must add a 1 bit (the negative sign) to the leftmost position of the number. \begin{aligned}-300 &=1100101100 \\ 254 &=128+64+32+16+8+4+2 \\ &=2^{7}+2^{6}+2^{5}+2^{4}+2^{3}+2^{1} \\ &=01111110 \text { to } 9 \text { bits of accuracy for the magnitude } \end{aligned} To make it a $+254,$ we must add a 0 (the $+$ sign $)$ to the leftmost position of the number. $+254=001111110$