Basic implementation of 'and' and 'or'.