design a sequential circuit that continuously computes the function 2X + 3 or 3X + 1 where the variable X is a three-bit unsigned integer available on a serial interface. A special external data signal (DATA_READY) is asserted whenever each of the bits for X are available. In addition, another special signal (ENCODE) is asserted during the transmission of the data X indicating whether 2X+3 or 3X+1 should be computed.
• New values for X are available roughly every minute.
• Once the function (2X+3 or 3X+1) is computed, the result must be outputted and held along with a RESULT_READY signal until an external DATA_READ signal is asserted.