Bitwise operations in gimkit

That’s what I mean. There is no way that is better than your way.

1 Like

maybe make a database for maybe 5-8 digits at a time?

5 Likes

Forget it, too many combos

4 Likes

Well i tried my best bye.

1 Like

I considered it… until i realized this system needs to support all numbers up to 2^32

4 Likes

Thank you! The Antarctic Phoenix is here! I also, as always, put a couple of Easter eggs in the picture.

1 Like

image
5659_2
Found trigger tock.

6 Likes

He’s just enjoying the warmth from the end game widget and green fish soup. :blush:

1 Like

you’re eating @mysz?

1 Like

I’m a bird. It’s not my fault he’s a fish. Want some soup?

6 Likes

Black hole, if you tell me what and how you are using them for, we could find a workaround.

4 Likes

I need to find the nth digit in a 32 bit number

2 Likes

Using bitwise operations?

3 Likes

How would bitwise operations help with a display?

3 Likes

Yes, give me a second to find the ones used.

2 Likes

x & (2^n)

1 Like

I want to implement bresenham’s line drawing algorithm on my display. The display stores rows of pixels at 1’s and 0’s, and to set one you have to know what it is.
Setting a pixel works by adding 2^n to the number, so if there is already a 1 there, it can corrupt everything.

2 Likes

So each row is a number, with the pixel number being the 1 or 0.

3 Likes

Actually, a better solution:

(1 << k) | n

It will set the Kth bit of N to 1

1 Like

Each pixel is represented by a 1 or 0, like in this number:
1792387926

(1101010110101011010101101010110)

1 Like