Towards an algebraic theory of Boolean circuits