Step 3 of 5
OR, AND, and XOR
IORWF, ANDWF, XORWF apply bitwise logic between W and operand f. Useful to mask nibbles or combine switches.
MOVF PORTB, W
ANDLW 0x0F ; solo nibble bajo
IORWF PORTD, W
MOVWF LATC