ex Introduce yourself and work with digital logic gates.

Read Orange Boxes

Well actually, read everything, but these call out important pieces, traps to avoid, etc.

Each CS 240 assignment will include basic info at the top, describing due dates (and any intermediate checkpoints), how to submit your work, a list of links to the reading topics that are good reference for the assignment, and an indication of what collaboration is allowed.

Introductions

Visit Ben during office hours or an appointment before the third class meeting to introduce yourself and chat for a couple minutes about:

  • your name and pronouns (Call me “Ben,” he/him/his. I also answer to “Professor…”, but with lag time to realize you mean me.);
  • CS courses you have taken, are taking, or hope to take in the future;
  • excitement, concerns, or questions about this course;
  • the last CS-related item you saw in the news;
  • something non-academic about you that is unlikely to be true about any of your CS 240 classmates.

Feel free to come individually or with other students. You should also ask me to answer these questions myself…

Exercises

  1. A logician walks into a coffee shop and says, “I want a large quadruple shot chai french press americano or a small soy mocha earl grey espresso and a blueberry scone.” The barista has not taken CS 240 yet, so they are ambivalent about whether “and” has precedence over “or.” In their eyes, one interpretation is as good as the other. Which of the following might the logician receive? (Note that English “or” means “exclusive or.”)

    1. Just a large quadruple shot chai french press americano
    2. Just a small soy mocha earl grey espresso.
    3. Just a blueberry scone.
    4. Both a large quadruple shot chai french press americano and a blueberry scone.
    5. Both a small soy mocha earl grey espresso and a blueberry scone.
    6. Both a large quadruple shot chai french press americano and a small soy mocha earl grey espresso.
    7. All three.
    8. Nothing. The barista snubs the logician for inventing bogus hot drinks.
  2. Our assumption in this course is that logical “and” does take precedence over logical “or” and logical “or” is always “inclusive or” unless stated explicitly to the contrary. Which of the choices given in the previous question are valid interpretations of the order under these assumptions?

  3. Write truth tables and unsimplified Boolean expressions for each of the output signals F1 and F2 in the following circuit. Create the boolean expressions via a direct translation of the circuit.

    ciruit.png

    Please draw your truth table in the following order.

    A B C   F2 F1
    0 0 0      
    0 0 1      
    0 1 0      
    0 1 1      
    1 0 0      
    1 0 1      
    1 1 0      
    1 1 1      
  4. Draw unsimplified circuits to implement the following Boolean expressions. We use the apostrophe’ notation as an alternative to the overbar to indicate logical negation of the preceding term. The apostrophe binds tightly. For example, AB’ means (A)(B’).

    1. (A + B)(A + B’)
    2. ABC + A’B + ABC’
    3. A’B’ + A’BC’ + (A + C’)’
  5. Use a truth table to show that P = (P AND Q) OR (P AND NOT Q). Show columns for the subexpressions and the final expression.

  6. Write a Boolean expression and draw a circuit in sum-of-products form for the output Y of this truth table.

    A B C   Y
    0 0 0   1
    0 0 1   0
    0 1 0   1
    0 1 1   0
    1 0 0   1
    1 0 1   1
    1 1 0   0
    1 1 1   1
  7. Using elementary rules of Boolean algebra, find the simplest equivalent of the Boolean expressions below using only products, sums, and negation (i.e., no XOR). Show your derivation step by step. Label each step with the name of the rule you apply.

    1. (A + B)(A + B’)
    2. ABC + A’B + ABC’
    3. A’B’ + A’BC’ + (A + C’)’
    4. A’B’C’D’ + AB’C’ + AB’CD’ + ABD + A’B’CD’ + BC’D + A’
    5. Extra Credit Challenge: Feel free to do similar steps all at once for this one.
      ABC + ABD + ABE + ACD + ACE + (A + D + E)’ + B’C’D + B’C’E + B’D’E’ + C’D’E’
  8. Draw circuits for the simplified Boolean expressions from the previous problem.

  9. Draw two circuits that implement two-input XOR, one of which (a) uses only NAND gates, and the other (b) uses only NOR gates. Use the smallest number of gates you can.