1's Complement Interview Questions and Answers: Binary Basics, Range and Addition
Remembering 'flip every bit' is only the start. Rehearse short interview answers on fixed widths, signed encodings and overflow, then trace both directions of a subtraction.
KnowledgeGate Team
Exam prep & CS education

You remember “flip every bit”, but a follow-up about width, negative zero or carry can still stop your answer. The missing piece is knowing what each bit pattern means under a stated convention. An interview answer is strongest when it names the width, states the convention, performs the bit operation, interprets the pattern and verifies the result numerically. That sequence stops a correct-looking bit string from receiving the wrong value.
What must you specify before interpreting a binary number?
Prompt: “What does 1101 mean?”
Model answer: “It depends on the encoding.” The same four bits have different meanings:
Four-bit encoding | Value of 1101 | Reason |
|---|---|---|
Unsigned | 13 | Positional weights give 8 + 4 + 0 + 1 |
Sign-magnitude | -5 | Sign bit 1, magnitude 101 = 5 |
One's complement | -2 | Invert 1101 to recover magnitude 0010 = 2 |
Two's complement | -3 | Signed weights give -8 + 4 + 0 + 1 |
State the width and encoding before calculating. Width tells you how many bits belong to the number; encoding tells you their numerical meaning. The most significant bit, or MSB, alone cannot identify which signed encoding is being used.
The calculations use eight-bit one's complement unless a step labels another width. If this vocabulary needs revision, start with CS fundamentals.
The earlier 1's complement explained guide owns the full conversion and five-bit arithmetic treatment; this page focuses on concise interview answers and follow-up checks.
How do you find the 1's complement of a number?
Prompt: “Represent -13 in eight-bit one's complement.”
Model answer: “Write +13 in eight bits, then invert every bit.”
Expand the magnitude: 13 = 8 + 4 + 1.
Write +13 as
00001101.Replace every 0 with 1 and every 1 with 0:
11110010.Check by inverting again:
11110010becomes00001101, recovering 13.
Leading zeroes matter because the flip applies across the declared width.

Distinguish the operation from its interpretation. As an unsigned pattern, 11110010 is 242 = 255 - 13. As eight-bit one's complement, it represents -13.
For an unsigned n-bit value x, the inverted pattern's unsigned value is (2^n - 1) - x. The number representation and conversions guide develops this connection further.
Why are there two zeroes, and what is the signed range?
Prompt: “Why can't eight-bit one's complement represent -128?”
Model answer: “Its range is -127 to +127, because positive and negative magnitudes are paired symmetrically.”
For n bits, the signed range is -(2^(n-1) - 1) to +(2^(n-1) - 1). At eight bits, 2^7 - 1 = 127:
+127 is
01111111.Inverting gives -127 as
10000000.+0 is
00000000.Inverting gives -0 as
11111111.
The two zero patterns encode the same mathematical value. Eight bits therefore provide 256 patterns but only 255 distinct integer values: 127 negative integers, zero and 127 positive integers.
Keep the two's complement contrast separate: in eight-bit two's complement, 10000000 means -128 and 11111111 means -1. Those meanings do not transfer to one's complement.
Follow-up: “What is the four-bit range?” It is -7 to +7, since 2^3 - 1 = 7, with zero patterns 0000 and 1111. Say the width and convention aloud before giving the range.
How does 1's complement addition use end-around carry?
Prompt: “Compute 13 - 5 using eight-bit one's complement.”
Model answer: “Add +13 to the encoding of -5, then add any carry-out back at the least significant end.”
Encode +13 as 00001101. Since +5 is 00000101, -5 is 11111010.
Step | Calculation | Meaning |
|---|---|---|
Add encodings | 00001101 + 11111010 = 1 00000111 | Carry-out 1, low eight bits 00000111 |
Fold carry | 00000111 + 00000001 = 00001000 | 7 + 1 = 8 |
Interpret | 00001000 | +8 |
This final increment is end-around carry. Merely discarding the carry would give 7, which is incorrect. An unsigned arithmetic check gives 13 + 250 = 263 = 256 + 7; folding the carry produces 8.

Now reverse the subtraction:
5 - 13: 00000101 + 11110010 = 11110111.
There is no carry-out, so there is no end-around increment. Invert the negative result: 11110111 becomes 00001000, giving magnitude 8. The answer is -8.
Finally, cancellation gives 00000101 + 11111010 = 11111111. This is negative zero, mathematically zero, exactly as 5 - 5 requires.
Which traps expose a weak model answer?
Trap 1: “Flip and add one.” That is the two's complement rule. Applying it to 13 gives 11110011, which represents -12 in one's complement: its inverse is 00001100. One's complement flips only.
Compare eight-bit encodings of -5:
Encoding | Pattern |
|---|---|
Sign-magnitude | 10000101 |
One's complement | 11111010 |
Two's complement | 11111011 |
Trap 2: Ignoring width. Four-bit +5 is 0101, so -5 is 1010. Eight-bit +5 is 00000101, so -5 is 11111010. To extend a signed one's complement value, repeat its sign bit: 1010 becomes 11111010. Zero-extending it to 00001010 instead produces +10.
Trap 3: Treating carry-out as signed overflow. In four bits, +5 + +4 gives 0101 + 0100 = 1001. That pattern decodes as -6 because its inverse is 0110. The intended answer, +9, exceeds +7, so signed overflow occurred even without carry-out.
By contrast, the carry in 13 - 5 is folded back, and +8 fits the eight-bit range. Check representability and the expected sign, not carry alone.
How can you rehearse interview and exam-style follow-ups?
A 90-second oral drill can test decoding, range calculation and zero recognition:
Decode four-bit
1100in one's complement. Its inverse is0011, so the magnitude is 3 and the answer is -3.Give the six-bit signed range. Calculate 2^5 - 1 = 31. The range is -31 to +31.
Interpret eight-bit
11111111. It is the inverse of positive zero, so it represents negative zero, with numerical value 0.
For each answer, name the width, convention, rule and numerical verification in that order. Then trace 5 - 13 without notes and explain why four-bit +5 + +4 overflows. Together, the drills test whether you can apply the representation rather than recite a conversion.
Continue with the solved 1's complement questions to practise choosing and explaining an answer.
What is the short answer to remember, and what comes next?
“At a fixed width, one's complement represents a negative value by inverting every bit of its positive encoding. It has two zero encodings, a symmetric signed range, and end-around carry in addition.”
Keep two anchors ready: eight-bit -13 is 11110010, and 13 - 5 produces 00001000 after carry folding. Reproduce both subtraction directions without notes, then explain why four-bit +9 cannot fit.
For further study, explore the Digital Electronics course. First make sure you can explain each worked result, including the carry rule, in your own words.
Keep learning
1's Complement Explained: Binary Conversion, Addition and Worked Examples
Learn how fixed-width 1's complement numbers represent negatives, why zero has two encodings, and how end-around carry works through exact examples.
2's Complement Interview Questions and Answers: Binary Maths, Range and Overflow
Know the invert-and-add-one rule but struggle to explain it? Work through fixed-width examples, separate carry from overflow, and practise clear interview answers.
1's Complement MCQs: 10 Solved Questions with Explanations
Solve 10 previous-year MCQs on 1's complement, signed magnitude, binary fractions, radix complements and fixed-point representation. Each explanation shows the decisive conversion or range check.
TreeMap and SortedMap in Java: Ordering, Range Views and Worked Examples
Learn how Java's TreeMap orders keys, answers floor and ceiling queries, exposes live range views, and handles comparator collisions through worked examples.





