next up previous
: 結論 : 整数 : 1の補数表現

2の補数表現

図 2: 2の補数の足し算の例: (-4)+6 = 2
\begin{figure}\begin{center}
\begin{tabular}{cccccc}
&\tt 1 &\tt 1 &\tt0 &\tt0 ...
...1) &\tt0 &\tt0 &\tt 1 &\tt0 &  $+2$\\
\end{tabular} \end{center}
\end{figure}

例:


10 進数 1の補数表現 2の補数表現
3 0011
2 0010
1 0001
0 0000 0000
  or 1111  
-1 1110 1111
-2 1101 1110
-3 1100 1101



Hiroyuki Kobayashi 平成19年6月14日