cs lab questionbs 2

pdf

School

Drexel University *

*We aren’t endorsed by this school

Course

164

Subject

Computer Science

Date

Jan 9, 2024

Type

pdf

Pages

4

Uploaded by BrigadierMusicCobra20

Report
07/10/23, 10 : 10 PM CS-164 Lab Page 1 of 4 https://www.cs.drexel.edu/~bls96/cs164/labs/boollab_wi22.html Boolean Algebra Answer all questions in a plain text file named questions2.txt . At the top of your plain text file, include your name, abc123 user id, and lab section. Last week you learned how to use nano. Try using nano on Tux to answer these questions instead of using a GUI editor. Question 1 (5pts) Your first step in this lab is to complete the interactive tutorial on Boolean algebra found at this link . Were you successfully able to complete the tutorial? What issues did you have in completing it? What was the answer for Part 5? How did you figure out the answer? Question 2 (5pts) This question is gonna break the fourth wall a bit. This lab will require you to write boolean expressions. Given that you’re writing this documents, questions2.txt, in plain text, it’s difficult to express some of the boolean algebra symbols. For this question, you’ll be creating a “style guide” or “notation guide” that you will follow throughout the lab. Use whatever notation makes the most sense to you. While you are allowed to use whatever notation you please, you do have to follow some requirements: 1. Be Consistent. Don’t change notation part way through the lab 2. Be Clear. Use notation that resembles what we’ve used in class Quick examples of “good” and “bad” notation: Good : NOT AND OR XOR Good : ¬ Good : ~ ^ v o Good : x' xy x+y xOy Bad : z + x _ Question 3 (10pts)
07/10/23, 10 : 10 PM CS-164 Lab Page 2 of 4 https://www.cs.drexel.edu/~bls96/cs164/labs/boollab_wi22.html Open a window or tab with the digital logic workbench . Drag a DC component, a Toggle component, and an LED component into the workspace. Draw a connection between the open circle of the DC component and the yellow circle of the Toggle component. Then draw a connection between the open circle of the Toggle component to the yellow circle of the LED component. Describe what happens when you click on the button in the middle of the Toggle component. Question 4 (10pts) Modify your circuit so that you have an inverter between the toggle switch and the LED. How does the addition of the inverter change the behavior of the circuit? Question 5 (10pts) Wire up the half adder from the lecture slides. You'll need two toggle switches and two LEDs. You can remove components from your circuit by dragging them to the toolbar on the left. Also note that in this simulator, the exclusive-OR device is labeled EOR, rather than XOR. Use the toggle switches to try all combinations of input. Record the output values to create a truth table for both the sum and carry. DO NOT use the built in half- adder. To make your truth table, you can use ASCII art and characters like | and - and spacing to align your columns and rows. Your table can be as intricate and stylized or as simple and clean as you’d like, so long as it’s readable. NOTE OF WARNING The Tab key on your keyboard does not do what you think it does. While it may appear that the tab key will always add a set number of spaces. That is not the case. The tab key will instead advance your cursor to the next tab stop as set by your editor. For this reason we ask that you either consistently use tabs or consistently use spaces. You won’t be able to know if you’re using tabs or spaces with your standard GUI editor. If you follow this link , you can learn how to make white space visible in nano along with other settings. This is a bit of a long read, so I suggest doing this once you’re done the lab. Question 6 (10pts) Add a 4bit7seg device to your circuit. You should connect the top yellow circle of the display to the sum of your adder and the second one to the carry. What happens now when you go through all combinations of the toggle switch settings? Question 7 (10pts)
07/10/23, 10 : 10 PM CS-164 Lab Page 3 of 4 https://www.cs.drexel.edu/~bls96/cs164/labs/boollab_wi22.html Keep your adder circuit on your worksheet and create a separate circuit that implements the Boolean expression ¬(x ¬y). Verify your circuit by testing all combinations of inputs and enter the truth table here. Question 8 (15pts) A mathematician who was a contemporary of George Boole was Augustus DeMorgan. He was one of Ada Lovelace's mathematics tutors. DeMorgan is best known for the following two laws: ¬(x y) = ¬x ¬y ¬(x y) = ¬x ¬y Use these equalities to write a simpler version of the expression from the last question. It should involve one fewer NOT operators. Question 9 (10pts) Add a third circuit in the workbench that implements your simpler expression. Verify that it produces the correct results by generating a truth table and put it in the answer box. Question 10 - Circuit Website (15pts) You should now have three circuits on your worksheet: a half-adder with a display and two different circuits that compute the same Boolean function. You may notice that you can’t copy and paste that link to share your circuits. In order to “submit” your circuits to be graded, you need to create your own website. We will then look at the website you’ve created on tux to grade you. We will be looking for a file named boolean.html in your public_html directory. This means your file can be accessed and will be interactive at the link https://www.cs.drexel.edu/~userid/boolean.html . If we cannot access you circuits at that link, you will receive a 0. Follow the instuctions here to embed your circuit and build your website For “question 10” in your questions2.txt document, include your link to your boolean.html site. This would be the link https://cs.drexel.edu/~userid/boolean.html where userid is replaced
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
  • Access to all documents
  • Unlimited textbook solutions
  • 24/7 expert homework help
07/10/23, 10 : 10 PM CS-164 Lab Page 4 of 4 https://www.cs.drexel.edu/~bls96/cs164/labs/boollab_wi22.html by your abc123 Drexel student ID. Submission Conventions Exists on Tux (DO NOT Submit on BBLearn) https://cs.drexel.edu/~userid/boolean.html (15 pts) Submit on BBLearn questions2.txt : A plain text file with your answers to the questions (85 pts)