At each rising edge, store the bitwise AND of the two four-bit inputs. Hold the result until the next edge.