Select a problem

Add Easy

Add RAM[0] to RAM[1] and put the result in RAM[2]. Input RAM[0] = 3 RAM[1] …

Subtract Easy

Subtract RAM[1] from RAM[0] and put the result in RAM[2]. Or, put another way: RAM[2] …

Multiply Medium

Multiply RAM[0] by RAM[1] and store the result in RAM[2]. The program assumes that RAM[0] …

Divide Medium

Divide RAM[0] by RAM[1] and put the result in RAM[2] and the remainder in RAM[3]. …

Screen Black Medium

Pressing the 'a' key should make every pixel on the hack computer screen black. Pressing …

Multiply, Subtact, bitwise AND Medium

Your code should read the values in RAM[0] and RAM[1], then behave as follows: If …

Left Shift Medium

Consider a binary word. In a left shift operation, written ≪ in C, every bit …

Two Sequential Keys Medium

Your code should do nothing until the letters ‘O’ and ‘M’ are pressed on the …

Left Rotation Medium

In a left rotation operation, like a left shift operation, every bit in the word …

Right Rotation Medium

As the name suggests, the right rotation operation is the opposite of the left rotation …

Right Logical Shift Medium

As the name suggests, the right (logical) shift operation is the opposite of the left …

Checkerboard Medium

Write a program that behaves as follows. While no key is pressed, the screen should …

Sort Array Hard

An array of numbers is stored between RAM[1000] and RAM[1004] (inclusive). Sort this array in …

Search for index in sorted array Hard

You are given a sorted array, from RAM[1000] to RAM[2000] (inclusive.) The number you are …

Collatz Hard

Consider the following iterative process. Start with a positive integer. If it’s odd, multiply by …