Thursday, December 27, 2018

Interview Question 30: Find the smallest two numbers from the input stream

 

You need to design a module that samples an 8-bit number when valid_in is asserted. You need to find out the two smallest numbers and present them at the output. 





Followup questions during answering:

  • Is "0" a default smallest number?
    • No. This will end up adding output valid for the output ports.