The ENRZ code is used to transmit 3 bits over a collection of 4 wires. Its codebook consists of 8 quaternary codewords. They consist of all four permutations of the vector (+1, -1/3, -1/3, -1/3) and all four permutations of the vector (-1, 1/3, 1/3, 1/3).
A possible encoder for this code generates for each one of the four wires two bits with the implicit assumption that
00->+1, 01->1/3, 10->-1/3, 11->-1.
One possible encoder can then be described as follows:
// Input are three bits a, b, and c Output: (a|b)^c, c, (a|~b)^c, c, (~a|b)^c, c, (~a|~b)^c, c