MONT 113G, Spring 2012

    Home | | Course Schedule | | Assignments | | Lecture Notes

    MONT 113G Homework 1

    Due Friday, February 10, at the beginning of class.

    The majority function in Circuitmaker

    Goals

    • To build more familiarity with Circuitmaker
    • to practice building truthtables
    • to translate a truthtable into Circuitmaker

    Part 1. Create a Truth Table for The Majority function.

    The majority function has three inputs, each of which can be either 0 or 1. The truth table has eight lines, one for each possible combination of the inputs. The value of the function is the same as the majority of its inputs. For example, if the inputs are labeled A, B and C, and the output is labeled "Majority", then one of the eight lines in the truth table is
    ABC Majority
    101 1
    In this example, the value of the Majority function is 1, because 2 out of three of its inputs are 1. Since there are three inputs, but each input only has two possible values, one of the input values must be repeated at least once. (This observation is called the pigeonhole principle in mathematics.)

    Create a truth table with all 8 lines for the Majority function.

    Part 2. Create a Circuit for The Majority function in Circuitmaker

    Your circuit will have three logic switches, one for each of the three inputs, and one logic display. Label the switches A, B, and C. Label the logic display Majority. Design and test a circuit which causes the display to light when the majority of inputs are ones, and go out when the majority are zeros.

    To create this circuit, you might want to use the following approach:

    Consider each row in the table which has a one in the output.
    Build a circuit corresponding to that row, by ANDing together:
    • each of the inputs which has a one in that row.
    • the NOT of each of the inputs which has a zero in that row.
    Now OR together all the circuits you've just built, and the output of the OR computes the function described in the truth table.
    For example, the circuit corresponding to the row given above is:

    Of course, if you use this method, each of the input switches will likely connect to several different gates. To connect from a switch to multiple gates in circuit maker, you can connect from the output wire from the switch to the inputs to other gates. You must use only 3 switches for the entire circuit.

    Circuitmaker documentation standards

    Each separate page of circuitmaker output diagram should have your name, date, and the name of the assignment (Majority in this case) in the upper left-hand corner.

    What to turn in:

    1. A copy of a complete truth table for the majority function, showing what output is given for each of the possible combinations of inputs.
    2. A printout of your circuit
    3. A grading cover sheet.
    4. In addition to the hard copy mentioned above, email your <username>_majority.ckt file to me at croyden@mathcs.holycross.edu