TASK – PARITY CHECKER TASK DESCRIPTION In mathematics, the parity of a number refers to whether it is even
or odd. Parity checks are used in
computers to check if transferred data is corrupted or not. It is also useful when adding numbers. In this circuit, we will look at how to create a circuit that checks
the parity of any amount of bits (inputs). THEORY As opposed to checking the parity of a specific number (which is
very simple in binary), we will be checking if the number of ones in a number
is odd or even. a) Two inputs For two inputs, here is the truth table where 0 is given for even
amounts of ones and 1 is given for odd amounts. A B Q 0 0 0 0 1 1 1 0 1 1 1 0 This truth table is the same as the XOR gate. Therefore, A XOR B = Q b) Three inputs Let’s consider the truth table for three inputs. A B C Q 0 0 0 0 0 0 1 1 0 1 0 1 0 1 1 0 1 0 0 1 1 0 1 0 1 1 0 0 1 1 1 1 While it might not be clear, this truth table is equal to A XOR B
XOR C = Q. c) Four inputs A B C D Q 0 0 0 0 0 0 0 0 1 1 0 0 1 0 1 0 0 1 1 0 0 1 0 0 1 0 1 0 1 0 0 1 1 0 0 0 1 1 1 1 1 0 0 0 1 1 0 0 1 0 1 0 1 0 0 1 0 1 1 1 1 1 0 0 0 1 1 0 1 1 1 1 1 0 1 1 1 1 1 0 Again, if you inspect this, you will see that A XOR B XOR C XOR D =
Q. PATTERN The pattern continues indefinitely.
We can simply add more and more XOR gates for each input. TASK Create a 3-input parity checker for a max mark of 80 %; or Create a 4-input parity checker for a max mark of 90 %; or Create a 5-input parity checker for a max mark of 100 %. TO SUBMIT One screen capture of your circuit. |