Through the Entrance Gates
ex Introduce yourself and work with digital logic gates.
 Assign: Thursday, 26 January
 Due: at the start of class Thursday, 2 February
 Collaboration: individual ex assignment policy, as defined by the syllabus and honor code.
 Submit: Bring a typed or neatly handwritten paper copy of this standard answer sheet to class.
 Relevant Reference:
Well actually, read everything, but these call out important pieces, traps to avoid, etc.
Each CS 240 assignment includes an assignment manifest with basic info at the top, describing due dates (and any intermediate checkpoints), an indication of what collaboration is allowed, how to submit your work, and a list of links to the class/reading topics that are good reference for the assignment.
Introductions
Visit your lecture instructor 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;
 We are “Ashley” (she/her/hers), “Ben” (he/him/his), “Jean” (she/her/hers).
 “Professor…” may also work. Results may vary.
 CS courses you have taken, are taking, or hope to take in the future;
 excitement, concerns, or questions about this course;
 the last CSrelated item you saw in the news;
 something nonacademic 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 us to answer these questions too…
Exercises
Please download, print (2sided), and write your answers on this standard sheet to help us grade and provide feedback to you faster.

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.”)
 Just a large quadruple shot chai french press americano
 Just a small soy mocha earl grey espresso.
 Just a blueberry scone.
 Both a large quadruple shot chai french press americano and a blueberry scone.
 Both a small soy mocha earl grey espresso and a blueberry scone.
 Both a large quadruple shot chai french press americano and a small soy mocha earl grey espresso.
 All three.
 Nothing. The barista snubs the logician for inventing bogus hot drinks.

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?

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.
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 
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’).
 (A + B)(A + B’)
 ABC + A’B + ABC’
 A’B’ + A’BC’ + (A + C’)’

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.

Write a Boolean expression and draw a circuit in sumofproducts 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 
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. You may find this sheet of Boolean laws useful.
 (A + B)(A + B’)
 ABC + A’B + ABC’
 A’B’ + A’BC’ + (A + C’)’
 [Harder!] A’B’C’D’ + AB’C’ + AB’CD’ + ABD + A’B’CD’ + BC’D + A’
 [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’

Draw circuits for the simplified Boolean expressions from the previous problem.

Draw two circuits that implement twoinput 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.