www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.learn - bitwise operators

reply Orgoton <orgoton mindless.com> writes:
What are the binary operators in D?
Bitwise and is made by var1&var2
Or is made by var1|var2

What about bitwise negation and XOR?
Mar 06 2007
parent Frits van Bommel <fvbommel REMwOVExCAPSs.nl> writes:
Orgoton wrote:
 What are the binary operators in D?
 Bitwise and is made by var1&var2
 Or is made by var1|var2
 
 What about bitwise negation and XOR?

bitwise negation: ~var bitwise xor: var1 ^ var2
Mar 06 2007