#!/bin/cat +-----+-----+-----+-----+-----+ | x | y | x&y | x|y | x^y | +-----+-----+-----+-----+-----+ | 0 | 0 | 0 | 0 | 0 | | 0 | 1 | 0 | 1 | 1 | | 1 | 0 | 0 | 1 | 1 | | 1 | 1 | 1 | 1 | 0 | +-----+-----+-----+-----+-----+ x&y = 1 when: both need to be 1 x|y = 1 when: one or both needs to be 1 x^y = 1 when: x and y are different