Invitation to Computer Science 8th Edition

Published by Cengage Learning
ISBN 10: 1337561916
ISBN 13: 978-1-33756-191-4

Chapter 4 - 4.2 - The Binary Numbering System - Practice Problems - Page 166: 3

Answer

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$

Work Step by Step

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$
Update this answer!

You can help us out by revising, improving and updating this answer.

Update this answer

After you claim an answer you’ll have 24 hours to send in a draft. An editor will review the submission and either publish your submission or provide feedback.