Portable bit-field operation