A Switching Algorithm for the Solution of Quadratic Boolean Equations