[DGD] Bitwise on Arrays & Efficiency

Par Winzell zell at skotos.net
Sat Mar 6 23:29:47 CET 2004


> A & B: A - (A - B)
> A | B: A + (B - A)
> A ^ B: (A - B) + (B - A)

I'll play the Dummy's Guide companion to Dworkin's admirable textbook 
version:

  A & B is intersection
  A | B is union
  A ^ B is exclusive or

The term bitwise is probably what's confusing you. The only way these 
are really bit operations is if you think of a bitfield as a specific 
implementation of a set.

Zell

_________________________________________________________________
List config page:  http://list.imaginary.com/mailman/listinfo/dgd



More information about the DGD mailing list