XOR of Multiple Bytes - Procedure and Methods

  • Thread starter Thread starter temujin
  • Start date Start date
  • Tags Tags
    bytes Multiple
AI Thread Summary
To XOR multiple bytes, the standard method is to sequentially XOR each byte together, starting with the first two and then combining the result with the next byte, and so on. While XOR operations typically involve two operands, a truth table can be constructed for a three-input XOR, yielding different results than the sequential method. The choice of method may depend on the specific application or desired outcome. Ultimately, the bit-by-bit XOR operation will produce a result that retains the same number of bits as the operands. Clarifying the intended goal can help determine the most effective approach.
temujin
Messages
46
Reaction score
1
Hi,

Short question,

I have to XOR multiple bytes. Is the right procedure to XOR first and second byte then XOR the result with the third byte and so on?

Or is there a different method?

t.
 
Engineering news on Phys.org
As far as I know an XOR operation can only have 2 operands.

Having said that I don't see why you couldn't have an operator with a truth table like so...

a b c 3bitXOR
0 0 0 0
0 0 1 1
0 1 0 1
0 1 1 1
1 0 0 1
1 0 1 1
1 1 0 1
1 1 1 0

And I think that would give you a different result to ((a XOR b) XOR c).

That's probably not helped! I suppose the mechanism to use depends on what you're trying to achive.
 
a computer will ido a bit by bit XOR prducing a result of the same number of bits as the two operands.. an XOR is a Test or filter , if 101 is XORd with 010 the result is 111..
temujin what are you trying to do ?
 
Hi all, i have some questions about the tesla turbine: is a tesla turbine more efficient than a steam engine or a stirling engine ? about the discs of the tesla turbine warping because of the high speed rotations; does running the engine on a lower speed solve that or will the discs warp anyway after time ? what is the difference in efficiency between the tesla turbine running at high speed and running it at a lower speed ( as fast as possible but low enough to not warp de discs) and: i...
Thread 'Where is my curb stop?'
My water meter is submerged under water for about 95% of the year. Today I took a photograph of the inside of my water meter box because today is one of the rare days that my water meter is not submerged in water. Here is the photograph that I took of my water meter with the cover on: Here is a photograph I took of my water meter with the cover off: I edited the photograph to draw a red circle around a knob on my water meter. Is that knob that I drew a red circle around my meter...
Back
Top