← ProblemsCircuits / Sequential Logic / Latches and Flip-Flops

Detect both edges

36%edge-detectionflip-flopsvectors

For each bit of an 8-bit input vector, detect any transition — 0→1 or 1→0 — from one clock cycle to the next.

The output bit anyedge[i] must be 1 in the cycle after in[i] changes (in either direction), and 0 otherwise.