how to use bit fields to extract bits from a word