7
Name: Cameron O'Neal Date: 2/19/14 CS270 Homework Assignment 2 (HW2) Due Saturday, February 22, 11:59pm, under door COMSC 256, no late submissions. Homework and programming assignments are to be done individually. Goals To understand transistor basics, logic gates (NOT, NAND, NOR), DeMorgan's Law, decoders, multiplexers, and combinational logic. This assignment requires the use of a logic simulator called Logisim, which will be explained in class and practiced in the recitation. The Logisim web page, tutorial, and software is linked to the class web page. To run the Logisim software, type the following: $ ~cs270/logisim/logisim The Assignment Question 1 (5 points): Fill in the table below with open or closed based on the transistor type and gate input: Input n-type p-type 1 closed open 0 open closed Question 2 (10 points): Using the diagram below, fill in the truth table with the values of C and the state of each transistor (open or closed) for each set of inputs. T1, T2, and T5 are p-type transistors, and T3, T4, and T6 are n-type. What is the logical function of this gate? ________AND gate_______________ Spring Semester 2014 CS270 Homework Assignment 2 1

HW2

Embed Size (px)

DESCRIPTION

Assembly programming very interesting LC3 computer SC HW2

Citation preview

Page 1: HW2

Name: Cameron O'Neal Date: 2/19/14

CS270 Homework Assignment 2 (HW2)

Due Saturday, February 22, 11:59pm, under door COMSC 256, no late submissions.Homework and programming assignments are to be done individually.

Goals

To understand transistor basics, logic gates (NOT, NAND, NOR), DeMorgan's Law, decoders, multiplexers, and combinational logic. This assignment requires the use of a logic simulator called Logisim, which will be explained in class and practiced in the recitation. The Logisim web page, tutorial, and software is linked to the class web page. To run the Logisim software, type the following: $ ~cs270/logisim/logisim

The Assignment

Question 1 (5 points): Fill in the table below with open or closed based on the transistor type and gate input:

Input n-type p-type1 closed open0 open closed

Question 2 (10 points): Using the diagram below, fill in the truth table with the values of C and the state of each transistor (open or closed) for each set of inputs. T1, T2, and T5 are p-type transistors, and T3, T4, and T6 are n-type. What is the logical function of this gate? ________AND gate_______________

A B C T1 T2 T3 T4 T5 T60 0 0 Closed Closed Open Open Open Closed0 1 0 Closed Open Open Closed Open Closed1 0 0 Open Closed Closed Open Open Closed1 1 1 Open Open Closed Closed Closed Open

Spring Semester 2014 CS270 Homework Assignment 2 1

Page 2: HW2

Question 3 (10 points): Wikipedia describes De Morgan’s laws (http://en.wikipedia.org/wiki/De_Morgan%27s_laws):In formal logic, De Morgan's laws are rules relating the logical operators "and" and "or" in terms of each other via negation, namely:

NOT (P OR Q) = (NOT P) AND (NOT Q) NOT (P AND Q) = (NOT P) OR (NOT Q)

Fill in the truth table below that summarizes the second law shown above.

P Q P AND Q NOT(P AND Q) NOT P NOT Q (NOT P) OR (NOT Q)0 0 0 1 1 1 10 1 0 1 1 0 11 0 0 1 0 1 11 1 1 0 0 0 0

Question 4 (15 points): Design a 4-input, 1-output multiplexer using Logisim, and turn in a schematic and a truth table. How many select lines are required? __________TWO___________

Spring Semester 2014 CS270 Homework Assignment 2 2

Page 3: HW2

Question 5 (15 points): Fill in the truth table for the following combinational circuit. The inputs are A, B, and C, and the outputs are M, N, O, X, and Y. Design the circuit in Logisim and turn in the schematic, making sure the truth table matches.

A B C M N O X Y0 0 0 1 1 0 0 10 0 1 1 1 0 0 10 1 0 0 1 0 0 10 1 1 0 0 1 1 01 0 0 1 1 0 0 11 0 1 1 1 0 0 11 1 0 1 1 0 0 11 1 1 1 0 0 0 1

.

Spring Semester 2014 CS270 Homework Assignment 2 3

Page 4: HW2

Question 6 (20 points): Design a combinational circuit for the following truth table. Inputs are A, B, and C, and the outputs are X and Y. Use the methodology described in Section 3.3.4 of the textbook, which employs successive arrays of AND and

OR gates. Design the circuit in Logisim and turn in the schematic below, making sure the truth table matches. Does this circuit resemble a decoder (yes or no)? __________Yes_____________

A B C X Y0 0 0 1 00 0 1 1 00 1 0 1 00 1 1 1 11 0 0 0 01 0 1 0 11 1 0 0 01 1 1 0 0

Spring Semester 2014 CS270 Homework Assignment 2 4

Page 5: HW2

Submission Instructions

All homework assignments should be handed in on paper to my office, which is in COMSC 256. Logisim can export circuits as .gif/.png/.jpg images, please submit a picture for each circuit. After printing your circuits, you can cut and paste to this document, which is in Microsoft word format, then please print the homework for submission.

Spring Semester 2014 CS270 Homework Assignment 2 5

Page 6: HW2

Question 7 (25 points):

Design an exclusive-or (XOR) gate using complementary n-type and p-type transistors in a series-parallel circuit. First, show the desired truth table of the gate (5 points), then show the complete design of the circuit with inputs A and B and output C (20 points). Hint: a straightforward design of the gate requires 8 transistors, including 4 each of n-type and p-type.

A B C0 0 00 1 11 0 11 1 0

Spring Semester 2014 CS270 Homework Assignment 2 6