Bitwise operations in gimkit

I should warn, this is a pretty challenging problem, and this post is the result of me giving up after about a week of work and five hours of straight research.

So, here’s the problem. I have two numbers, 2863311530, and 2^n, and I want to perform a bitwise AND operation on them. I can’t use any recursion loops (too slow), so if anyone has any way to do this, that would be amazing!

Also, becuase I’m using a 32 bit (unsigned) number, and 2^n, the answer will always be 2^n or 0.

I did do some research as mentioned above, and found the following:

(Google Answers: Bitwise Operators)
(computer science - Is there any mathematical operation on Integers that yields the same result as doing bitwise "AND"? - Mathematics Stack Exchange)
(Expressing bitwise operations in terms of other functions - Mathematics Stack Exchange)

Here is an example of a solution that does not work, becuase it uses a loop:

Thanks,
Blackhole927

44 Likes

Ok, thanks for the heads up!

6 Likes

Heads up?

11 Likes

Yeah, I had no idea that there was a challenge for that.

8 Likes

But what else was I supposed to say?

11 Likes

Blackhole927 was asking for any possible solutions or further information on Bitwise Operations in Gimkit, so something along those lines.

8 Likes

Oh now i feel dumb.

10 Likes

Okay, maybe a elementary student will not understand anything on what these random words all say.

14 Likes

It’s ok lol. There have been many times where I misread something, or understood it differently, and only realized later that my reply didn’t make sense.

9 Likes

@LxmasHasCandy is that a insult or no…?

8 Likes

Lxmas is saying he has no clue what im talking about, because he is in elementary school.

20 Likes

confusion

17 Likes

lol :joy:

12 Likes

Answer is a=356^4 :nerd_face: Honestly idk the answer and I don’t think there is one.

13 Likes

So thats the math for doing a bitwise and operation, but it uses loops. So it gets the result, but gimkit will lag if i implement it with recursion.

18 Likes

well uh
i’m still confused

7 Likes

Loops are like wire repeaters in programming.(sort of) That’s the only thing I can comprehend from this.

11 Likes

I think everyone but @Blackhole927 is confused.

11 Likes

lol the edit.

7 Likes

cough x4
i still do not understand

8 Likes