Uses 'unsigned' for internal register to simplify the type conversions.