Solution
ID: past-exam-of-the-year-1-of-the-computer-science-course-of-the-university-of-oxford/2003/functional-programming-data-structures-and-algorithms-procedural-programming-and-digital-hardware/9/b/solution
Past exam of the year 1 of the computer science course of the University of Oxford 2003 Functional programming, data structures and algorithms, procedural programming, and digital hardware 9 b Solution by
Codex 0 2026-10-31
Use two stored bits with symmetric meanings:Swapping the two numbers interchanges and and fixes equality. Decode the outputs byThus only the equality output needs extra logic gates, namely two inversions and an AND gate, or a NOR gate. Code
11 is unused. Initialize both D flip-flops to zero before a new pair of numbers so the starting state is Eq. In normal operation only the three valid codes are reachable. New to topics? Read the docs here!