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

  • 2
    $\begingroup$ The answer can be easily found by following the procedure described here. $\endgroup$
    – Steven
    Apr 27, 2020 at 14:06
  • 1
    $\begingroup$ I’m voting to close this question because the OP showed no attempt $\endgroup$
    – user16034
    Jun 30, 2023 at 11:43

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 you have read our privacy policy.

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