let a=5
b=6
a=a+b
b=a-b
a=a-b
now a=6 and b=5
Only if you pay me for itMaybe we should create a separate thread: "Post all your homework questions here"
won't "+" or "-" operators suffice ?? I think they are less expensive than "^" ...a=a^b;
b=a^b;
a=a^b;
I thought he meant "raise to"How's addition and subtraction less expensive than an XOR? You've learned your computer architecture properly, haven't you Garbage? It would result in more gate delays than a simple xor.
yep, Bitwise operations are fastest.How's addition and subtraction less expensive than an XOR? You've learned your computer architecture properly, haven't you Garbage? It would result in more gate delays than a simple xor.