Skip to content
Digital circuitsCHIP Chair Logo

Voting systems

In the context of digital circuits, voting systems refer to electronic or logical implementations designed to process multiple inputs and determine a result based on a majority rule or predefined logic.

Example: Committee voting system

We will design an electronic voting system for the Executive Committee of a football team. This committee has four members: the President, the Secretary, the Treasurer, and the Vocal. Each may vote Yes (1) or No (0).

The approval rules are:

  1. A proposal is approved when three or more members vote in favour.
  2. In case of a tie (2 in favour and 2 against), the President's vote decides. If the President votes "Yes", the proposal is approved; if he votes "No", it is rejected.

We will design a logic circuit with four inputs (P, S, T, V) and one output (A) that indicates whether the proposal is approved.

Define the input variables (1 means "Yes", 0 means "No"):

  • P: vote of the President
  • S: vote of the Secretary
  • T: vote of the Treasurer
  • V: vote of the Vocal

The output variable is A (Approved). 1 means approved, 0 means rejected.

We will analyse under which assumptions the proposal will be approved; we will call these the approval conditions and they are derived from the approval rules.

Condition 1: Three or more votes in favour.

We identify all combinations where the sum of P, S, T, V is 3 or 4.

  • Approved by three votes in favour
    • P=0, S=1, T=1 and V=1 --> (P¯STV)
    • P=1, S=1, T=1 and V=0 --> (PSTV¯)
    • P=1, S=1, T=0 and V=1 --> (PST¯V)
    • P=1, S=0, T=1 and V=1 --> (PS¯TV)
  • Approved by four votes in favour
    • P=1, S=1, T=1 and V=1 --> (PSTV)

The proposal will be approved if any of these circumstances is met (logical OR). Condition 1 is expressed in Boolean algebra as:

C1=P¯STV+PSTV¯+PST¯V+PS¯TV+PSTV

Condition 2: Tie resolved in favour of the President.

We must identify all combinations with two votes for and two against. Of these, those with P=1 are of interest.

  • Approved
    • P=1, S=1, T=0 and V=0 --> (PST¯V¯)
    • P=1, S=0, T=1 and V=0 --> (PS¯TV¯)
    • P=1, S=0, T=0 and V=1 --> (PS¯T¯V)
  • Not approved
    • P=0, S=1, T=1 and V=0
    • P=0, T=0, S=1 and V=1
    • P=0, S=0, T=1 and V=1

The proposal will be approved if any of these assumptions hold. Condition 2 is expressed as:

C2=PST¯V¯+PS¯TV¯+PS¯T¯V

The output A will be 1 if condition C1 or condition C2 is satisfied. The Boolean function is a logical OR of these two conditions:

A=C1+C2

And therefore the expression for A, as a function of P, S, T and V, is:

A=P¯STV+PSTV¯+PST¯V+PS¯TV+PSTV+PST¯V¯+PS¯TV¯+PS¯T¯V

We build the truth table with all possible cases:

PSTVVotes in favourC1C2A
00000000
00011000
00101000
00112000
01001000
01012000
01102000
01113101
10001000
10012011
10102011
10113101
11002011
11013101
11103101
11114101

The expression for A as a function of P, S, T and V is quite long. A logical simplification with Boolean algebra would be complex. Alternatively we can use a Karnaugh map for the output function A, with inputs P, S, T and V grouped.

TV
PS
00011110
000000
010010
111111
100111

The next step is to group the '1's into four groups, which we mark with different colours.

TV
PS
00011110
000000
010010
111111
100111

The fixed variables in the blue group are P=1 and T=1, which translates to the term PT in the solution.

A=PT+···
TV
PS
00011110
000000
010010
111111
100111

The fixed variables in the yellow group are P=1 and V=1, add the term PV to the solution.

A=PT+PV+···
TV
PS
00011110
000000
010010
111111
100111

The green colour grouping has in common P=1 and S=1, add the term PS to the solution

A=PT+PV+PS+···
TV
PS
00011110
000000
010010
111111
100111

The fixed variables in the green group have in common P=1 and S=1, so we add the term PS to the solution

A=PT+PV+PS+···
TV
PS
00011110
000000
010010
111111
100111

Finally, in the red group the fixed variables are S=1, T=1 and V=1, add the term STV to the solution.

A=PT+PV+PS+STV

This is the final simplified Boolean expression, because all the '1's have already been accounted for in some group.

The digital circuit derived from this expression is the following:

Digital circuit

Exercises on Jutge.org: Introduction to Digital Circuit Design

Remember that to access the exercises and for the Judge to evaluate your solutions you must be enrolled in the course. You will find all instructions here.



CHIP Chair Logos

Xavier Casas, Francesc Madrid
Lliçons.jutge.org
© Universitat Politècnica de Catalunya, 2026

lliçons.jutge.org