Katkat

Find minimum two’s-complement value with three ones

BitkernelSoftware Engineer · Online Assessment

Last updated

This question evaluates understanding of two's-complement representation and bit-level reasoning, specifically how constrained bit counts affect signed 8-bit integer values.

An 8-bit signed integer uses two's complement representation and has exactly three 1 bits and five 0 bits.

What is the smallest (most negative) value that can be represented under these constraints?

Options:

  • A. -127
  • B. -32
  • C. -125
  • D. -3