2009-01-12, 05:25 PM
(This post was last modified: 2009-01-12, 05:29 PM by KajitiSouls.)
Devil's Sunrise Wrote:One genius thing you did here. Colourizing. Too bad I'm not going to bother to do the same, sorry
Sorry, I've been using lisp too much, that may be why there are too many parentheses.
I've been somewhat unfamiliar with how Java works, but I'm quite sure it can be written as (n & 1 == 1).
With that being said, I'll try to explain it quite short. For a human being, to calculate this, we would have to convert n and 1 into bitcode. Let's say n equals 23:
Base 10 Base 2 1 00001 23 10111
Now, let's see how & reacts
00001 & 10111 = 00001
Though it may look completely in-understandable, it's the bitwise &-operator. If ...
oic. That's why I didn't understand the code itself. Java doesn't recognize integers or bytes as bit-wise for anything except XOR or char types, and is one of the gh3y things about Java. Strong type ftl. . Also, shouldn't there be a notation denoting that the 1 is a base-2 number? Such as hex number 0xAF.


