Tiny computer in period-1 wiring rule

For discussion of other cellular automata.
Post Reply
User avatar
_zM
Posts: 186
Joined: June 26th, 2016, 3:07 pm

Tiny computer in period-1 wiring rule

Post by _zM » December 9th, 2022, 7:29 pm

Code: Select all

@RULE Semaphore

by _zM, 2022

Period 1 circuitry rule with builtin crossovers and memory cells.

0: dead
1: Wire
2: Signal head
3: Signal tail
4: Signal body
5: OFF semaphore
6: ON semaphore

Neighbors only count if they meet one of the following criteria:
Diagonally adjacent cells:
a) with two dead neighbors
b) with two live neighbors
Orthogonally adjacent cells:
c) with two dead neighbors
d) with one live neighbor that itself has a dead neighbor
e) with two live neighbors, each with a dead neighbor

Wires can be either ON or OFF and store the state they were in in the previous generation; they can
therefore take on four CA states. Semaphores can also be both ON or OFF; they do not store history.
 If a wire is connected to at least two other wires, it acts as wire or a splitter. If all touching
wires agree in their current state, then the wire takes on that state; otherwise it takes on the
inverse of its previous state.
 If a wire is connected to only one other wire, its behavior depends on the number of connected
semaphores. If it is connected to none or one, the wire takes on the current state of its only
wire neighbor. Otherwise it acts as a gate, taking as inputs its semaphore neighbors XORed with its
previous state.
 A two-input gate is an AND gate.
 A three-input gate acts as a complex latch. This is the only place in the entire rule wihere input
configuration matters; the input opposite the output wire (B) is treated separately from the two
other inputs (A and C).
 The output also depends on the gate's current state, represented as Q:

 B   A+C   Q'
-------------
 0    0    Q
 0    1    1
 0    2    0
 1    0    0
 1    1    Q
 1    2   !Q

 If semaphores are connected only to wire cells, their state toggles whenever the XOR of the current
and past staes of all neighbors is odd; if they are connected to other semaphores their behavior is
undefined.

@TABLE

n_states: 7
neighborhood: Moore
symmetries: rotate4reflect

# All states
var a0 = {0, 1, 2, 3, 4, 5, 6}
var a1 = a0
var a2 = a0
var a3 = a0
var a4 = a0
var a5 = a0
var a6 = a0
var a7 = a0
var a8 = a0

# Live states
var w0 = {1, 2, 3, 4, 5, 6}
var w1 = w0
var w2 = w0
var w3 = w0
var w4 = w0
var w5 = w0
var w6 = w0
var w7 = w0
var w8 = w0

# Wire states
var v0 = {1, 2, 3, 4}
var v1 = v0
var v2 = v0
var v3 = v0
var v4 = v0
var v5 = v0
var v6 = v0
var v7 = v0
var v8 = v0

# Active wire
var l0 = {2, 4}
var l1 = l0
var l2 = l0
var l3 = l0
var l4 = l0
var l5 = l0
var l6 = l0
var l7 = l0
var l8 = l0

# Inactive wire
var d0 = {1, 3}
var d1 = d0
var d2 = d0
var d3 = d0
var d4 = d0
var d5 = d0
var d6 = d0
var d7 = d0
var d8 = d0

# History XORs to 1
var p0 = {2, 3}
var p1 = p0
var p2 = p0
var p3 = p0
var p4 = p0
var p5 = p0
var p6 = p0
var p7 = p0
var p8 = p0

# History XORs to 0
var n0 = {1, 4}
var n1 = n0
var n2 = n0
var n3 = n0
var n4 = n0
var n5 = n0
var n6 = n0
var n7 = n0
var n8 = n0

# Semaphore states
var c0 = {5, 6}
var c1 = c0
var c2 = c0
var c3 = c0
var c4 = c0
var c5 = c0
var c6 = c0
var c7 = c0
var c8 = c0

# 0 neighbors: keep state

# 0
#I  0  0  0  0  0  0  0  0  O

# 1 neighbor:
# wire: copy neighbor
# SEM: XOR

# 1c
#I  A  w  A  A? 0  0  0  A? O

d0, 0,d2, 0, 0, 0, 0, 0, 0, 1
d0, 0,l2, 0, 0, 0, 0, 0, 0, 2
l0, 0,d2, 0, 0, 0, 0, 0, 0, 3
l0, 0,l2, 0, 0, 0, 0, 0, 0, 4
c0, 0,n2, 0, 0, 0, 0, 0, 0,c0
 5, 0,p2, 0, 0, 0, 0, 0, 0, 6
 6, 0,p2, 0, 0, 0, 0, 0, 0, 5

d0,w1,d2,w3,a4, 0, 0, 0,a8, 1
d0,w1,l2,w3,a4, 0, 0, 0,a8, 2
l0,w1,d2,w3,a4, 0, 0, 0,a8, 3
l0,w1,l2,w3,a4, 0, 0, 0,a8, 4
c0,w1,n2,w3,a4, 0, 0, 0,a8,c0
 5,w1,p2,w3,a4, 0, 0, 0,a8, 6
 6,w1,p2,w3,a4, 0, 0, 0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 0, 5, 0,a6,v7,a8, 2
 4, 0, 5, 0, 5, 0,a6,v7,a8, 4
d0, 0,c2, 0,c4, 0,a6,v7,a8, 1
l0, 0,c2, 0,c4, 0,a6,v7,a8, 3

 1, 0, 6, 0,v4, 0,a6, 6,a8, 2
 2, 0, 6, 0,v4, 0,a6, 6,a8, 4
 3, 0, 5, 0,v4, 0,a6, 5,a8, 2
 4, 0, 5, 0,v4, 0,a6, 5,a8, 4
d0, 0,c2, 0,v4, 0,a6,c7,a8, 1
l0, 0,c2, 0,v4, 0,a6,c7,a8, 3

 1,w1, 6,w3, 6,w5, 0,v7, 0, 2
 2,w1, 6,w3, 6,w5, 0,v7, 0, 4
 3,w1, 5,w3, 5,w5, 0,v7, 0, 2
 4,w1, 5,w3, 5,w5, 0,v7, 0, 4
d0,w1,c2,w3,c4,w5, 0,v7, 0, 1
l0,w1,c2,w3,c4,w5, 0,v7, 0, 3

 1,w1, 6,w3,v4,w5, 0, 6, 0, 2
 2,w1, 6,w3,v4,w5, 0, 6, 0, 4
 3,w1, 5,w3,v4,w5, 0, 5, 0, 2
 4,w1, 5,w3,v4,w5, 0, 5, 0, 4
d0,w1,c2,w3,v4,w5, 0,c7, 0, 1
l0,w1,c2,w3,v4,w5, 0,c7, 0, 3

# 4 neighbors:
# wire:
# no sem -> splitter
# 1 sem -> splitter
# 2 sems -> splitter
# 3 sems -> E latch + T latch + ...
# 4 sems -> unused
# sem: XOR

# 3 sems:
# B A+C Q'
# 0  0  Q
# 0  1  1
# 0  2  0
# 1  0  0
# 1  1  Q
# 1  2 !Q

# E latch: Hold one of the outer inputs low
# T latch: Hold one outer and the middle input high

# 4c
#I  A  w  A  w  A  w  A  w  O

# 0 sems

d0, 0,d2, 0,d4, 0,d6, 0,d8, 1
d0, 0,l2, 0,l4, 0,l6, 0,l8, 2
l0, 0,d2, 0,d4, 0,d6, 0,d8, 3
l0, 0,l2, 0,l4, 0,l6, 0,l8, 4
 1, 0,v2, 0,v4, 0,v6, 0,v8, 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7, 0, 4
 2, 5, 0,c3, 0, 6, 0,v7, 0, 4
 2,c1, 0,c3, 0,c5, 0,v7, 0, 3
 4, 6, 0, 6, 0,c5, 0,v7, 0, 4
 4, 6, 0,c3, 0, 5, 0,v7, 0, 4
 4,c1, 0,c3, 0,c5, 0,v7, 0, 3

# 4 sems

@COLORS
0 0 0 0
1 40 40 40
2 155 195 255
3 80 90 100
4 255 255 255
5 110 100 50
6 220 200 50

Code: Select all

x = 270, y = 113, rule = Semaphore
120.28A12.28A12.28A12.28A$120.A26.A12.A26.A12.A26.A12.A26.A$120.A.8A
2.12A3.A12.A.8A2.12A3.A12.A.8A2.12A3.A12.A.8A2.12A3.A$120.A.A6.A.14A
2.A12.A.A6.A.14A2.A12.A.A6.A.14A2.A12.A.A6.A.14A2.A$120.A.A.4A2.16A.A
12.A.A.4A2.16A.A12.A.A.4A2.16A.A12.A.A.4A2.16A.A$112.A.A5.A.A.A3.A2.
6A2.6A2.A4.A.A5.A.A.A3.A2.6A2.6A2.A4.A.A5.A.A.A3.A2.6A2.6A2.A4.A.A5.A
.A.A3.A2.6A2.6A2.A$112.A.4A2.A.A.A3.A3.12A3.A4.A.4A2.A.A.A3.A3.12A3.A
4.A.4A2.A.A.A3.A3.12A3.A4.A.4A2.A.A.A3.A3.12A3.A$112.A.A.A.E.A.A.A2.
3A16.3A3.A.A.A.E.A.A.A2.3A16.3A3.A.A.A.E.A.A.A2.3A16.3A3.A.A.A.E.A.A.
A2.3A16.3A$112.3A2.E3A.A.A.5A14.5A2.3A2.E3A.A.A.5A14.5A2.3A2.E3A.A.A.
5A14.5A2.3A2.E3A.A.A.5A14.5A$113.4A.E3.A.A.5A14.5A3.4A.E3.A.A.5A14.5A
3.4A.E3.A.A.5A14.5A3.4A.E3.A.A.5A14.5A$113.2A7.A.A.5A14.5A3.2A7.A.A.
5A14.5A3.2A7.A.A.5A14.5A3.2A7.A.A.5A14.5A$112.A.4A4.A.A.5A14.5A2.A.4A
4.A.A.5A14.5A2.A.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AE.2A.
A.BE.2A.A.AE.2A.A.AF.2D.A.AE.2A.A.BE.2A.A.AE.2A.A.AF.2D.A.AF.DB.C$11.
A.D3.A.A.A3.A.A.A3.A.A.A3.A.A.D3.A.A.A3.A.A.A3.A.A.A3.A.A.D3.A.A.D3.A
$12.F.FA.A2.E.FC.B2.E.FC.B2.E.FC.B2.F.FA.A2.E.FC.B2.E.FC.B2.E.EA.A2.F
.FA.A2.F.FA.A$12.A3.3A.A3.ACB.A3.ACB.A3.ACB.A3.3A.A3.ACB.A3.ACB.A3.3A
.A3.3A.A3.3A$12.3A.A.A.BAC.A.A.BAC.A.A.3A.A.A.B2A.A.A.BAC.A.A.B2A.A.A
.3A.A.A.3A.A.A.B2A.A.A$12.B.A.A.A.D.D.3A.D.D.3A.A.C.A.A.D.A.A.A.D.B.
3A.D.A.3A.A.A.A.A.A.A.A.C.C.A.ABC$12.D.A.A.A.DCB5.DCB5.A.D.A.A.C.A.A.
A.DCA5.2DC5.A.A.A.A.B.A.A.B.BCA$12.D.A.A.A17.A.B.A.A.A.A.A.A17.A.C.A.
A.D.A.A.A$12.C.A.A.A17.A.C.A.A.A.A.A.A17.A.D.A.A.D.A.A.A$12.B.A.BCA
17.A.D.3A.B.A.BCA17.A.B.ABC.D.A.3A$12.C2A21.2AB5.C2A21.3A5.C2A!
This is a circuitry rule and a 16-bit toy computer I built in it over the last two weeks.

Semaphore is a 7-state rotate4reflect Moore rule designed for compact period-1 circuitry. To allow one bit of information to be transmitted every generation the rule uses four wire states; the other two "semaphore" states are used for gate inputs and, due to the way they are implemented, can double as inverters, XOR or XNOR gates. Wires with multiple connected semaphore cells and only one wire output act as gates: the 2-input gate is either AND, ANDNOT or NOR, depending on input polarity, while the 3-input gate can be used to implement a variety of memory cells. As only some neighboring non-empty cells are considered to be connected, depending on their shared neighbors, crossovers are essentially free and can even be used to save space in some cases. Below is a collection of gates and other basic circuitry elements:

Code: Select all

x = 97, y = 104, rule = Semaphore
94.3E$95.E$95.E$17A10.5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.E.E.3E.2E$78.E.E.E.E.E.E.E3.E.E$
17A61.E.E2.E3.E2.3E.E.E$A15.A$4AC4DBCB2ACB2A9.5FE2F2EF$18.E$19.2DE18A
$18.E3.F$6ACDB2ACB5A21.E2.2E$A15.A21.E.E.E.E$17A21.E.E.2E$38.E.E.E.E$
39.E2.E.E2$17A$A15.A$4AC4DBCB2ACB2A9.2F2EFE2F2EF$18.A$19.E20A$18.A.F$
6ACDB2ACB5A16.E.E2.E2.2E$A15.A17.E.E.E.E.E.E$17A18.E2.E.E.2E$34.E.E.E
.E.E.E$34.E.E2.E2.E.E2$17A$A15.A$4AC4DBCB2ACB2A9.2E2FEF2E2FE$18.A$19.
E20D$18.A.E$6ACDB2ACB5A11.E.E.E2.E2.E2.2E$A15.A12.E.E.2E.E.E.E.E.E$
17A13.E2.E.2E.E.E.2E$29.E.E.E2.E.E.E.E.E$29.E.E.E2.E2.E2.E.E2$17A$A
15.A2.2AF.E$6ACBCBCDBCB4A3.A4.3E2F2EFE2F$19.2AE.2A$19.2A3.E15A$9AC3DB
5A2.E2A.F$A15.A2.2A.F4.E2.2E2.2E2.3E.2E$17A9.E.E.E.E.E.E.E3.E.E$26.3E
.E.E.E.E.3E.2E$26.E.E.E.E.E.E.E3.E.E$26.E.E.2E2.2E2.3E.E.E4$ACBAC2DBC
BACDBCB3AE$20.A5.4F.F.F2.2F.F$18.AE.A$7AC7DB2A4.E19A$18.AF.A.F$20.A$A
C3DBCDBCB2ACDB3AE!
S1K is an OISC, implementing Subleq; its memory includes 32 16-bit words of general-purpose RAM and 32 words of program ROM stored in eight p128 loops holding 128 bits each. Due to the way the memory unit works, words aren't stored in a clean continuous order in memory; in fact, each word is split up between two loops. Accessing the lower 32 words takes a single cycle of 128 generations, while the upper 32 words take up to 192 generations to read, blocking the memory unit for two cycles. Each instruction is 16 bits in size, split up into two 5-bit data addresses and one 6-bit jump address. Output is possible via a set of four seven-segment displays, displaying the value at address 0 in base 16. Excluding the display the entire computer fits into an area of 91x94 cells. The computer's name is a reference both to the amount of memory it has (measured in bits) and the number of generations per instruction: 1024.

The computer uses a synchronous design with a main clock controlling most components, which has the negative side effect of needing a lot of additional timing wires crossing over data wires and, in some very tight places, even through components. Combined with my general tendency to want to make things as small as possible, the result is a complete mess, only made worse by the ad hoc adjustments made at the last minute after noticing several design flaws (c.f. the freestanding storage loop on the right). I'm still relatively happy with it, though.

The computer above is running a program that calculates the Fibonacci numbers at a speed of one every seven instructions. I have written a script to write code and data into memory, though it isn't ready for release yet (right now I have to modify its source for input and copy the resulting memory bank over into Golly; optimally it'd just be a Golly script reading from a file). Also it's late, I'm tired and this probably isn't written very well bye
moment

User avatar
pipsqueek
Posts: 265
Joined: September 10th, 2022, 4:42 pm

Re: Tiny computer in period-1 wiring rule

Post by pipsqueek » December 9th, 2022, 8:51 pm

Impressive! I like when people create their own wiring rules and implement computers, but what program is this computer running? Is it computing prime numbers in hexadecimal or something?

Code: Select all

x=17,y=16,rule=B3/S23
3bo3bobo2bob2o$bobo4bo4b4o$bobo5bobo2b3o$b2obob2o3b2o$3o4b2ob2o2b2o$4b
o4bo$4b2obobob2ob3o$3ob3o2b2o$b3o2bobobo5bo$o3b2o3bobo2b2o$4bo3bob2o3b
o$2obo2bobobo2b2o$3b3o5bo2b2o$2obo4bo2bob2o$o3bob2obo3b2o$2bo8bobobo![[ STOP 3 GPS 4 ]]

w33z8kqrqk8zzzw33
Posts: 34
Joined: August 11th, 2022, 1:33 am

Re: Tiny computer in period-1 wiring rule

Post by w33z8kqrqk8zzzw33 » December 9th, 2022, 8:53 pm

_zM wrote:
December 9th, 2022, 7:29 pm
The computer above is running a program that calculates the Fibonacci numbers at a speed of one every seven instructions. I have written a script to write code and data into memory, though it isn't ready for release yet (right now I have to modify its source for input and copy the resulting memory bank over into Golly; optimally it'd just be a Golly script reading from a file). Also it's late, I'm tired and this probably isn't written very well bye
pipsqueek wrote:
December 9th, 2022, 8:51 pm
Impressive! I like when people create their own wiring rules and implement computers, but what program is this computer running? Is it computing prime numbers in hexadecimal or something?
Please at least try to read the original post.

User avatar
Pavgran
Posts: 220
Joined: June 12th, 2019, 12:14 pm

Re: Tiny computer in period-1 wiring rule

Post by Pavgran » December 13th, 2022, 8:13 am

I've added the rule to the wiki, so now LifeViewer works for these patterns.

User avatar
blah
Posts: 311
Joined: April 9th, 2016, 7:22 pm

Re: Tiny computer in period-1 wiring rule

Post by blah » December 13th, 2022, 10:52 am

Added to the list. It's the smallest CPU there, taking the 298*248 Pulse2 CPU's place, although since it's an OISC the density is not directly comparable. I'm particularly impressed with what I assume are decoder units that convert a 4 bit value to 7 bits that are fed into the display. Did you start with a lookup table and then optimise it down into a special-purpose circuit?

And if you don't mind, could you describe in more detail how the CPU works, or at least give an overview of where the different components within it are?
succ

User avatar
_zM
Posts: 186
Joined: June 26th, 2016, 3:07 pm

Re: Tiny computer in period-1 wiring rule

Post by _zM » December 15th, 2022, 9:54 am

blah wrote:
December 13th, 2022, 10:52 am
Added to the list.
Thanks! I'm planning to write an overview of how the CPU works once I'm in the headspace for it, but one note on the displays and I'm sorry to disappoint you:
I'm particularly impressed with what I assume are decoder units that convert a 4 bit value to 7 bits that are fed into the display. Did you start with a lookup table and then optimise it down into a special-purpose circuit?
They actually do use a lookup table. The large loop at the bottom left contains the bitstring representation of all hex digits; the additional circuitry next to each display is only there to read out and store the correct one.

Edit:
And if you don't mind, could you describe in more detail how the CPU works, or at least give an overview of where the different components within it are?
The clock is a binary counter, counting up 6-bit values at p16 giving it a total period of 1024. These then get sent to the controllers (C1-C12), which each compare the received value to the one they store and send out a pulse (of varying length; C4 sends a single pulse, C1, C3, C7 and C8 send for 8 generations, the rest for 16) if the values match. C1, C11 and C12 all activate at p128, so there are extra filter loops on the clock wires leading up to them leaving only three bits. The memory controller also receives a three-bit clock signal.
The memory controller itself takes a six-bit value and splits it into its upper and lower three bits. Both are then stored in their own loop; the upper three bits are compared with the incoming p16 clock signal on the left, while the lower three are compared with the output of a p8 clock on the right. This results in one 16-generation pulse and two 8-generation pulses being sent along two different wires into the memory unit every 128 generations, which then travel in opposite directions, meet at two of the memory loops for 8 generations each and read out 16 bits, which are then stored in the loop to the right of the memory unit (marked in yellow). This loop is cleared out by C12 every 128 generations.
C1 and C11 clear out the memory unit's address storage loops also at p128, with one exception: because the 16-generation signal has to cover a longer distance before reaching the memory loops, a read address of 32 or higher might result in it reaching the memory loops only after the current cycle has already ended, the read address registers zeroed and in the signal meeting a mistimed 8-generation signal. As the only time that addresses greater than 32 can be read is on the instruction read cycle, C10 is used to delete the clear signal sent by C11 on the cycle after that.

The value read is then sent along to the instruction decoder and the storage units for the subtractor; all three of these only read the value sent if C9 (ID), C5 (A) or C6 (B) are active respectively. The instruction decoder simply its input into the the lower five (address of A), middle five (address of B) and upper six (jump address) bits. The address of A gets sent directly back to the memory controller, arriving there 256 generations after the instruction read address. B and C are each stored for later; B gets sent into the memory controller after 384 and 768 generations (C8 and C7) while C is sent to the IP register continuously. C9 also clears these two loops.

SUB is a simple 16-bit serial subtractor. LEQ checks if its output is 0 or negative. The output of the subtractor is also XORed with the value in B and then later (controlled by C2) read into yet another storage loop to be XOR-written later (using a mechanism very similar to the read). C3 and C4 control the IP register; if LEQ outputs false the pulse from C4 increments the IP, otherwise C3 causes it to be overwritten with the value stored in C. C3 also reads the new value of the IP and sends it into the memory controller, at which point the cycle repeats.

Each instruction takes 1024 generations to execute; within that time the memory unit cycles eight times. The first and second are used to read the instruction, the third and fourth to read the two values from memory and the seventh to write the new value of B. This leaves three unused cycles, in which the memory unit reads the value of address 0 by default. The display unit takes advantage of this and reads the value in the fifth cycle, which is guaranteed to be the value in address 0. The display unit has its own clocks, one sending out a 4-generation pulse every 1024 generations causing each individual seven-segment display to update its stored hex digit, the other sending out 4-bit values at p8 used by the displays to time reads from the loop storing bitstring representations of each digit.
Attachments
s1k_labeled_2.png
s1k_labeled_2.png (142.51 KiB) Viewed 1082 times
moment

User avatar
_zM
Posts: 186
Joined: June 26th, 2016, 3:07 pm

Re: Tiny computer in period-1 wiring rule

Post by _zM » August 31st, 2023, 2:52 pm

Reviving the thread to mention that I've built a second computer, called LEAST. 8-bit this time, same amount of storage as before (128 bytes, all general purpose), plus an accumulator, but with input: there are four buttons which you can press by placing a state 2 cell on them. The system uses a set of two instructions (jump if less than zero and subtract accumulator from value in memory, storing back in both locations) inspired directly by the variant of Subleq used by Yoel's Izhora computers. The entire thing, including IO, is 98*62 cells in size.
To showcase what it's capable of (and, to be honest, it isn't capable of any more, even this fills up basically all of the system's memory) here's an interactive primality checker. Enter a number between 2 and 127 in binary using the 0 and 1 buttons, then press A. If the number is prime the display will light up completely, otherwise it displays the number's smallest prime factor; the system will then accept another input. I suggest running in Golly at 2^10 or higher to avoid flashing from the p1024 memory loop, LifeViewer technically works but it's way too slow.

Code: Select all

x = 98, y = 62, rule = Semaphore
B4DC9ABCB3DC7AB2DCB4DCAB5DCA7.5ABC3A2.BC6ABC2.3ABC5A2.5A$C46.A4.3A9.
3A9.3A9.2AC2.A.A$BC4DBAC5DB2AC3DBC15DB7A.B2.2A.C35ABA2.ACB$45.A.D.A.E
.F9.E.E9.E.E9.E.E$6DCB11DCBDCB3DC7AB2DCB3DC2A.D.A2.A2.6A3.A2.6A3.A2.
6A3.A2.6A$B46.D.A2.A.8A2.A.8A2.A.8A2.A.8A$C7DBCB4ACBACB7AC3DBC2DB7AC
2D.D.A2.E.A2.5A2.E.A2.5A2.E.A2.5A2.E.A2.5A$45.D.C.A.F10A.F10A.F10A.F
10A$ABCAB15DCB2DCB2DCB6DCB6DCB.B.A2.F.8A2.F.8A2.F.8A2.F.8A$A46.D.A4.
8A4.8A4.8A4.8A$5AC4DB10AC3DBC7DB2AC5DBCD.D.A.11A.11A.11A.11A$45.D.D.A
.11A.11A.11A.11A$7AB2DCB3DCBCBDCBCABDCB11DC3AB2D.D.A2.9A3.9A3.9A3.9A$
C46.D.A$4DBC14DBCB6ACDBACBC7DBCD.D.A2.9A3.9A3.9A3.9A$45.D.C.A.11A.11A
.11A.11A$13D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AE2.EA.2A3.A.E.BC2.AFA.5A3.AFA.5A3.AFA.5A3.AFA.5A$2.E
AF5.4A2.3A.AEA.A.A.3A2.2A.F3.3A6.A.A.E9.A.E9.A.E9.A.E$3.F.C4.E3.A.A.A
.A3.E.A.A2.AE11.6A2.A2.6A3.A2.6A3.A2.6A3.A2.6A$2.A.CA.E.ECD3.2A2.2A2.
A2.A.A5.2DC7.A6.A.8A2.A.8A2.A.8A2.A.8A$.A4.A2.D.D.5A4.A3.3A2.F.B3.2A
5.BCAB2D.10AE.10AE.10AE.10AE$.4AE.E2DCE2A2.A.E.3A9.AFBC.EBCA8.C.8A.E
2.8A.E2.8A.E2.8A.E$.A.B3.D2.E6.F3A6.3A.A.CD.A3.BAC.BACB2A.8A4.8A4.8A
4.8A$.2AC3.C6.ABC.E8.A.A2.F.DF.E.D2.B.D6.7A2.E2.7A2.E2.7A2.E2.7A2.2E$
7.A6.A.A10.BCACEAC4.2DCA2.DCBDC2.7A.E.E.7A.2E2.7A.E.E.7A.E$7.A6.ADA
16.D14.B2.7A.E.E.7A2.E2.7A.3E.7A.E$7.BCAB2DCBACBCBC3ABCABDCBCBDBCBCDB
ACB3ACBC3.6A2.E3.6A.3E2.6A.E.E2.6A2.2E!
If there's interest I can go into more detail on how the computer works and how to program for it (I know Redstoneboi is also working on an emulator), but I'll probably move on pretty soon and (hopefully) start building something slightly bigger.
moment

twinb7
Posts: 190
Joined: February 11th, 2014, 8:08 pm
Location: Ames, Iowa

Re: Tiny computer in period-1 wiring rule

Post by twinb7 » December 12th, 2023, 12:32 am

Not sure I can get your smaller computer to work as expected, can you elaborate on the input method and which part is the display?

EDIT: Never mind. All eight bits must be entered, including leading zeroes.

Post Reply