I want to kown the differece between PIOUT&=~BIT0 andPIOUT ^=BIT0. they are all Reset ,all right ?
Hi, PIOUT&=~BIT0 resets (while BIT0 must be a bitmask) while PIOUT ^=BIT0 is a "exlusive or", i.e. it reverses.
> I want to kown the differece between PIOUT&=~BIT0 andPIOUT ^=BIT0. they > are all Reset ,all right ? No. & means and ^ means xor (exclusive or) So in the first case bit BIT0 gets reset. But in the second case the bit gets toggled. It depends on the previous state of of the bit what its new state will be. 0 toggles to 1, 1 toggles to 0 > thank you! you are welcome
Bitte melde dich an um einen Beitrag zu schreiben. Anmeldung ist kostenlos und dauert nur eine Minute.
Bestehender Account
Schon ein Account bei Google/GoogleMail? Keine Anmeldung erforderlich!
Mit Google-Account einloggen
Mit Google-Account einloggen
Noch kein Account? Hier anmelden.