Skip to content
Tactiverge
Level 4Computational efficiencyWrite a program

Times ten, under par

Read n and output 10 × n (wrapped to 8 bits). Bench-8 has no multiply. Adding n ten times works, but par needs a smarter idea: 10n = 8n + 2n.

Public tests

  • input 0 → 0
  • input 1 → 10
  • input 7 → 70
  • input 25 → 250
  • input 26 → 4

Par: 355 cycles in total over these tests. Skills: strength reduction, doubling.

New to this? Silicon Studio 7: Multi-bit arithmetic

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.