Thats taught me something today :)
But what if you have 7 data bits? How would it work then?
Try something like :
d0 --+
XOR--+
d1 --+ |
XOR--+
d2 --+ | |
XOR--+ |
d3 --+ |
XOR--- parity
d4 --+ |
XOR--+ |
d5 --+ | |
XOR--+
) |
d6--------+
and invert the output as necessary to get the required odd/even parity.
Cue the well-knwon thread on multi-way light swtiches (which are
logically parity trees).
-tony