<-> May 3 2016, 12:55 pm typo? Not this time.
 <-> May 3 2016, 1:17 pm In response to Kozuma3 Kozuma3 wrote: GinjaNinja32 wrote: 16777216 + 1 = 1677216. typo? Nope. Try it and see! edit: Example for you: ```/world/New() var/i = 16777200 while(i < 16777220) world.log << num2text(i, 10) i++ sleep(1) ```
 <-> May 5 2016, 7:27 am Haven't got around to reading the content in full yet. It looks good though from what I have seen while doing some quick skimming. Takes me back to not that long ago when I was completely bamboozled by the idea of binary and hexadecimal notation. I've since become comfortable with them, though I still feel I have yet to fully realize the power of this knowledge to the point that my programming sees growth. Maybe that'll change once I read this. And yeah, there is a lot gold buried around here from Ter and others. I actually had a collection of bookmarks to a great amount of these, but unfortunately lost it all during an OS wipe on the assumption that Chrome would automatically preserve my account's bookmarks. (Turns out I had to save them manually.)
 <-> May 9 2016, 7:06 am In response to Kitsueki That's XOR. ```A | 0 | 0 | 1 | 1B | 0 | 1 | 0 | 1--------|---|---|---|---A OR B | 0 | 1 | 1 | 1A XOR B | 0 | 1 | 1 | 0 ```
 <-> May 20 2016, 1:39 am As one more example of what you could do with bitflags, you can actually implement a crafting system that stores item recipes as a number. Since every number is a unique combination of bits, this is doable, ingredients are assigned a certain bit and you can save in associated list the recipes. There's a few cons to this method but also a a few pros, depending on your needs this might be preferable to the common define ingredient list per recipe and loop over. One con would be the fact two of the same ingredient have no meaning, that's probably the most major con but it could also be a pro if your system prefers that behavior. The second con would be a limit on how many ingredients you can use as each requires a bit flag, you can have 16 ingredient types max. I'm too lazy at the moment to write a code example but I'll throw this one in, if you want to count how many bits triggered on, this works: ```proc/countBits(c) . = c - ((c >> 1) & 0x5555) . = (. & 0x3333) + ((. >> 2) & 0x3333) . = ((. + (. >> 4) & 0x0F0F) * 0x0101) >> 8 ```