CS 202 Fall 2011: Boolean Logic Practice

Boolean Logic Practice

The purpose of these questions is to help you explore the relationships between boolean expressions, truth tables, and circuits.

For these questions, you should use only the AND, OR, and NOT operators. You should feel free to draw AND and OR gates with more than two inputs. You may also draw inverters as simple circles before or after other gates. You do not optimize any circuits (i.e., you do not need to reduce the number of gates used); you should draw each circuit in the most straight-forward way possible.

  1. Consider the following boolean expression with three input variables: (NOT a) OR (b AND c).
    1. Draw the combinational circuit that most directly corresponds to the boolean expression.
    2. Draw the corresponding complete truth table.
  2. Consider a function of three inputs (a, b, and c) and a single output x that has the following truth table.
    a b c x
    0 0 0 0
    0 0 1 0
    0 1 0 1
    0 1 1 0
    1 0 0 1
    1 0 1 0
    1 1 0 0
    1 1 1 1
    1. Using the sum-of-products algorithm, what is the boolean expression for the output x?
    2. Draw the corresponding combinational circuit.
  3. Consider a function that implements an exclusive-OR (i.e., XOR). This functions has two inputs and a single output. The output should be 1 if and only if exactly one of the two inputs has a value of 1.
    1. Draw the complete truth table for an exclusive-OR circuit.
    2. Draw the corresponding combinational circuit.
  4. Consider a majority-rules circuit. This is a circuit that has three inputs and one output. The value of its output is 1 if and only if two or more of its inputs are 1; otherwise, the output of the circuit is 0. For example, if the three inputs are 0, 1, 1, then your circuit should output a 1. If its three inputs are 0, 1, 0, then it should output a 0.

    This type of circuit is frequently used in fault-tolerant computing for environments where a computer must keep working correctly no matter what (e.g., in a deep-space vehicle where repairs are impossible). In these conditions, one might put three computers on board and have all three do every computation; if two or more of the computers produce the same answer, then we accept it. Thus, one of the machines can fail and the system still works works correctly.

    1. Draw the complete truth table for a majority-rules circuit.
    2. Draw the corresponding combinational circuit.
  5. Add together the following two 4-bit binary numbers, A and B; your answers should be given in binary (using 5 bits). (You do not need to draw any circuits this time!)
    1. A = 0001; B = 0100
    2. A = 0101; B = 0101
    3. A = 1001; B = 1011
    4. A = 1111; B = 0001
    5. A = 1111; B = 0101
    6. A = 1111; B = 1111

Menu

Fall 2010
Time: MWF 9:55-10:45
Room: 1221 CS
Lab: 1370 CS (1st floor)


Instructor:
Prof Andrea Arpaci-Dusseau
Office Hours
Mon 11-12, Wed 11-12
Office:
7375 Computer Sciences
Email: dusseau "at" cs.wisc.edu

  • CS202 Home
  • TAs and Lab Hours
  • Lecture Schedule w/ Slides
  • Grading
  • Homeworks
  • Projects
  • Exams
  • Scratch Examples
  • Readings
  • Computing Resources
  • Outreach Opportunity
  • Interesting Links
  • Scratch
  • UW Computer Sciences Dept