The logic gates are explained with formulas drawn in the comments.
Automatic formatting has shifted this drawings making some of them incomprehensible. Example:
// / \ /
// \ c - 4 . c = | a - 4 . a | (& OR ^) | b
// - 4 . b | i + 1 i \ i + 1 i /
// \ i + 1 i /
//
Originally:
// / \ / \
// c - 4 . c = | a - 4 . a | (& OR ^) | b - 4 . b |
// i + 1 i \ i + 1 i / \ i + 1 i /
//
The logic gates are explained with formulas drawn in the comments. Automatic formatting has shifted this drawings making some of them incomprehensible. Example:
Originally: