Questions tagged [golf-cpu]

The _GOLF_ CPU is a toy CPU with a simple instruction set that allows precise measurement of performance for challenges.

Filter by
Sorted by
Tagged with
17 votes
0 answers
572 views

GOLF CPU - Implement Arbitrary Precision Integer Division [closed]

This question was inspired this question and @orlp's comment and a lot of the explanation was copied from there. Write a GOLF assembly program that given two arbitrary size decimal integers ...
Maltysen's user avatar
  • 25.7k
5 votes
2 answers
335 views

The GOLF CPU Golfing Challenge: Sides of a Cuboid

This challenge is the second of a series of fastest-code problems that should be written in the GOLF CPU. You can find the first here For this problem, you are given the volume of a cuboid (A ...
Nathan Merrill's user avatar
14 votes
2 answers
557 views

The GOLF CPU Golfing Challenge: Prime Partitions

This challenge is the first of a series of fewest-operations problems that should be written in the GOLF CPU. You can find the next one here A partition of a number, ...
Nathan Merrill's user avatar
16 votes
4 answers
668 views

Testing if a number is a square

Write a GOLF assembly program that given a 64-bit unsigned integer in register n puts a non-zero value into register s if ...
orlp's user avatar
  • 39k
22 votes
3 answers
2k views

Factoring a 64-bit integer

Write a GOLF assembly program that reads an integer from stdin (followed by a trailing newline), and outputs its prime factors seperated by newlines, followed by a trailing newline on stdout. The ...
orlp's user avatar
  • 39k