1101010110101011010101101010110
100110010011001001100100110010
11010001101000110100011010001
But it still doesn’t work
Each number is 32 bits. There are extra 0’s at the front that binary translators wont show you.
So it’s actually something like:
01101010110101011010101101010110
00100110010011001001100100110010
00011010001101000110100011010001
Oh! So thats why they don’t line up.
Can someone give me a simple version of what yall are talking about so i can help?
Um… I don’t know if it gets simpler than this…
That is basically the simplest version. I’ve been stalking this conversation for a long time and it’s getting more interesting and over my head at the same time.
Maybe explain what binary is? I can’t since I’m on mobile
I’m storing pixels as 1s and 0s, so like: 101010 = .
I’m trying to set one of the pixels 1 one with the following bitwise operations:
(1 << k) | n
where k is the bit, and n is the number.
Anyway I’m just trying to do that.
You would use or for that, right?
Yeah. What the math does is this:
First, the starting pixels:
10100000
Then, it makes a new number with only the pixel it wants to place:
00001000
Then, it ORs the numbers together to get the final result:
10101000
I’m about to go to my next block in school, where I have actual work to do, and not just some language study, so I’m gonna be mainly offline in a few minutes. If you have any questions/comments/ideas, post them and I’ll see them at around 11:10 EST.
Ok.
If we can truncate numbers, then bitwise operations are easier to do in Gimkit.
I don’t understand code, nor block code. So non of this makes any sense.
Ok. So you know our base 10 system that we use? Take 465 for example. The 4 represents 4 100s, because it is in the 3rd spot. Each consecutive digit (starting at the right) represents a larger power of 10 (10^position-1), and the 1st position represents 1. Binary is the same but with 2. So in Black Hole’s system, a 0 represents an empty pixel, and a 1 represents a filled in pixel (white).
Oh, ok that makes more sense, thanks for explaining it the way people who don’t know it can understand it.
You’re welcome.
Use this to understand bitwise operations:
Ok, thanks.