Turing Tumble Community

1-Bit CPU on a Normal Board

Hi! This is my first topic, but I wanted to say that I have made a 1-Bit CPU that fits onto a normal sized board! I personally don’t have enough gears to build it on my own, but I have made it online here
This took me a few hours to make, but it works, with a few small bugs (that hopefully some people could help me fix, though I don’t know if that’s possible.)
I know this isn’t the first CPU made in TT, but I’m pretty sure it’s the first one that fits on a board.
A diagram helps show what each part is:
Explain
Here’s some explanation
This shows that this is a 1-bit CPU with two bits of RAM.
The PC helper makes it so the program stops at the third instruction (non-existent), unless you use the reset instruction.
The ROM uses ramps for whatever instruction you want to run.
The RAM starts at 0 for whenever you use it
The PC just says if it’s reading the first or second instruction
The Read/Run helps with the red balls getting back over to the blue part
The instruction flip-flop sets itself to the current instruction

To make a program, you need to set up the ramps and crosses at the right place, the first bit at 1, and the second bit at 2.
The bottom instruction is INC, or increment the RAM by one, while the top instruction is RST, or reset. This is basically a jump instruction, and makes it so it will run the first instruction again.

This instruction set allows you to run 4 (3) programs.
The first two add one to the RAM forever (One resetting on the first instruction, the other resetting on the second)
The nex is a program that intercepts a red ball (This is the bug. If you reset twice, it will intercept a red ball)
The last one adds two to RAM and intercepts a blue ball (successful)

Currently the ROM is the first program, adding one to the RAM and resetting the PC helper. This leads to another bug: overflows.
Whenever the RAM overflows, it will release another red ball resetting it to 1, and not 0.

This is about it, and I hope you enjoy messing around with it! Maybe try to change the instruction set (completely possible), and be sure to possibly be seeing more of me soon :wink:

2 Likes

Great!
I did “debug” based on it.
Turing Tumble Simulator
cpu1-2

“Reading / running” was removed because it did not work well.
Added support for RAM overflow.

Writing the action in a virtual language is as follows.

loop:
if Pc_h then end
Pc_h = TRUE
call 1b // Ram++
call 2a // Pc_h = not Pc_h
goto loop

“1b-2a” in the initial state, that is, the ram keeps increasing
If “1b-2b”, the ram increases to 2 and stops
“1a-2a” stop
“1a-2b” continues to increase, too

Thank you very much! I’ve actually made a larger version, but I’m trying to remove a bug in it. You can see it at https://www.lodev.org/jstumble/?board=1a11agrxxra1rxlagagarria1exrlglleagaga1eraaleerllfrlee0_99_99! It has 3 different places of ROM and RAM, though it still only has the two instructions. It has a bug with trying to reset the loop more than once, and an overflow-like bug, but it still works well enough. If there were only one more spot at the end I could add a NOP instruction, but this will have to do for now :slight_smile:

You can also check it out at https://jessecrossen.github.io/ttsim/#s=13,17&z=32&cc=6&cr=8&t=3&sp=1&sc=0&b=data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA0AAAASCAYAAACAa1QyAAABNUlEQVQ4T3WTMU7FMAyGfy/Mb2RMzsABWhUO0qrco3kHqZTeA6qMTIgbJBILE+IEL8hpXaokWKrcuv7y25ZDzrlb3/fgx1qLtm3hnINYHjfGgATiJO8DtFYHIC/zHDCOW7wCeaJ1Rew6aK2j956uBEwR6buAOEEA8QkAgSIQERN4KDVNQ5Ajd0+glChhOWhZlph6apuWOEEyaCXEbgdAuCImRfbK7hArycniZQj/KqXy2LLSkuIjQK9IyvxtP+1W3gEJl5XE0yt6Eihv/q+0rUe2YxBnpaO3fRgyFOmxCvHPHDyvSIKMMbd8b6ZpIp4MFzQMw1bXyUgpVUA+eGilMYcZoxqLXSyg81YX2UC6DVUlAWsQX58qxMkM1ozvGwExPqsHvF++cffzhK/LC+4/At6qyBb8Bbq867A88eEBAAAAAElFTkSuQmCC

how do you program it?

We program it by reconfiguring the components in the top left corner.
code

1 Like
2024