0
1.8kviews
Calculate (-6)10-(-2)10 using 2's complement method
1 Answer
0
118views

The given numbers are negative decimal numbers

$\begin{align*} (-6)^{10}=10's \ complement \ of \ 6&=r^n-N\\ &=10^1-(-6)\\ &=16 \end{align*}$

$\begin{align*} (-2)^{10}=10's \ complement \ of \ 2&=r^n-N\\ &=10^1-(-2)\\ &=12 \end{align*}$

Binary Representation of (16)10=00010000→(1)

Binary Representation of (12)10=00001100→(2)

$\begin{align*} 2's \ complement \ of& \ 00001100\\ &=11110011+1\\ &=11110100 \rightarrow (3) \end{align*}$

Adding (1) & (2)

$\begin{matrix}&&_1&_1&_1&&&&&\\&&1&1&1&1&0&1&0&0\\&\textbf+&0&0&0&1&0&0&0&0\\\hline\\& Discard \ carry \leftarrow1]&0&0&0&0&0&1&0&0\end{matrix}$

Result is 00000100

Please log in to add an answer.