Skip to content
Tactiverge
Level 2Program correctnessWrite a program

Double it

Read one number n and output 2 × n, wrapped to 8 bits (so 200 gives 144). Then halt.

Public tests

  • input 3 → 6
  • input 0 → 0
  • input 127 → 254
  • input 200 → 144

Par: 132 cycles in total over these tests. Skills: STA, ADD, wraparound.

New to this? Silicon Studio 15: A simple virtual processor

How results are computed: model assumptions.

One instruction per line. Labels end with a colon, comments start with a semicolon. Numbers can be 12, 0x0C or 0b1100.