add cardinality_of function to return number of set bits
refractor tests in ehci