Adds logical compare methods

adds doc and examples for logical operations
adds tests for new logical compare methods