[Tiny Tapeout Puzzles](https://tinytapeout.com/digital_design/)
Set a code for your precious safe!
**Controls**
* Switch 2 is used to reset the safe.
* Switch 8 is used to set your code (ON = set, OFF = locked)
* Switches 3 to 5 are used to set the code.
* The push button is used to enter your code.
| SW | Function|
|---------|---------|
| 1 | N/A |
| 2 | Reset |
| 3 | Code 0 |
| 4 | Code 1 |
| 5 | Code 2 |
| 6 | N/A |
| 7 | N/A |
| 8 | Set Code|
### To begin
Press the green button in the top left of the pane to begin the simulation.
Set your desired code using Switches 3 to 5. Once you've done so, toggle Switch 8 to ON, press the button, then toggle Switch 8 back OFF--the safe is now set!
Turn ON Switch 2, and press the push button. The red LED labeled "Locked" should turn on and the seven segment display should show "L" (for locked).
Next turn OFF Switch 2 to begin entering codes.
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:GND
pwr2:VCC
chip1:EXTCLK
chip1:EXTRST_N
chip1:EXTIN0
chip1:EXTIN1
chip1:EXTIN2
chip1:EXTIN3
chip1:EXTIN4
chip1:EXTIN5
chip1:EXTIN6
chip1:EXTIN7
chip1:CLK
chip1:RST_N
chip1:IN0
chip1:IN1
chip1:IN2
chip1:IN3
chip1:IN4
chip1:IN5
chip1:IN6
chip1:IN7
chip2:OUT0
chip2:OUT1
chip2:OUT2
chip2:OUT3
chip2:OUT4
chip2:OUT5
chip2:OUT6
chip2:OUT7
chip2:EXTOUT0
chip2:EXTOUT1
chip2:EXTOUT2
chip2:EXTOUT3
chip2:EXTOUT4
chip2:EXTOUT5
chip2:EXTOUT6
chip2:EXTOUT7
sevseg1:COM.1
sevseg1:COM.2
sevseg1:A
sevseg1:B
sevseg1:C
sevseg1:D
sevseg1:E
sevseg1:F
sevseg1:G
sevseg1:DP
btn1:1.l
btn1:2.l
btn1:1.r
btn1:2.r
State 0
pwr3:VCC
flipflop1:D
flipflop1:CLK
flipflop1:Q
flipflop1:NOTQ
flipflop2:D
flipflop2:CLK
flipflop2:Q
flipflop2:NOTQ
State 1
led1:A
led1:C
led2:A
led2:C
pwr4:GND
led3:A
led3:C
pwr5:GND
gate1:A
gate1:B
gate1:OUT
pwr6:GND
Locked
Unlocked!
gate2:A
gate2:B
gate2:OUT
gate3:A
gate3:B
gate3:OUT
gate4:A
gate4:B
gate4:OUT
gate5:A
gate5:B
gate5:OUT
gate6:A
gate6:B
gate6:OUT
gate7:A
gate7:B
gate7:OUT
gate8:A
gate8:B
gate8:OUT
gate9:A
gate9:B
gate9:OUT
not1:IN
not1:OUT
not2:IN
not2:OUT
not3:IN
not3:OUT
gate10:A
gate10:B
gate10:OUT
gate11:A
gate11:B
gate11:OUT
gate12:A
gate12:B
gate12:OUT
gate13:A
gate13:B
gate13:OUT
gate14:A
gate14:B
gate14:OUT
gate15:A
gate15:B
gate15:OUT
gate16:A
gate16:B
gate16:OUT
not4:IN
not4:OUT
gate17:IN
gate17:OUT
gate21:IN
gate21:OUT
gate22:IN
gate22:OUT
gate23:IN
gate23:OUT
Next State Logic
7-Segment Logic
gate27:IN
gate27:OUT
not8:IN
not8:OUT
mux7:A
mux7:B
mux7:SEL
mux7:OUT
mux8:A
mux8:B
mux8:SEL
mux8:OUT
flipflop4:D
flipflop4:CLK
flipflop4:Q
flipflop4:NOTQ
gate18:IN
gate18:OUT
not9:IN
not9:OUT
mux9:A
mux9:B
mux9:SEL
mux9:OUT
mux10:A
mux10:B
mux10:SEL
mux10:OUT
flipflop5:D
flipflop5:CLK
flipflop5:Q
flipflop5:NOTQ
gate28:IN
gate28:OUT
not10:IN
not10:OUT
mux11:A
mux11:B
mux11:SEL
mux11:OUT
mux12:A
mux12:B
mux12:SEL
mux12:OUT
flipflop6:D
flipflop6:CLK
flipflop6:Q
flipflop6:NOTQ
Logic for Setting Code
mux1:A
mux1:B
mux1:SEL
mux1:OUT
mux2:A
mux2:B
mux2:SEL
mux2:OUT
mux3:A
mux3:B
mux3:SEL
mux3:OUT