result result state[1:0] state[1:0] inp inp clk clk rst rst pattern[15:0] pattern[15:0] BINARYRADIX i[15:0] i[15:0]