Bitwise operations in gimkit

Yes this is using gimkit’s blocks.
We’re trying to find a way to do a bitwise AND operation without using any loops in the calculation.

Seeing which 1’s match in 2 binary numbers while being efficient (as far as I’m understanding this)

If we have a way to segment them and evaluate parts of the number, there must be a way to evaluate it as a whole. It’s either recursion with digit-by-digit or the whole thing ig, and blackhole said he didn’t want recursion.

Yeah I know and understand. I also got my explanation from bh, so I just don’t want to spend another 100 posts explaining it when we can compile all those posts.

What about instead of no loops, we have two or more sperate commands in the block that run at the same time, making the math take less time?

Yeah that’s what I’m stating lol. Multiprocessing. It wouldn’t take much memory or time to split the number than handle several parts of it at once with recursion.

1 Like

I was thinking of that too, and maybe, if you can tell us what you are making, then we might be able to find another soulution :grin:

1 Like

From what I understand, what bh is trying to do is use the binary form of two numbers and compare their digits; if both of their digits are 1, the resulting digit in the same location is 1, otherwise it is a zero, doing this for every digit, resulting in a new number.

Is this correct?

If it is, wouldn’t you have to use recursion anyways to convert to binary?

1 Like

Yeah, multiprocessing seems like a good idea. At the moment, it’s probably the best solution that’s been come up with so far.

2 Likes

Yeah- run a bitwise AND operation on two numbers.

2 Likes

Well… technically another solution already exists, and it’s using text operations. When text operations got added, I actually implemented the system that this question asked for help with the making of, so all that remains really is the question, there isn’t any project behind it or shortcuts that could be taken anymore.

2 Likes

Couldn’t we do this with checkers? Or would that also take too much time? wait no nevermind

2 Likes

That’s like trying to construct this with counters…

1 Like

True. Pretty sure even without text operations you could replicate the same effect though. Just some math.

2 Likes

Although I haven’t actually checked the code to confirm this, each time a channel is broadcasted on, the devices that receive on that channel don’t appear to run until a few frames later. The more broadcasts and wires, the slower the system will be.

In other words, not using block code is a very bad idea.

2 Likes

Yeah, it would require loops. If text ops were part of the checker, than this would be easy.

2 Likes

Indeed- getri actually found a solution to the problem that would solve it in the specific case I needed it for.

2 Likes

I agree. Without the blockcodes, this would be a lot more complicated.

1 Like

That’s the second time you’ve spelled it getri…

2 Likes

I’m too lazy to type your whole name, I’m doing math work in between posts and so I’m trying to get my thoughts down as fast as possible.

(Also, in my mind at least, it’s like the difference between blackhole and blackhole927)

5 Likes