It is required to implement a stack using bidirectional shift registers providing stack underflow and overflow detection capability.
- How many shift registers are needed for a stack capacity of $nk$-bit words?
- Show the schematic diagram of the implementation, clearly indicating all the data and control lines.