Needs["CSM`Turing`"]

addOne = {
    instruction[ 1, b, b, r, 2],
    instruction[ 2, m, m, r, 2],
    instruction[ 2, b, m, l, 3],
    instruction[ 3, m, m, l, 3],
    instruction[ 3, b, b, s, 0]
}

sub1 = {
    instruction[ 1, b, b, r, 2],
    instruction[ 2, m, m, r, 2],
    instruction[ 2, b, b, l, 3],
    instruction[ 3, m, b, l, 4],
    instruction[ 3, b, b, s, 0],
    instruction[ 4, m, m, l, 4],
    instruction[ 4, b, b, s, 0]
}

add = {
    instruction[1, b, b, r, 2], (* skip b *)
    instruction[2, m, m, r, 2], (* skip 1 right *)
    instruction[2, b, m, r, 3], (* fill gap *)
    instruction[3, m, m, r, 3], (* skip 1 right *)
    instruction[3, b, b, l, 4], (* end of second number *)
    instruction[4, m, b, l, 5], (* erase 1 *)
    instruction[5, m, m, l, 5], (* skip 1 left *)
    instruction[5, b, b, s, 0]  (* halt *)
}

counter = {
    instruction[ 1, b, m, r, 2],
    instruction[ 1, m, m, l, 3],
    instruction[ 2, b, b, l, 1],
    instruction[ 2, m, b, r, 2],
    instruction[ 3, b, m, l, 1],
    instruction[ 3, m, m, s, 0]
};

binaryCounter = {
    instruction[ 1, 0, 1, l, 2],
    instruction[ 1, 1, 0, r, 1],
    instruction[ 1, b, 1, l, 2],
    instruction[ 2, 0, 0, l, 2],
    instruction[ 2, 1, 1, l, 2],
    instruction[ 2, b, b, r, 1]
};

beaver3a = { (* only 5 marks, but 21 shifts (maximum) *)
    instruction[ 1, b, m, r, 2],
    instruction[ 1, m, m, r, 0],
    instruction[ 2, b, m, l, 2],
    instruction[ 2, m, b, r, 3],
    instruction[ 3, b, m, l, 3],
    instruction[ 3, m, m, l, 1]
}

Null
