Re: Number of Differing Digits & Another Problem (want to see different ways it can be done)

*To*: mathgroup at smc.vnet.net*Subject*: [mg76374] Re: Number of Differing Digits & Another Problem (want to see different ways it can be done)*From*: CKWong <CKWong.P at gmail.com>*Date*: Sun, 20 May 2007 02:41:26 -0400 (EDT)*References*: <f2mf5b$mbm$1@smc.vnet.net>

BitD[a_, b_, n_] := Count[ Equal @@@ Thread[IntegerDigits[#, 2, n] & /@ {a, b}], True]