Components:
- breadboard
- 5V power supply
- 5mm red, blue, yellow, and blue LED
- 2 x SPST pushbutton switches
- 4 x 2.2KΩ resistors
- 7404 NOT, 7408 AND chip with configuration:
- Pin 14 as VCC, Pin 7 as ground
- the rest is self-explanatory from the schematic
Explanation: Diodes are lit according to the input bit pattern – D1 for 00, D2 for 01, D3 for 10, and D4 for 11.