[Tiny Tapeout Puzzles](https://tinytapeout.com/digital_design/puzzle_flipflop/)

A flip flop has been created from logic gates below. However, someone has changed all the gates to OR gates and now the outputs are wrong! Using your [knowledge of logic gates and truth tables](/digital_design/logic_gates), **can you figure out which gate to use to fix the flip flop?**

| D       | E       | Q      | !Q     |
|---------|---------|--------|--------|
| 0       | 0       | 0      | 1      |
| 0       | 1       | 0      | 1      |
| 1       | 0       | 0      | 1      |
| 1       | 1       | 1      | 0      |

You can either replace the gates in the GUI, or edit the diagram.json file.

You can also check out the [**solution**](https://wokwi.com/projects/346662209986757203).
Simple FLIP-FLOP realized with 4 NAND gates
Output (Q).
Inverted Output (!Q).
sw1:1a
sw1:2a
sw1:3a
sw1:4a
sw1:5a
sw1:6a
sw1:7a
sw1:8a
sw1:8b
sw1:7b
sw1:6b
sw1:5b
sw1:4b
sw1:3b
sw1:2b
sw1:1b
pwr1:VCC
Loading
tt-block-input
Loading
tt-block-output
gate8:A
gate8:B
gate8:OUT
gate9:A
gate9:B
gate9:OUT
gate10:A
gate10:B
gate10:OUT
gate7:A
gate7:B
gate7:OUT
led1:A
led1:C
pwr6:GND
led2:A
led2:C