Bitwise operations in gimkit

Ok. I get it. How do bitwise operations enter this?

3 Likes

I want to set one of these bits to 1.
So:

(1 << k) | n

where k is the bit, and n is the number

1 Like

So it is the bitwise OR?

2 Likes

Maybe we could use base 10, where having a 0 means no pixel, and any other number means the pixel is filled?

3 Likes

Well then we run into the property limkit. Properties can only store numbers up to 9,999,999,999 or something around there.

1 Like

We could use a smaller base like 6.

2 Likes

32 bits is right on the limit though… and if I made the display smaller to account for base 6 or something, the display wouldn’t be high enough quality.

1 Like

We could use like more properties? Like 2 or 3 properties per row?

2 Likes

Now the property limit becomes a problem. This display is a color display, so it uses four properties per row. 4x32 is already at the limit, so I’m gonna have to optimize it as well.

1 Like

Maybe we’ll get too many properties.

2 Likes

So a row of text requires the following data right now for it to work:
:black_large_square::red_square::yellow_square::blue_square::purple_square::green_square::white_large_square::black_large_square::red_square::yellow_square::blue_square::purple_square::green_square::white_large_square::black_large_square::red_square::yellow_square::blue_square::purple_square::green_square::white_large_square::black_large_square::red_square::yellow_square::blue_square::purple_square::green_square::white_large_square::black_large_square::red_square::yellow_square::blue_square:
1792387926
642554162
439642321

3 Likes

How would you get colors? RGB? Hexidecimal?

2 Likes

Each of the number is broken into bits, and then this table is used:

3 Likes

Ok.

2 Likes

So 3 bits per pixel now.

2 Likes

Three bits across three numbers, yeah. Also, here is some code that translates emojis into the binary.
(translator - Replit)

1 Like

Wait, the numbers are:
1011100101010100000111010000011001100111011110111101111100101000000110000011101110011010001
However, black is the first one, and both ends aren’t 000.

4 Likes

I didn’t send you three rows, I sent one. So look at the first bit in each 32 bit number. The first bit in all three is 0.

1 Like

It’s split into R, G and B.

1 Like

I do not understand a single word you all are saying.

2 Likes