D15PAIR SUM
The task
Bytes arrive in pairs. Transmit the low byte of each pair's sum.
Bytes arrive in pairs. Transmit the low byte of each pair's sum.
The board
Key idea
A pair that sums past 255 still transmits one byte. Do not send the carry.
Hints
Each hint goes a step further than the one before. Open them one at a time.
Hint 1Show
Read the first byte into A and the second into B. ADD A, B adds them.
Hint 2Show
200 plus 100 is 300. The low byte of 300 is 44, and that is what OUT sends.
Hint 3Show
IN A, IN B, ADD A, B, OUT A. Then the card waits for the next pair.
Solution
Reveal the Full SolutionThe complete program for PAIR SUM. Open it only when you want the answer.
The reference program
The game's own solution to this ticket. It passes every test and scores exactly par on every benchmark.
IN A
IN B
ADD A, B
OUT A- TICKS
- 35
- at par
- LINES
- 4
- at par