Syscall 2: Firmware, home

SignalChapter 4: Stars and hubs

21SUMMIT

The task

P must receive the sum of X, Y, and Z, one value from each.

The core at the summit has only two inputs, so someone has to add on the way up.

The board

The board of SUMMIT4 cores: c1, c2, c3, and top. Inputs X, Y, and Z; outputs P.c1SC-2 15 LINESc2SC-2 15 LINESc3SC-2 15 LINEStopSC-2 15 LINESP0P1P0P1P2P0P1P0P1P2XYZP
The board as the puzzle screen lays it out. Cyan pins read, lemon pins write, violet pins go both ways. On a narrow screen, scroll the board sideways to see all of it.

Key idea

Fan in: three streams, and the summit has only two inputs.

Hints

Each hint goes a step further than the one before. Open them one at a time.

Hint 1Show

A core can read a stream pin and a wire in the same program.

Hint 2Show

IN puts a stream value in A. Keep the other one in B.

Hint 3Show

Add two of the streams before they reach the summit.

Solution

Reveal the Full SolutionThe complete program for SUMMIT. 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.

c1SC-2 standard

IN P0
OUT P1

c2SC-2 standard

IN P1
MOV B, A
IN P0
ADD B
OUT P2

c3SC-2 standard

IN P0
OUT P1

topSC-2 standard

IN P0
MOV B, A
IN P1
ADD B
OUT P2
CYCLES
240
at par
ENERGY
3276
at par
NODES
4
at par
INSTRUCTIONS
14
at par