module low_bcd_to_seven_segment(A, SEGMENTS) ; //active low output // display binary number A on a 7 segment display input [3:0] A; // a binary number from 0 to 9 output [6:0] SEGMENTS ; //DISPLAY = {G,F,E,D,C,B,A} of a 7-segment display reg SEGMENTS; always case (A) 0: SEGMENTS <= 7'B1000000; 1: SEGMENTS <= 7'B1111001; 2: SEGMENTS <= 7'B0100100; 3: SEGMENTS <= 7'B0110000; 4: SEGMENTS <= 7'B0011001; 5: SEGMENTS <= 7'B0010010; 6: SEGMENTS <= 7'B0000010; 7: SEGMENTS <= 7'B1111000; 8: SEGMENTS <= 7'B0000000; 9: SEGMENTS <= 7'B0010000; default: SEGMENTS <= 7'B1111111; endcase endmodule