Bitwise operations in gimkit

I didn’t understand the post. But what do you mean?

oop
Well that’s sad, a legend’s question is probably impossible.

2 Likes

…Blackhole isn’t wrong in that post…

However saying nearly nothing is impossible in gimkit is way different from something that literally is impossible mathmatically.

It’s the same as you saying it’s impossible for this equation to be true: 1 + 1 = 3,
and me replying with that nothing is impossible. If you truly believe it’s doable, prove it.

Also this post has become not really related to gimkit anymore and more a discussion about math. Blackhole you should either lock or resolve it at this point.

6 Likes

I dunno if you know what he means, like who is trying to prove 1+1=3???

3 Likes

I sometimes do that when i am writing a script. But other than that no one.

3 Likes

That’s my point lol. You quite literally cannot do bitwise operations with just algrebra, and them saying “nothing is impossible” is the exact same thing. I just used 1 + 1 = 3 to make it absolutely clear what I mean. Nobody would challenge it because everyone knows 1 + 1 != 3. It’s the same with bitwise (I finally learned it while bored lol), just it’s more advanced math.

6 Likes

Am I missing something here? 1 + 1 = 3?
Pretty sure that’s not how math works…

2 Likes

Your Comment is the best thing Ive seen in awhile XD

but truthfully with true research 1+1 can equal 3
its based on what type of math you would use

4 Likes

Uh I think he meant that everybody knew it’s wrong.

3 Likes

In no type of math would 1+1 ever equal 3.

2 Likes

correct actually
its just a wierd thing,

2 Likes

That’s in the context of people working together, not actual math.

6 Likes

“It is common notion that synergy arithmetic has no meaning mathematically.”

8 Likes

Not sure if that’s true or not.

2 Likes

lol I forgot the explanation mark (1 + 1 != 3)

3 Likes

wow I should do better I guess.

I’m just gonna get a couple things clear here so I don’t mess anything up.
One, you can’t use a for loop.
Two, you’re solving a bitwise and operation which acts like this:
001
011
returns
001
But you have 1010 1010 1010 1010 1010 1010 1010 1010
and you have 2^n, which is just a 1 with n trailing 0s.

First of all, can’t you check to see if n is even or odd, and within the bounds of 2863311530?
If n is odd and <33, then the number you return is 1 followed by n 0s.
Otherwise, the number is 0.

Second of all, just to clarify, you can’t use a trigger with blocks to add a digit to the end of a property? Keep in mind that triggers finish their own recursion before allowing any other tick processing, as far as I remember, so I can’t see how that would be too slow unless you’re doing it at a very large scale.

4 Likes

Gimkit is inefficient with math in general. It would probably take around 10 minutes for those triggers to finish one frame (I think blackhole has tested that).

In terms of the math, 2^n will always be even (n shouldn’t ever be a negative or a non-integer lol), so that doesn’t really work… One of the reasons computers can do this stuff fast is due to them comparing physical bits of memory, which we can’t replicate on gimkit.

The only possibility with looping (for server side anyway) is if blackhole gets josh to optimize the block coding system (in terms of speed), which probably won’t (if ever), happen sadly.

It MIGHT be possible to use window.stores to speed up the looping process (though I’ve never tried it), and it would only be client side… (Also that’d be a lot of coding lol)

2 Likes

I said n being even, not 2^n being even. If you’re storing the number as an actual integer and not just 2^n where n is a variable, then you’re absolutely right. But if it’s the other way, then checking to see if n is even then goes on to check if 2^n is a non-zero value.

Let’s say n is 1
2^n = 10
so you return 10
but if n is 2
2^n = 100
so you return 0, because 010 and 100 returns 000.

I’m not crazy, right?

I guess there is also a lot of testing when it comes to what blocks are more laggy than others, and measuring those timings in Gimkit’s incredibly imprecise framework would be tricky.

Also, maybe try other devices with block code? The processing speed could change based on the device.

4 Likes

Ok, now im back, after a year of being bored and reaserch ( and asking my uncles )
I pretty much understand bitwise and operations.

  1. We need to first have a mathmatical operation in wich we convert anynumber into a binary number. That is very easy, and here is how:
2 Likes