Why does "!=LOW" != "HIGH"?
Because 

((PIND &amp; (1 &lt;&lt; 2)) != LOW)


means exactly

(PIND &amp; 4) != 0


and that is true if PIND is 4, 5, 6, 7, 12, 13, ... (any number having 4 in it binary), so it yelds

4 != 0 


Which is definitively not equal

4 == 1




BTW: in C any integer != 0 is true and 0 is false, so you can as well write:

if (PIND &amp; (1 &lt;&lt; 2)) PORTB |= (1 &lt;&lt; 5); //sets pin 13 (B5 on ATMEGA 328) as HIGH