Re: xor question

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



Susan,

Well, considering that 476F does not equal 71111, but rather 18287, and
7262 in hex equals 29282 (and not 114098), I would say that could be one of
the reasons.

Hope this helps.


--
- Nicholas Paldino [.NET/C# MVP]
- mvp@xxxxxxxxxxxxxxxxxxxxxxxxxxx

"Susan" <Susan@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:905B73BA-4CE0-4BCF-8647-5022A138DE87@xxxxxxxxxxxxxxxx
>I have a stream of chars where I am trying to xor certain parts. I guess
>the
> meat of my question is that if I xor the hex values:
> 476f ^ 7262
> I get a different value that if I xor the integer values:
> 71111 ^ 114098
> Does anyone know why? I'm assuming that I can't just use the hex values
> for
> xor in c# or am I wrong? It would make my life much easier if I could.
>
> Thanks,
> Susan


.



Relevant Pages

  • Re: Help with XOR...
    ... I have 5 bytes (Hex) and wish to XOR them to make a Checksum byte. ... I think I found your problem: when assigning the Text property to hX, VB tries to convert the string value to a double. ... What you can do is check if the entered string value represents a Hexadecimal value. ...
    (microsoft.public.vb.com)
  • Re: Xor bug in all PHP versions
    ... 4,738,698,913 would be 1_1A72_CEA1 in hex, but that needs 33 bits. ... But that's assuming that PHP performs XOR on the absolute values of the ... I don't like the fact that even basic PHP code isn't portable between platforms, i.e. it doesn't abstract away differences in platform bitwise implementations of signed values. ... It has nothing to do with the absolute value. ...
    (comp.lang.php)
  • Re: xor question
    ... If you genuinely mean a stream of chars, ... character data as binary data. ... > I guess the meat of my question is that if I xor the hex values: ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: Xor bug in all PHP versions
    ... 4,738,698,913 would be 1_1A72_CEA1 in hex, but that needs 33 bits. ... truncate that to 32 bits, ... But that's assuming that PHP performs XOR on the absolute values of ... Made a mistake in my paper calculations! ...
    (comp.lang.php)
  • Re: graphics format in forth
    ... is the count shift ... but why this hex number? ... In colorForth, 'or' is actually a binary 'xor'. ...
    (comp.lang.forth)