This tutorial is written for an earlier version; the interface has changed considerably since then. But the idea is still the same.

1. D flip-flop

In electronics, a flip-flop or latch is a circuit that has two stable states and can be used to store state information. Flip-flops and latches are fundamental building blocks of digital electronic systems used in computers, communications, and many other types of systems Wiki.

This example uses a short delay line to create signal edge detection a technique widely used in embedded software, model-based development and electronics.

We will make this board as a reusable package to build a more complex circuit.

Here is the exported file. Save and open with the LogicalArt or try build one by yourself in the AppClip.

2. Package and reusing your circuit

Here is the exported file. Save and open with the LogicalArt.

3. Memory

A time-lapse about how to build a 32-bit memory in LogicalArt on YouTube.

In LogicalArt you can make a circuit by tapping to write every input and output combination. In hardware, EEPROM is an electronic device that can be erased and reprogrammed.

Here is the exported file. Save and open with the LogicalArt.

4. Program counter

To execute the instruction by order, we need count, set and reset the location(address).Link

We use theJK flip flopwhich prevents the illegal or invalid output condition that can occur on SR flip Flop.

JK flip flop

Here is the exported file.

----

This is how to link the JK flip to make it not only count but can start from any setting address.

Program counter

Here is the exported file.

5. ALU

Build a full adder on Mac.

Two's complement is the most common method of representing signed integers on computers. Below demonstrated how to build 1-bit adder by using logic gate.

The Mac version LogicalArt has the same features on iPad and take the advantage of keyboard, mouse wheel and big screen on computer. Here are some shortcut:

Zoom : + (=/- or ScrollWheel);
Show/hide panels: +f;
Delete(when selected):;
Undo: +z;

New board:+n;
Open:+o;
Export:+s;
Info:+i;

----

Below demonstrated how to assemble 1-bit adders to an ALU. The Input-17 is a subtraction indicator. The Output-64 is a flag.

ALU

Here is the exported file.

6. Assemble the component

Below are some additional chips that will use to assemble the computer.

The link will be used to link the module to the bridge.
Bridge the system bridge (modules communicate with each other by that).
Edge Detection will output 1 when detecting the rising edge of the clock.
Zero Flag will output 1 when input is 8-bit zero.

Additional Chips

Link / Bridge / Edge Detection / Zero Flag

----

Now we can assemble the chips together and link them to the bridge and build a controller with an instruction set.

Three component

Program Count / Memory / ALU

----

In the instruction controller, I hardwire the fetch steps and create the instruction decoder with EEPROM.

Instraction controller

Below are instruction codes I will use which come from Ben Eater's video -Conditional jump instructions.

InstructionStepCFZFHLTMIRIROIOIIAIAOEOSUBIOICECOJFI
FetchXXXX000XX0100000000000100
XXXX001XX0001010000001000
LDA0001010XX0100100000000000
0001011XX0001001000000000
0001100XX0000000000000000
ADD0010010XX0100100000000000
0010011XX0001000000100000
0010100XX0000001010000001
SUB0011010XX0100100000000000
0011011XX0001000000100000
0011100XX0000001011000001
STA0100010XX0100100000000000
0100011XX0010000100000000
0100100XX0000000000000000
LDI0101010XX0000101000000000
0101011XX0000000000000000
JMP0110010XX0000100000000010
0110011XX0000000000000000
JC01110100X0000000000000000
01110101X0000100000000010
0111011XX0000000000000000
JZ1000010X00000000000000000
1000010X10000100000000010
1000011XX0000000000000000
OUT1110010XX0000000100010000
1110011XX0000000000000000

Now Here is my frist verion 8-bit computer in LogicalArt.