
I check if the input number equals to 2904: I use 8 ui and 8 uio to represent 4 BCD. if it's a match, the LED birthday candle lights up!
D3: 0010 D2: 1001 D2: 0000 D1: 0100. You can also try to input an invalid number and observe it doesnt work.
LED
| # | Input | Output | Bidirectional |
|---|---|---|---|
| 0 | D2d | MATCH_2904 | D0d |
| 1 | D2c | D0c | |
| 2 | D2b | D0b | |
| 3 | D2a | D0a | |
| 4 | D3d | D1d | |
| 5 | D3c | D1c | |
| 6 | D3b | D1b | |
| 7 | D3a | D1a |