Use bitwise OR to set bits to 1 and bitwise AND to set bits to 0.
PORTB |= 0b00000110; // Set bits 1 and 2 HIGH
PORTB &= ~0b00001010; // Set bits 1 and 3 LOW (the '~' does a bitwise inversion changing 0b00001010 to 0b11110101)
Use bitwise OR to set bits to 1 and bitwise AND to set bits to 0.
PORTB |= 0b00000110; // Set bits 1 and 2 HIGH
PORTB &= ~0b00001010; // Set bits 1 and 3 LOW (the '~' does a bitwise inversion changing 0b00001010 to 0b11110101)