Thread: XOR Two Arrays
View Single Post
  #1 (permalink)  
Old September 13th, 2004, 07:04 PM
coderforrent.com coderforrent.com is offline
Authorized User
 
Join Date: Jul 2004
Posts: 69
Thanks: 0
Thanked 1 Time in 1 Post
Default XOR Two Arrays

I have two 256 element byte arrays. If either arr1 or arr2 is set to 0x80 then arr1 should be 0x80. This is what I am doing now:

for(int i=0;i<256;i++)
  arr1[i] |= arr2[i];

My question is... Is there a way to do this without the loop?

www.CoderForRent.com
Get A Computer Job!
Reply With Quote