1
0
UAHCode/EE203/Noah Woodlee/Lab2/part5/part5.v.bak
2022-08-28 16:12:16 -05:00

13 lines
414 B
Coq

module bcd(IN,OUT);
input [3:0] IN;
output [6:0] OUT;
assign OUT=IN[3]? (IN[0]? 7'b0010_000:7'b0000_000):
(IN[2]? (IN[1]? (IN[0]? 7'b1111_000:7'b0000_010):
(IN[0]? 7'b0010_010:7'b0011_001)):
(IN[1]? (IN[0]? 7'b0110_000:7'b0100_100):
(IN[0]? 7'b1111_001:7'b1000_000)));
endmodule