10

Click here to load reader

Building Blocks CS 1308 Computer Literacy and the Internet

Embed Size (px)

DESCRIPTION

Designing the circuit from truth table abOutput We ignore the outputs that result in 0.

Citation preview

Page 1: Building Blocks CS 1308 Computer Literacy and the Internet

Building BlocksBuilding BlocksCS 1308 Computer Literacy and CS 1308 Computer Literacy and

the Internetthe Internet

Page 2: Building Blocks CS 1308 Computer Literacy and the Internet

Problem statement: Problem statement: The circuit The circuit should return true (the light should should return true (the light should come on) if both inputs are equal.come on) if both inputs are equal.

Example problem: Example problem: Compare-Compare-for-equality Circuit (1 Bit CE)for-equality Circuit (1 Bit CE)

Page 3: Building Blocks CS 1308 Computer Literacy and the Internet

Designing the circuit from truth Designing the circuit from truth tabletable

aa bb OutputOutput00 00 1100 11 0011 00 0011 11 11

We ignore the outputs that result in 0.

Page 4: Building Blocks CS 1308 Computer Literacy and the Internet

Problem statement: Problem statement: The circuit The circuit should return true (the light should return true (the light should come on) if both inputs are should come on) if both inputs are equal.equal.

Example problem: Example problem: Compare-for-equality Compare-for-equality

Circuit (1 Bit CE)Circuit (1 Bit CE)

Page 6: Building Blocks CS 1308 Computer Literacy and the Internet

How to create this design? How to create this design? (cont.)(cont.)

• Switches are inputs. Drag two of them to the drawing area.

• Drag the needed AND, OR, and NOT gates

Page 7: Building Blocks CS 1308 Computer Literacy and the Internet

How to create this design? How to create this design? (cont.)(cont.)

• Light is output, drag one.

• Use the wire to connect gates in the circuit.

Use this tool to remove wires or gates

Page 8: Building Blocks CS 1308 Computer Literacy and the Internet

Test your designTest your design

• Run your circuit.

• Specify the input by turning the switches on (1) and off (0). Click on the switches to turn them on and off. The picture is showing a=0, b=1, and as expected the light is off (0).

a

b

Page 9: Building Blocks CS 1308 Computer Literacy and the Internet

Creating the Not EqualsCreating the Not Equals

Now that you have seen how the tool Now that you have seen how the tool works on the example “equals” problem. works on the example “equals” problem. Create a circuit that will decide if two bits Create a circuit that will decide if two bits are Not Equals.are Not Equals.

The light should come on if the two inputs The light should come on if the two inputs are different.are different.

Page 10: Building Blocks CS 1308 Computer Literacy and the Internet

Save your DesignSave your Design1. After you have created the circuit and tested it, press "Save

As..." and save the file as "NotEquals.DAT". (You can save it to the desktop.)

2. Copy the file to a flash drive or use SSH to move it to the network for safe keeping.