GitQuest Days 12 & 13: Addition, Subtraction, Multiplication

Today I completed addition and subtraction. I also included a multiplication function. All combinations of positives, negatives, and zero are supported. Leading zeros are removed, and there is no such thing as negative zero. The multiplication algorithm is pretty naive and what one would learn in grade school. I didn’t think the integers would be big enough to require more sophisticated algorithms. They are big-enough integers. Maybe at a later time.

Next up, division and modulus. Check it out.

GitQuest Day 8: Wireworld

Wireworld is another neat kind of cellular automaton, invented in 1987 by Brian Silverman. It simulates circuitry; by implementing a series of logic gates, you can create a rudimentary computer. This makes the system Turing-complete.

Click on the grid squares to set their values: gold for wire, blue for the head of an electron, red for its tail, or black for empty. Use it to construct a variety of circuits.

Find it here.

GitQuest Day 7: Elementary Cellular Automata

Today is a visualizer of elementary cellular automata, in JavaScript. These fascinating things produce intricate and complex structures out of incredibly simple rules. Just type in a number from 0 to 255, called the Wolfram code for Stephen Wolfram. One, rule 110, has been proven to be Turing complete - it can compute any algorithm that any general-purpose computer can.

Check it out.

GitQuest Day 6: Core War

A belated entry for Day 6, this is an HTML5 version of the game Core War. Two players try to take control of a computer by programming warrior bots in a special language called Redcode. Many of the major instructions have been implemented here, including DAT, MOV, ADD, and JMP. Instruction modes are direct, indirect, and immediate. When the machine runs, you can see the bots chase each other throughout the computer’s memory.

Grab the code here.