Added bitmasked approach to bit reduction