PINB = PINB | _BV (5);
What if input zero is already high? We end up with this...
...which toggles two pins!
This is actually a really interesting question.
PORTB |= _BV(5);
is well-known to compile down to a single "set bit in IO register" (sbi) instruction. If it didn't, the assembler-lovers would gloat too much.
The sbi instruction, theoretically, does a read-modify-write of the bytewide port, down at the hardware level (which is why it takes two cycles rather than just one.)
But the datasheet EXPLICITY says that "the SBI instruction can be used to toggle one single bit in a port", so it's not quite as straightforward as that.
PROBABLY, the statement above will compile to a single sbi instruction (at least with optimization on), and probably it will only toggle the single bit.
But wait - not all of PINx registers are reachable by "sbi." If you were working with PINL on a MEGA, the compiler would have to generate a read, or, and out instructions. And it would behave DIFFERENTLY...