Simple 1-bit Light Computer (binary only)

Real 1-bit Computer running a simple 8-bit program (01011100). The steadily blinking light on the right is the clock that drives the computer. The light on the left is the output of the computer. It gives a short blink followed by a longer blink. This simple program (short blink followed by a longer blink) can be seen in the first 8 bits of the blue switch bank on the left. The first switch is off, the 2nd switch is on, the 3rd is off, the 4th, 5th, and 6th are all on, and the 7th and 8th are both off. That’s the pattern 01011100. That pattern gives a short “on” pulse of 1 unit (switch 2) followed by a longer pulse of 3 units (switches 4, 5, and 6). As a result, the light gives a quick flash followed by a longer flash. This repeats again and again in the video.

This is about the simplest possible computer and the simplest possible computer simulation. This computer only understands 2 instructions: ON and OFF. If the next instruction is “ON“, then it will turn the light on. If the next instruction is “OFF“, then it will turn the light off. This computer is so simple that it’s easy to write programs in binary with 1‘s and 0‘s. Here’s what the simulation looks like running a 16-instruction program:

Simulated 1-bit computer following a series of on/off instructions. This “computer” is programmed with the instructions 0100101011010010 as shown in the “Binary Code” block in the upper left. These instructions have been copied into Memory (with the “Load Program” button) at the addresses 00 through 0F (the Memory block shows the address on the left and the instruction itself on the right). The job of this computer – and every computer – is to step through each instruction and carry out each instruction one by one. In this simple computer, each instruction will tell the computer to turn the light on or off. The computer just follows the instructions. The Program Counter is shown as “P” in the upper right (with red background). The program counter simply counts up from zero, and at each count the computer will execute the instruction in Memory at that count number. The next instruction to be executed is shown in red by the simulation. The instructions actually control the “Q” signal which is part of the CPU (Central Processing Unit). The “Q” signal is “wired” to the Red Light Emitting Diode (LED) which turns on and off. Technically, a physical LED would not be part of a modern CPU, but it fits there logically in this simulation.

You can run this program using this link: One Bit Binary Computer

You can also download this simple simulation below. It will be a “ZIP” file which can be unpacked with most operating systems. The unpacked file will be named Simple_1Bit_Light_Binary_Only.html. If you double click on that file it should open the simulation in your web browser.

To run the simulation, enter a short program in the “Binary Code” box on the left. Try the pattern 01011100 which will give a short blink followed by a longer blink (as shown in the real hardware video at the top of this page). After you type in the program, click the “Load Program” button to copy the program into Memory (the box in the middle). Then click the “Run/Stop” button (upper right) to make the computer actually run the program from Memory. It should look similar to the simulation above (depending on your program). You can speed it up by changing the number of instructions per second using the selection button below the blinking light. Try using 4 instructions/sec to approximate the speed of the hardware video. Try out other patterns like the one in the simulation above (0100101011010010). Make a “strobe light” with a program like 000000010000000. Experiment with running at different speeds. You can stop and restart the program with the “Run/Stop” button, and you can use the “Step” button to step through each instruction when the computer is stopped.

Play with it. It’s all software, so you can’t hurt anything!