B77GAMMA
The task
P0 reads a brightness knob on CH1. Eyes see brightness on a curve, not a straight line.
Set P1 to the square of the reading's tens: a reading of 70 gives 7 times 7, which is 49.
R1 and C1 smooth the duty onto CH2.
The board
- Sources
- V1 2.4 V triangle at 4 Hz and V2 2.5 V
- Resistors
- R1 10 kΩ
- Capacitors
- C1 1 µF
- Probes
- CH1 and CH2
Key idea
DIV 10 first, so the square is at most 100 and stays inside a word.
Hints
Each hint goes a step further than the one before. Open them one at a time.
Hint 1Show
MUL takes a register as well as a number.
Hint 2Show
IN P0, DIV 10, MOV B, A, MUL B, OUT P1.
Solution
Reveal the Full SolutionThe complete program for GAMMA. 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.
The tens, squared.
u1SC-2 standard
IN P0
DIV 10
MOV B, A
MUL B
OUT P1- CYCLES
- 2400
- at par
- ENERGY
- 4800
- at par
- NODES
- 1
- at par
- INSTRUCTIONS
- 5
- at par