Counter Computing

This guide aims to explain how to recreate addition, subtraction, multiplication, and division systems using counters.

Counter Addition Version 2.0

Concept

Have system A in which counters 1 and 2 exist. System A will contain no block code and will find a way to add the value of counter 1 and counter 2 and store the result in counter 1. Note: counter 2’s value will be lost after the computation is computed unless counter-copying is used.

Practice

Have counter A and counter B exist within system N. Counter B should have a target of 0 and counter A should increase on channel “add”. Counter B will decrease on channel “add” and when target is reached broadcast on channel “end add”. Add a trigger, this trigger will be recursive in that it broadcasts on channel “add” when it is triggered and it triggers on channel “add”. This trigger should be deactivated on channel “end add”. Set the values of counter A and B to whatever you wish, or allow users to do so using some custom-made input system.

Finish

Counter Subtraction

Concept

Have system S in which two counters exist. Find some in-game mechanism that doesn’t include blocks and that can perform a subtraction on counter A using counter B. Note: result will be stored in counter A unless you use a counter-copying mechanism or a counter-swapping mechanism. The value of counter B will be lost unless a counter-copying computation is performed before the subtraction operation.

Practice

This is identical to counter addition V2, but instead of counter A being incremented on channel “add”, it should be decremented on channel “add”.
Suggestion:
Change channel names to avoid confusion or system interference.

Finish

Counter Multiplication

For a block-code based computation, this system would usually take up 540g’s+, but this alternative consumes only 310g’s(its consumption would increase to about 330g’s if you wanted the properties to all maintain their values even after the computation).

Concept

Have some system M that contains…5 counters and…5 triggers(yay, both are equal). It will also need 2 wires and one wire repeater. System M will have two counters, A and B, that will be multiplied, and the result will be in counter A. Note: counter B will not lose its original value(wooo), but counter A will(this value will be stored, so you can always swap it or copy it back).

Practice

  1. Place down two counters(call them A and B). Counters A and B should both have equal default values as they correspond to the x part in the following equation: xy = z, where x is the first factor, y is the second, and z is the product. Counter A will increase on channel “add a”, while counter B will increase on channel “dec c b” and decrease on channel “dec c a”. Counter A and B will have targets of 0, but A will transmit on “deactivate a” while B will transmit on “deactivate - 1”.

  2. Add trigger 1 and counter C. Trigger 1 will transmit on “start multiplication” when triggered and C will transmit on “off trigger mul” when target of 0 is reached. Have C be the y part of xy = z, and let it decrease on channel “start multiplication”. Trigger 1 will deactivate on “off trigger mul”.

  3. Add a wire from 1 to a wire(when triggered) repeater(delay = 0.1) and from the wire(trigger) repeater to trigger 2. Have trigger 2 activate on “start multiplication” and deactivate on “deactivate - 1”. Have trigger 2 transmit on “dec c a” when triggered and trigger on “dec c a”.

  4. Add counter D and trigger 3. Counter D has settings of target=0, increment=”dec c a”, decrement=”dec c b”, and target reached=”deactivate - 2”. 3 will trigger on “dec c b” and “deactivate - 1”, and it will transmit on “dec c b” and deactivate on “deactivate - 2”. It should activate on “start multiplication”.

  5. Counter E will increment on “dec c a” and decrement on “add a”. It will have target=0 and transmit when target is reached on “deactivate - adder”. Trigger 4 will trigger on “add a” and “deactivate - 2”, it will transmit on “add a” when triggered, and activate on “deactivate - 2”, but deactivate on “deactivate - adder”.

Finish

More to come…

12 Likes

There’s actually a much simpler way to do the multiplication operation by using only 3 counters and 3 triggers. Unfortunately, it requires a delay for the larger numbers because of the channel limit for counters being 300.

How long of a delay are we talking?

Also, @VALUEX , are these systems able to build on top of each other? Meaning if I wanted to add three different numbers could I just copy and paste one more counter?

Nice. What is your setup?

0.015s is the usual delay for a loop that exceeds 300 per second.

1 Like

I’m not entirely sure there’s a more efficient way other than just repeating the system over and over and linking it with your current system.

1 Like