GATE Computer ScienceVery hardGATE CS (PYQ pattern)
The Internet checksum (one's complement of the 16-bit one's complement sum) of the words 0xF0F0, 0x0F0F, 0x8001, 0xFFFF is 0x7FFE. Which of the following corruptions of the data words would the receiver fail to detect?
- A. 0x8001 → 0x8000, all other words unchanged
- B. 0xFFFF → 0x0000 together with 0xF0F0 → 0xF0F1
- C. the lowest bit of every one of the four words inverted
- D. words reordered, with 0xF0F0 → 0xF0F1 and 0x0F0F → 0x0F0E
Correct answer: D. words reordered, with 0xF0F0 → 0xF0F1 and 0x0F0F → 0x0F0E
One's complement addition is commutative, so reordering is invisible, and +1 on one word cancels −1 on another. Changing 0x8001 to 0x8000 alters the sum by 1. 0xFFFF and 0x0000 are both 'zero' in one's complement, so that swap changes nothing, but the extra +1 on 0xF0F0 is caught. Inverting every low bit changes the words by +1, −1, −1, −1, a net −2, which is detected.
More Digital Logic questions
- The (8, 4) extended Hamming code is the (7, 4) Hamming code with an overall even-parity bit appended. How many of its 16 codewords have…
- A 4 × 4 block of data bits is protected by two-dimensional even parity: a parity bit per row, a parity bit per column and a corner bit…
- Which of the following are true? (Python-style double precision for I, III, IV; single precision rounding for II.) I. adding 0.1 to a…
- A 5-bit asynchronous up-counter Q4..Q0 (Q4 the MSB) has its active-low asynchronous clear driven by a 3-input NAND of Q4, Q1 and Q0. The…
- A 3-bit register Q2Q1Q0 shifts right every clock, and the new Q2 is the XNOR of the old Q2 and old Q0. What is the behaviour of this…
- A 6-bit Johnson counter Q5…Q0 shifts right on each clock (Q4 ← Q5, …, Q0 ← Q1) and loads Q5 ← Q0' (old Q0). Because of noise it starts in…