quote:
Original post by Sinner_Zero
Well I''m more confused than a drunken munkey.
now, this ''^'' thinger, I understand it sorta, see now, it compares bits, if theyre equal it returns 1 and if theyre no it returns 0.
You got it a little backwards. The ''^'' operator is called XOR (eXclusive OR). It set''s each bit in the result where the corresponding bits in the operands are different. i.e.
For each bit in A and B the following truth table gives the result: A | B | A xor B ---+---+--------- 0 0 0 0 1 1 1 0 1 1 1 0e.g. A = 1001101 B = 0011011A xor B = 1010110
quote:
how can I get access to the binary''s? I mean I assume I can make my own little thinger that like puts the binary code into like a string and manipulate it from there but is there anything that already does this for you? maybe I should start looking into assembly?
quote:
Ok, I was just looking into some assembly and saw that (quite simple) they had the regular binary <--> decimal switching code. So assuming C++ can''t regularly do this I can make (this is a sensible way of encryption?) my own int to binary then back to int encryption/decryption no?
Umm, I''m not quite sure what you mean here. Everything in a computer is stored in binary code. You don''t have to convert anything. Or do you mean convert int''s etc to a base-two string representation? That would be good for printing numbers in binary form, but would only complicate the encryption stuff you seem to want to do.