[Tiny Tapeout Puzzles](https://tinytapeout.com/digital_design/)
Set a code for your precious safe!
**Controls**
* Switches 1 to 7 are used to enter the code
* Switch 8 sets the code to the current entry (i.e. value of switches 1 to 7)
* Reset locks the safe
* Entering the correct code unlocks the safe
The 7-segment display shows "L" if the safe is locked and "U" if unlocked.
### To begin
Press the green button in the top left of the pane to begin the simulation.
Set the clock to free-running mode (move the switch towards the "10k" signal).
Enter your desired code using switches 1 to 7.
Turn ON switch 8 (to set the code), then turn it OFF.
Change the switches 1 to 7 (to avoid instantly unlocking the safe).
Push the RESET button (to lock the safe).
Start entering codes on the switches 1 to 7.
The safe should unlock when you enter the corrent code.
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
clock1:CLK
pwr2:GND
pwr1:VCC
sevseg1:COM.1
sevseg1:COM.2
sevseg1:A
sevseg1:B
sevseg1:C
sevseg1:D
sevseg1:E
sevseg1:F
sevseg1:G
sevseg1:DP
sw2:1
sw2:2
sw2:3
btn1:1.l
btn1:2.l
btn1:1.r
btn1:2.r
pwr3:VCC
ttin:EXTCLK
ttin:EXTRST_N
ttin:EXTIN0
ttin:EXTIN1
ttin:EXTIN2
ttin:EXTIN3
ttin:EXTIN4
ttin:EXTIN5
ttin:EXTIN6
ttin:EXTIN7
ttin:CLK
ttin:RST_N
ttin:IN0
ttin:IN1
ttin:IN2
ttin:IN3
ttin:IN4
ttin:IN5
ttin:IN6
ttin:IN7
btn2:1.l
btn2:2.l
btn2:1.r
btn2:2.r
gnd1:GND
ttout:OUT0
ttout:OUT1
ttout:OUT2
ttout:OUT3
ttout:OUT4
ttout:OUT5
ttout:OUT6
ttout:OUT7
ttout:EXTOUT0
ttout:EXTOUT1
ttout:EXTOUT2
ttout:EXTOUT3
ttout:EXTOUT4
ttout:EXTOUT5
ttout:EXTOUT6
ttout:EXTOUT7
r2:1
r2:2
pwr5:VCC
gnd2:GND
pwr4:VCC
led1:A
led1:C
flop1:D
flop1:CLK
flop1:Q
flop1:NOTQ
mux1:A
mux1:B
mux1:SEL
mux1:OUT
xor1:A
xor1:B
xor1:OUT
flop2:D
flop2:CLK
flop2:Q
flop2:NOTQ
mux2:A
mux2:B
mux2:SEL
mux2:OUT
xor2:A
xor2:B
xor2:OUT
flop3:D
flop3:CLK
flop3:Q
flop3:NOTQ
mux3:A
mux3:B
mux3:SEL
mux3:OUT
xor3:A
xor3:B
xor3:OUT
flop4:D
flop4:CLK
flop4:Q
flop4:NOTQ
mux4:A
mux4:B
mux4:SEL
mux4:OUT
xor4:A
xor4:B
xor4:OUT
flop5:D
flop5:CLK
flop5:Q
flop5:NOTQ
mux5:A
mux5:B
mux5:SEL
mux5:OUT
xor5:A
xor5:B
xor5:OUT
flop6:D
flop6:CLK
flop6:Q
flop6:NOTQ
mux6:A
mux6:B
mux6:SEL
mux6:OUT
xor6:A
xor6:B
xor6:OUT
flop7:D
flop7:CLK
flop7:Q
flop7:NOTQ
mux7:A
mux7:B
mux7:SEL
mux7:OUT
xor7:A
xor7:B
xor7:OUT
or1:A
or1:B
or1:OUT
or2:A
or2:B
or2:OUT
or3:A
or3:B
or3:OUT
or4:A
or4:B
or4:OUT
or5:A
or5:B
or5:OUT
or6:A
or6:B
or6:OUT
flop8:D
flop8:CLK
flop8:S
flop8:R
flop8:Q
flop8:NOTQ
not1:IN
not1:OUT
led2:A
led2:C
pwr6:GND
not2:IN
not2:OUT
Setting the code?
Code bit 1
Bit 1 wrong?
Code bit 2
Code bit 3
Code bit 4
Code bit 5
Code bit 6
Code bit 7
Bit 2 wrong?
Bit 3 wrong?
Bit 4 wrong?
Bit 5 wrong?
Bit 6 wrong?
Bit 7 wrong?
Bit 1 or 2 wrong?
Bit 3 or 4 wrong?
Bit 5 or 6 wrong?
Any of bits 1-4 wrong?
Any of bits 5-7 wrong?
Any bit wrong?
All bits correct?
Unlock the safe
Safe is unlocked
Lock the safe
led3:A
led3:C
gnd3:GND
Reset
Lock state
Setting the code?
Setting the code?
Setting the code?
Setting the code?
Setting the code?
Setting the code?