Parity example with ASCII “2B” (hex for the “+” character): If we add an odd-parity bit as the most significant bit to the 7-bit ASCII code for 0x2B, does the resulting 8-bit pattern equal 10101011?

Difficulty: Easy

Correct Answer: Correct

Explanation:


Introduction / Context:
Parity examples help solidify bit-level reasoning. The ASCII code 0x2B corresponds to the “+” character. Classic ASCII is a 7-bit code; many systems transmit an additional parity bit to detect errors. With odd parity, the total number of 1s in the transmitted byte (data bits + parity bit) must be odd. This question verifies that adding an odd-parity bit to ASCII 0x2B yields the pattern 10101011.



Given Data / Assumptions:

  • 7-bit ASCII for “+” is 0x2B (binary 0101011 in 7 bits; 00101011 if shown as 8 bits with leading 0).
  • Parity bit is placed as the most significant bit in this example.
  • Odd parity means total count of 1s (including the parity bit) is odd.


Concept / Approach:
Count the number of 1s in the data bits, then choose the parity bit to make the total odd. The 7-bit 0x2B has four 1s when represented as 00101011 (the leading 0 does not change parity). Since four is even, the parity bit must be 1 to yield an odd total of five. Placing that 1 as the MSB produces 10101011.



Step-by-Step Solution:

Write ASCII “+” as binary: 0x2B → 00101011 (8-bit representation with leading zero).Count ones: there are 4 ones → even.Odd parity requires total ones odd → add parity bit = 1.Place parity as MSB → result = 1 00101011 → 10101011.


Verification / Alternative check:
Recount ones in 10101011: there are 5 ones, which is odd. Therefore, odd parity is satisfied. If even parity had been required, the parity bit would be 0 (yielding 00101011).



Why Other Options Are Wrong:

Incorrect: Contradicts the direct parity calculation.Even parity claim: Would require parity bit 0, not 1, and would not match 10101011.LSB placement claim: Parity placement can vary by protocol, but the example explicitly uses the MSB convention.


Common Pitfalls:
Mixing 7-bit and 8-bit representations when counting ones, or forgetting which end hosts the parity bit in a specific protocol.


Final Answer:
Correct

More Questions from Number Systems and Codes

Discussion & Comments

No comments yet. Be the first to comment!
Join Discussion