Difficulty: Easy
Correct Answer: 01100010
Explanation:
Introduction / Context:
The 1's complement of a binary number is obtained by flipping every bit: 0 becomes 1 and 1 becomes 0. This operation is used in certain checksum schemes, legacy signed representations, and bitwise logic. Here, we invert all bits of an 8-bit pattern exactly as written, preserving width with leading zeros if needed.
Given Data / Assumptions:
Concept / Approach:
1's complement is computed bit by bit: each 1 → 0 and each 0 → 1. The length (8 bits) should remain unchanged, so we keep leading zeros that appear in the result.
Step-by-Step Solution:
Verification / Alternative check:
Check pairwise: first bit 1 → 0, next two zeros → ones, three ones → zeros, zero → one, final one → zero. The count of ones and zeros swaps as expected.
Why Other Options Are Wrong:
10011110 differs only at the last bit and is not a full inversion of all positions.
01100001 and 01100011 each flip an incorrect end bit; only 01100010 inverts all bits correctly.
Common Pitfalls:
Mixing up 1's complement with 2's complement (which adds 1 after inversion), dropping leading zeros in the final string, or inverting only part of the pattern. Always preserve width when dealing with fixed-size registers.
Final Answer:
01100010
Discussion & Comments