• Welcome to Overclockers Forums! Join us to reply in threads, receive reduced ads, and to customize your site experience!

more assembly questions

Overclockers is supported by our readers. When you click a link to make a purchase, we may earn a commission. Learn More.
I think its an exclusive or, generates a 0 if both of the inputs are 0 or 1, or generates a 1 if one input is 1 and the other 0.
 
xor is an exclusive or operation. I used it commonly in assembly to zero out a variable by xoring it with itself. x XOR x = 0.
 
That it is.

I prefer ANDing with a zero to zero something out...fewer transistors == more effeciency. :)
 
i think i kindof understand it. But I would appreciate it if one of you guys showed a simple piece of code that uses the XOR thing.


thanks,
adam
 
I'll make a truth table

bit1 bit0 XOR result

0 | 0 || 0
0 | 1 || 1
1 | 0 || 1
1 | 1 || 0

I think XOR is used a lot in encryption. The logic circuit for it, though, is somewhat large, so I think it's usually somewhat simplified.
 
When either bit one OR bit two is one
Table:

0 | 0 || 0
0 | 1 || 1
1 | 0 || 1
1 | 1 || 1

You might want to find a page on logic gates. I think it'll help you a good deal. :)

A google search turns up some pretty decent stuff.
 
yea ur right, google helps alot. I would have gone there but i did not know what this kinda stuff was called.


thanks,
adam
 
Bmxpunk86pl said:
yea ur right, google helps alot. I would have gone there but i did not know what this kinda stuff was called.


thanks,
adam

Not a problem. I kinda figured you weren't really sure on that, since you were asking them one by one. :D

Much easier to get this off of google than doing it that way, that's for sure (at least, I sure think so) :)
 
Back