extensions methods for un/setting flags in registers