Simplify masking when extracting bits
Merge pull request #2 from eliben/simplify-mask

Simplify masking when extracting bits