B44LADDER
The task
R1, R2, and R3 add P0 and P1 into one voltage on CH1.
P0 alone gives 1 volt, P1 alone gives 2, and both give 3.
On each tick of P2, climb one volt, and after 3 volts drop back to 0.
The board
- Resistors
- R1 20 kΩ, R2 10 kΩ, and R3 10 kΩ
- Probes
- CH1
Key idea
The count of ticks MOD 4 is the number of volts.
Hints
Each hint goes a step further than the one before. Open them one at a time.
Hint 1Show
P0 is the ones bit of that number and P1 the twos bit.
Hint 2Show
MOD 2 gives the ones bit. DIV 2 gives the twos bit of a number under 4.
Solution
Reveal the Full SolutionThe complete program for LADDER. Open it only when you want the answer.
The reference program
The game's own solution. It passes every test and scores exactly par on every benchmark.
Two pins add into four levels: 0, 1, 2, and 3 volts.
u1SC-2 standard
IN P2
MOD 4
MOV B, A
MOD 2
OUT P0
MOV A, B
DIV 2
OUT P1- CYCLES
- 153
- at par
- ENERGY
- 306
- at par
- NODES
- 1
- at par
- INSTRUCTIONS
- 8
- at par