What is the representation of -40 in a 8bit computer using 2's complement intiger?

  • 1
    $\begingroup$ The answer can be easily found by following the procedure described here. $\endgroup$
    – Steven
    Apr 27, 2020 at 14:06

1 Answer 1


First of all, 40 in binary is 101000.

The 8-bit representation is obtained by zero-padding: 00101000.

The one's complement of this is obtained by inverting the bits: 11010111.

To obtain the two's complement, we simply add 1: 11011000.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.