Hey folks. I've got a question about XOR-based parity generators. Perhaps I'm misunderstanding the concept of a parity generator, but from what I read, the generator evaluates the outgoing data and determines whether or not to prepend/append a 1 or 0 in the parity bit. The example they give in my book (Kleitz Digital Electronics 9th Edition) shows both even and odd parity generators.
The issue I'm having is with running examples in my head. Let's take a 4-bit parity generator checking a binary 5. 0101 feeds into the generator. Each of the first-level XOR2s gets both a zero and a 1 and as a result spits out a 1. The final XOR2 receives two 1s as a result and thus gives a 0, doesn't it? That doesn't make sense in my head because if it's an even-parity generator, shouldn't the result be a 1 so that the parity generated is even?
The issue I'm having is with running examples in my head. Let's take a 4-bit parity generator checking a binary 5. 0101 feeds into the generator. Each of the first-level XOR2s gets both a zero and a 1 and as a result spits out a 1. The final XOR2 receives two 1s as a result and thus gives a 0, doesn't it? That doesn't make sense in my head because if it's an even-parity generator, shouldn't the result be a 1 so that the parity generated is even?