input [2:0]code,output reg[7:0]result );always@(*)begin case(code)3'b000: result = 8'h01;3'b001: result = 8'h02;3'b010: result = 8'h04;3'b011: result = 8'h08;3'b100: result = 8'h10;3'b101: result = 8'h20;3'b110: result = 8'h40;3'b111: result = ...
else result = 8'h04;else if(code[0])result = 8'h02;else result = 8'h01;else end endmodule