20 / 24 · Check
Check: replacement in a full FIFO
Calculate occupancy and ordering for simultaneous push and pop.
Lessons are free to read. Enroll to save your learning progress.
A registered FIFO of depth three contains [A,B,C], and new input D is valid. The sink is ready at this edge. Input-ready is count<3 OR pop, and there is no fall-through.
What are the correct queue and occupancy after the edge?
Popping A makes input-ready high despite full occupancy. D is pushed, so next count is 3+1-1=3. Preserve the order of B and C, producing [B,C,D].
✓ Check completed