If you want to clear bit3 in PORTG, you write: Code:PORTG &= ~(1<<3); If you want to set bit3 in PORTG, you write: