DeMorgan's Law states that when you take the complement of an expression (that is, when you negate it), you can simply swap all OR's and AND's and negate every term to get the desired result.
For example
!(A && B) = !A || !B
!(A || B) = !A && !B
!(A && !B) = !A || B
therefore, applying these two simple rules,
!((previous = 4 || previous = 5) && current = 2)
=
!(previous = 4 || previous = 5) || current != 2
=
(previous != 4 && previous != 5) || current != 2
(broken up over multiple lines because one line was too long)
Note that above, because we had an expression as one of the terms, we applied DeMorgan's Law recursively (twice, to be exact).
Some more examples
!(A > B || A + B == 0) = A <= B && A + B != 0
!(A >= 2 && A < 8) = A < 2 || A >= 8