Skip to content
BetterDL

Odd function

Also called: odd parity function, odd-parity function, odd detector

A Boolean function that is 1 when an odd number of its inputs are 1. It is the XOR of all the inputs, such as A ⊕ B ⊕ C.

The odd function of several inputs outputs 1 when an odd number of them are 1, and 0 otherwise. For three inputs it is : 1 for one 1 or for three 1s.

It is exactly what a multi-input XOR computes, and it is the basis of parity checking.

Useful facts:

  • It is 1 in exactly half the rows of its truth table: 4 of 8 rows for three inputs, 8 of 16 for four.
  • Flipping any single input always flips the output. No input can ever be ignored.
  • On a karnaugh map its 1s form a checkerboard. No two 1s are adjacent, so it can't be simplified: the minimal SOP is just the list of minterms.
  • Its complement is the even function.

How to build one: XOR the inputs together with 2-input XOR gates, as a chain or a tree. Order doesn't matter.

A trap: chaining 2-input XNOR gates also gives an odd or even function, depending on how many you use. Each XNOR adds one inversion, so two chained XNORs (three inputs) give back the odd function, .

0000
0011
0101
0110
1001
1010
1100
1111

Worked example

Example

Which rows are 1?

List every row ABC for which = 1.

A\BC00011110
0
0m0
1m1
0m3
1m2
1
1m4
0m5
1m7
0m6
  1. 1.

    One 1: 001, 010, 100.

  2. 2.

    Three 1s: 111.

  3. 3.

    So the function is 1 for 001, 010, 100 and 111, which are minterms 1, 2, 4 and 7.

  4. 4.

    Rows 000, 011, 101 and 110 hold zero or two 1s, so they give 0.

Common mistakes

  • Treating "odd" as "exactly one". Three 1s is odd too.

  • Assuming chained XNORs give the even function. Two chained XNORs give the odd function.

  • Trying to group the 1s on a K-map. The checkerboard has no adjacent 1s to group.

Practice Odd function

Interactive questions with instant feedback and a worked solution for every wrong answer.

Learn it step by step

Odd function is taught in Logic Gates.