← RGPV CD-501 Theory of Computation November 2023 Solved Paper
Question
Design a Moore machine computing the remainder modulo 3 of a binary input.
Asked in: CD-501 | November 2023 | 2(a)
Answer
Use states r0,r1,r2 with outputs 0,1,2 respectively; start r0. Reading most significant bit first, update r to (2r+b) mod 3. Transitions on 0,1 respectively: r0→r0,r1; r1→r2,r0; r2→r1,r2. For 1011 the residues are 1,2,2,2, so output 2. The invariant follows from binary positional notation.
← RGPV CD-501 Theory of Computation November 2023 Solved Paper
Discussion
Ask a question, share your thoughts or report an error.
Sign in to participate in the discussion.
Join the discussion