Sie sind auf Seite 1von 8

MARK :

COURSE: COMPUTER ARCHITECTURE AND ORGANIZATION

TOPIC: DIGITAL SYSTEMS CODE: BCN1043

ASSESSMENT: ASSIGNMENT NO: 2 DURATION: -


-/-
Matric No :

Section :

In this laboratory, we will use digital circuit design software to explore some fundamental
components of digital circuits. Download LogiSim 2.7.1 by clicking
https://sourceforge.net/projects/circuit/

Part 1: Getting Started with LogiSim


Double click the download LogiSim. Take a look at the top of the window beneath the menus.
You should see some icons: a hand, an arrow, a line, the letter A, and digital logic gates. This
row of icons is also a sort of menu: you can click on one of them to activate it and then place
an item onto the drawing area of the LogiSim window to add them to a circuit you are building.

Exercise 1.1: Input switches


a. Let's start with the center icon, which is a green circle inside a square. Click on this
icon. Now you may click somewhere on the drawing area. You should find that this
creates a copy of the icon. This icon represents a switch, and it is used to specify an
input value to a circuit.
b. Click the "hand" from the row of icons to change into "simulation" mode. (This also tells
LogiSim that we do not want to draw any more input switches.)
c. Click in the inner square of the switch (on your drawing area) to see how it works. Each
time you click the switch, this should toggle a green "light" on and off inside the switch.
When the light is on, this means the input voltage is high (true or 1); when it is off, the
voltage is low (false or 0).

Exercise 1.2: Wires


a. Next let's experiment with adding wires to your circuit. To do this, click the arrow icon.
b. Move the mouse to the right side of your input switch where there is a green dot along
the side of the square. When you move your mouse there, you should see a green

1
circle appear. This tells you that when you click, it will begin connecting a wire from
that switch at that location.
c. Click and drag the mouse to the right to add a wire. Wherever you release the mouse
button will be the endpoint of the wire.
d. Click at the right endpoint of your wire and drag the mouse downward to add another
wire segment, releasing it where you like. Note that the green circle follows your
mouse, telling you where a wire would be attached if you were to click.
e. Continue clicking to add a few more wire segments.

Exercise 1.3: Moving Circuit Elements


a. Clicking the arrow from the icon menu (which you have already done) also allows you
to reposition elements in your circuit drawing.
b. You can now move your switch to a new location in the drawing area by simply clicking
and dragging it. Give it a try.
c. Unfortunately, you cannot move wires that way. Instead, you must click and drag your
mouse on the drawing window to draw a rectangle around the wires you want to move,
then lift the mouse button. Notice that the wires inside the box are now selected (white
boxes appear at their endpoints). You can move move all of the selected wires by
dragging one to a new location. (You probably won't need to move wires often, but
give it a try.)
d. To unselect these wires, click anywhere on the drawing area (except on another circuit
element).
e. Like many applications you may be used to, you can also select multiple circuit
elements (including wires), by holding down the Shift key as you click on them. Give
that a try.

Exercise 1.4: Deleting circuit elements


a. Now lets delete some or all of the wires you just drew. To do this, begin by selecting
some of the wires using either strategy given above. (Don't forget to make sure the
arrow from the icon menu is selected first!)
b. To delete the selected elements, simply type the "Delete" key. You may also use the
usual cut/copy/paste clipboard operations found under the edit menu.

Exercise 1.5: Output Pins (LEDs)


Another icon in the icon menu consists of two concentric circles (the inside being green). This
icon represents an LED (or light-emitting diode) that can be used to show the logical output of
a circuit you have drawn.

2
a. Place an output pin (LED) somewhere in your drawing area.
b. Draw a wire from your input switch to the LED.
c. Now click the input switch to turn it on and off. (Don't forget to switch to simulation
mode.) If your circuit is connected correctly, you should see the LED turn on and off
as well.
Similar to the light inside the switch, when the LED is on this indicates that it is receiving a
logical one, and when it is off this indicates a logical zero.

Exercise 1.6: Logic gates


a. Find the icon for an AND-Gate among the icons at the bottom of the window, and click
to drop a gate into your drawing area. If you have look carefully, you should see tiny
blue dots at each of the input and output points of the gate. These are points where
you can connect the gate to other elements of your circuit.
b. Connect two input switches to two input points of your AND-gate, and an LED to its
output point. You can do this by placing the various elements in direct contact with
each other, or by drawing wires between the points you want to connect.
c. Test all the possible input combinations (i.e., both switches off, switch one on and
switch two off, etc) to convince yourself that your circuit and the AND-gate are working
correctly.
d. Finally, do the same with both the OR-gate and the NOT-gate icons. (I.e., connect
each of these icons to input switches and LEDs, compare the result produce with their
respective truth table covered during lecture).

3
Part 2: Drawing the Digital Circuits
In this part, you will start drawing real circuits. You should begin by creating a new drawing:
select "New" from the File menu.

Exercise 2.1: three-input AND gate


a. Draw a circuit diagram that uses two AND-gates to create a "three-input AND-gate."
While the default AND-gates in LogiSim have several inputs, you should treat them as
if they only had two inputs.

b. Test your circuit by trying all eight input combinations (i.e., all inputs off, only 1 input on,
etc). Your output LED should only light up when all of the input switches are on.
c. Save your circuit by selecting "Save" from the File menu. Please give it the name AND-
3.circ.

Exercise 2.2: Circuit diagram output


a. Draw the digital circuit diagram shown in figure 1-a and figure 1-b.
b. Test your circuit by trying all the input combinations. Fill in the output produce into the
truth table (Table 1-a and Table 1-b)

Figure 1-a
Figure 1-b

4
Table 1-a Table 1-b
A B C D F A B C Q

c. Save both circuit by selecting "Save" from the File menu. Please give it the
name exerc2_2a.circ and exerc2_2b.circ

Exercise 2.3: Circuit Design Based on Truth Table


a. Write the Boolean function for the truth table shown in Table 2-a and Table 2-b.

b. Draw the circuit diagram with LogiSim based on the truth table shown in Table 2-a and
Table 2-b.

5
c. Test your circuit by trying all the input combinations, make sure the circuit produce the
output same as in the truth table (i.e. Table 2-a and Table 2-b)
d. Save both circuit by selecting "Save" from the File menu. Please give it the
name exerc2_3a.circ and exerc2_3b.circ

Table 2-a Table 2-b


A B C F A B C D F
0 0 0 1 0 0 0 0 1
0 0 1 1 0 0 0 1 0
0 1 0 1 0 0 1 0 0
0 1 1 1 0 0 1 1 1
1 0 0 1 0 1 0 0 1
1 0 1 0 0 1 0 1 0
1 1 0 1 0 1 1 0 1
1 1 1 0 0 1 1 1 1
1 0 0 0 1
1 0 0 1 0
1 0 1 0 0
1 0 1 1 0
1 1 0 0 1
1 1 0 1 0
1 1 1 0 0
1 1 1 1 0

6
Exercise 2.4: Simplification
a. Referring to the Boolean identities table (as discuss during lecture), simplify the
Boolean function in Exercise 2.3 (a).

b. Using Karnaugh Map, simplify the Boolean function produce in Exercise 2.3 (a).

7
c. Draw the circuit diagram with LogiSim based on the answer in 2.4(a) and 2.4(b).

d. Test your circuit by trying all the input combinations, make sure the circuit produce the
output same as in the truth table (i.e. Table 2-a and Table 2-b)
e. Save both circuit by selecting "Save" from the File menu.
f. Finally, draw the circuit diagram using NAND gate with LogiSim based on the answer
produce in 2.4(c)

Das könnte Ihnen auch gefallen