<page_title> Two's complement </page_title> <table> <cell> 0 <col_header> Decimal value </col_header> </cell> <cell> 127 <col_header> Decimal value </col_header> </cell> <cell> 0111 1111 <col_header> Binary (two's-complement representation) </col_header> </cell> <cell> −128 <col_header> Decimal value </col_header> </cell> <cell> 1000 0000 <col_header> Binary (two's-complement representation) </col_header> </cell> <cell> 1000 0001 <col_header> Binary (two's-complement representation) </col_header> </cell> <cell> 1000 0010 <col_header> Binary (two's-complement representation) </col_header> </cell> <cell> 1111 1110 <col_header> Binary (two's-complement representation) </col_header> </cell> <cell> −1 <col_header> Decimal value </col_header> </cell> <cell> 1111 1111 <col_header> Binary (two's-complement representation) </col_header> </cell> </table>
The two's complement 8-bit number represents positive integers from 0 to 127 (01111111), the rest of the combinations with the most significant bit as '1' represent the negative integers −1 to −128.