XOR question
Don M
Posts: 1,653
Using these data bytes as an example:
$01, $0A, $03, $00, $00
How do I code this to XOR these bytes for a checksum answer? I see the checksum on the logic trace is $08 and it figures with my calculator that way but I don't know how to put it into code.
Would it be as simple as chksum := ($01 ^ $0A ^ $03 ^ $00 ^ $00) ?
$01, $0A, $03, $00, $00
How do I code this to XOR these bytes for a checksum answer? I see the checksum on the logic trace is $08 and it figures with my calculator that way but I don't know how to put it into code.
Would it be as simple as chksum := ($01 ^ $0A ^ $03 ^ $00 ^ $00) ?
Comments
It calculates wrong. It shows $04 instead of $08.
without XOR or an extra register - mini challenge)
Andy