Making a computer in DSP: ALU and Register files

Turn on subtitles for explanation.

ALU (Arithmetic Logic Unit) and Register files are the basic components of a CPU. This is my attempt at making a working CPU within DSP using splitters and traffic monitors.

youtu.be
u/DoubleUTeeitch — 24 days ago

8-bit full adder is done

I made this post yesterday and I have been trying to optimize this adder. Eventually I came up with this design which only uses 6 splitters for a single full adder. So I stack this up 8 times and made this 8-bit ripple-carry adder. In this video, I add 42 (101010, blue) and 27 (11011, red), which produces 69 (1000101, green).

Blueprint

Edit: For those who are interested in the logic gate, here is the diagram. The major breakthrough is when I realize if a splitter with 2 inputs and 2 outputs has one of the output prioritized, the prioritized output is an OR gate and the other output is an AND gate. So you can have both gates in just one splitter. Therefore I came up with a design that utilize this dual-gate property.

u/DoubleUTeeitch — 1 month ago

I made a full adder in game

Edit: New design here

For those who don't know what a full adder is, it adds 3 bits (Input 1 [blue], Input 2 [red], Carry in [yellow]) together, producing a 2-bit binary number (Carry out [purple], Sum [green]).

The first one uses sandbox-mode traffic monitor to produce / consume the items. The second one doesn't use sandbox tools, but is way more complicated. The holo beacons use IP to connect to input/output traffic monitors.

This adder mainly consists of two XNOR gates. The sum is "A XNOR B XNOR Cin", and Cout is "(A OR B) AND ((A XNOR B) OR Cin)". The XNOR gate itself is "((A NOR B) OR A) AND ((A NOR B) OR B)".

Blueprint (sandbox version): Dyson Sphere Blueprints - Full bit adder

u/DoubleUTeeitch — 1 month ago

This is designed for my Skyblock world, and since I don't have redstone and iron (for buckets) yet, I can't make the traditional flushing mob farm. So I made this farm out of wood and water only. In the video, I showcase my farm with 4 layers. More layers can be added but the mob cap is already reached at this Y level (-33 at the lowest level).

You may notice the walls are made out of stairs instead of planks. This is because mobs only wander towards full blocks, so mobs will not try to walk towards the wall. This also prevents spiders from climbing the walls (they can climb stairs, but they don't have any reason to).

There's also a ring of planks around the drop chute. This is to prevent baby zombies from staying in a corner forever, so that they will eventually decide to wander towards these planks. The downside is that spiders will now try to climb these planks. But since there aren't any walls for them to reach these planks, the chance of a spider stuck on the ceiling is very low. In my testing, thousands of mobs would have been killed before one spider manage to get stuck on the ceiling. Still figuring out an alternative way to deal with baby zombies.

I learnt about boat clock from potato_noir in this video.

World Download (version 1)

Edit: If you want to build this, make sure you don't build it in slime chunk below Y=40.

Edit 2: I built it in the desert mainly because I want to test how spiders affect the farm. You should not do so unless you want more creepers / spiders / witches.

Edit 3: Updated version 2. Use a ceiling to block skylight instead of a wall to save resources. Also partially solved the issue of spider camping on the ceiling by only having planks above and below the farm (they still try to climb but at least they can be flushed now). Also update the boat clock to slightly increase the flushing duration. World Download

u/DoubleUTeeitch — 1 month ago