[Math] Parity Checking and truth tables

abstract-algebraboolean-algebracomputer science

I have a question that I am very confused about.

Parity Checking.

  1. Produce a truth table for a parity checking circuit that is based on $4$ input data bits, an input parity bit and a single output bit that reflects whether an error has occurred. The parity bit is based on even parity.

  2. Produce an algebraic form for the output bit.

My problem is for (1.)

I realize that I will have a truth table with $16$ different options. ($a, b, c, d$ data inputs) and then I will have a $5^{\rm th}$ column for the parity bit. I will calculate the parity bit by making it a $1$ if the input bits add up to an odd number.

I am asked to make the truth table for this, but my problem is with the output column. Since I already based my parity bit on even parity won't my output bit always be $0$?

Any help or tips would be greatly appreciated.

Best Answer

(EDIT: I misunderstood the problem description initially; this has been corrected to fix that misperception.)

I'm not sure what you mean by 'won't my output bit always be 0?'. Your output bit will be precisely 'were an even number of my input bits on or not?' - in other words, 'was this a valid example or not?'; for instance, the truth table for checking parity on two data bits would look like:

$$\begin{array}{ccc|l} a&b&parity&out\\ \hline \\ 0&0&0&1 \\ 1&0&0&0 \\ 0&1&0&0 \\ 1&1&0&1 \\ 0&0&1&0 \\ 1&0&1&1 \\ 0&1&1&1 \\ 1&1&1&0 \end{array} $$

This shows the definition of the output bit as the negation of the XOR of the other bits - and that representation, incidentally, makes the algebraic expression much easier to find (hint: how can you express $a$ XOR $b$ algebraically? Having that 'subroutine' will make the overall job much simpler).

Related Question