Exercise 3: Is the Plain SR Latch Actually Obsolete? — Possible Solution ==================================================================== WHAT THE COLLEAGUE GETS RIGHT ------------------------------ It's true that the D latch structurally eliminates the forbidden state - this chapter verified directly that S and R can never both be 1 under the D latch's own S=D.enable, R=D'.enable construction, something the plain SR latch cannot guarantee on its own. WHAT THE COLLEAGUE GETS WRONG ------------------------------ "Strictly better" assumes the D latch does everything the SR latch does, only more safely - but the two circuits don't actually offer the same capability set. The SR latch's S and R are two genuinely INDEPENDENT control inputs - a user of the raw SR latch can set and reset from two completely separate signal sources, at separate times, controlled by separate logic elsewhere in a larger circuit. The D latch collapses this down to a single data line D plus one enable line - by construction, D can only ever represent "the next value to store," not "two independent forces trying to simultaneously set and reset the same bit," because that independent-S/R capability is exactly what got removed to make the forbidden state impossible. IS THE SR LATCH'S OWN BEHAVIOR EVER STILL USEFUL? ------------------------------ Yes - the SR latch's own two-independent-input structure is genuinely useful specifically in situations where two separate conditions elsewhere in a circuit need the ability to independently force a stored bit to 1 or to 0, without funneling both signals through a single shared "data" line first. The D latch's own elegance (structural safety) comes at the direct cost of that independence - it's a real design tradeoff between two different circuits with two different capabilities, not simply an unqualified upgrade from one to the other. RESULT ------------------------------ The D latch is safer for the specific, common case of "store this one value, when told to" - which is why it's the far more common choice in practice. But calling the plain SR latch "obsolete" overstates the case: it solves a genuinely different problem (two independent set/reset forces) that the D latch's own simplification doesn't actually address, it just sidesteps by removing that capability entirely. WHY THIS WORKS AS AN ANSWER ------------------------------ The answer distinguishes between "safer for the common D-latch use case" (true) and "strictly better in every respect" (false), identifying the specific capability (independent S/R control) that the D latch's own safety improvement trades away, rather than simply agreeing or disagreeing with the colleague's claim outright.