Name:______Date:______

CS270HomeworkAssignment2(HW2)

Due Saturday, February 22, 11:59pm, under door COMSC 256, no late submissions.

Homeworkandprogrammingassignmentsaretobedoneindividually.

Goals

Tounderstandtransistorbasics,logicgates(NOT,NAND,NOR),DeMorgan'sLaw,decoders,multiplexers,andcombinationallogic.ThisassignmentrequirestheuseofalogicsimulatorcalledLogisim,whichwillbeexplainedinclassandpracticedintherecitation.TheLogisimwebpage,tutorial,andsoftwareislinkedtotheclasswebpage.ToruntheLogisimsoftware,typethefollowing:$~cs270/logisim/logisim

TheAssignment

Question1(5points):Fillinthetablebelowwithopenorclosedbasedonthetransistortypeandgateinput:

Input / n-type / p-type
1
0

Question2(10points):Usingthediagrambelow,fillinthetruthtablewiththevaluesofCandthestateofeachtransistor(openorclosed)foreachsetofinputs.T1,T2,andT5arep-typetransistors,andT3,T4,andT6aren-type.Whatisthelogicalfunctionofthisgate?______

A / B / C / T1 / T2 / T3 / T4 / T5 / T6
0 / 0
0 / 1 / Closed / Closed
1 / 0 / 0 / Open
1 / 1 / Open

Question3(10points):

WikipediadescribesDeMorgan’slaws(

Informallogic,DeMorgan'slawsarerulesrelatingthelogicaloperators"and"and"or"intermsofeachothervianegation,namely:

NOT(PORQ)=(NOTP)AND(NOTQ)

NOT(PANDQ)=(NOTP)OR(NOTQ)

Fillinthetruthtablebelowthatsummarizesthesecondlawshownabove.

P / Q / PANDQ / NOT(PANDQ) / NOTP / NOTQ / (NOTP)OR(NOTQ)
0 / 0 / 1
0 / 1 / 0
1 / 0 / 0
1 / 1 / 0

Question4 (15points):Designa4-input,1-outputmultiplexerusingLogisim,andturninaschematic.Howmanyselectlinesarerequired? ______

Question5(15points):Fillinthetruthtableforthefollowingcombinationalcircuit.TheinputsareA,B,andC,andtheoutputsareM,N,O,X,andY.DesignthecircuitinLogisimandturnintheschematic,makingsurethetruthtablematches.


A / B / C / M / N / O / X / Y
0 / 0 / 0
0 / 0 / 1 / 1
0 / 1 / 0 / 0 / 1
0 / 1 / 1
1 / 0 / 0 / 0
1 / 0 / 1
1 / 1 / 0
1 / 1 / 1 / 0

Question6 (20points):Designacombinationalcircuitforthefollowingtruthtable.InputsareA,B,andC,andtheoutputsareXandY.UsethemethodologydescribedinSection3.3.4ofthetextbook,whichemployssuccessivearraysofANDandORgates.DesignthecircuitinLogisimandturnintheschematic below,makingsurethetruthtablematches.Doesthiscircuitresembleadecoder (yes or no)? ______

A / B / C / X / Y
0 / 0 / 0 / 1 / 0
0 / 0 / 1 / 1 / 0
0 / 1 / 0 / 1 / 0
0 / 1 / 1 / 1 / 1
1 / 0 / 0 / 0 / 0
1 / 0 / 1 / 0 / 1
1 / 1 / 0 / 0 / 0
1 / 1 / 1 / 0 / 0

SubmissionInstructions

Allhomeworkassignments should be handedin on paper to my office, which is in COMSC 256. Logisimcanexportcircuitsas.gif/.png/.jpg images,pleasesubmitapictureforeachcircuit.Afterprintingyourcircuits,youcancutandpastetothisdocument, which is in Microsoft word format, then please print the homework for submission.

Question7(25points):

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 / C
0 / 0 / 0
0 / 1
1 / 0
1 / 1

1

Spring Semester 2014 CS270 Homework Assignment 2