0% found this document useful (0 votes)
3 views8 pages

Digital Logic Tutorial 1

The document outlines a lab session focused on digital logic design using the 'Digital Works' software tool. It aims to familiarize students with basic digital logic concepts, truth-tables, and simulation of logic circuits. The lab includes exercises involving various logic circuits, truth-table completion, and understanding the functions of different digital logic components.

Uploaded by

sybella597
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
3 views8 pages

Digital Logic Tutorial 1

The document outlines a lab session focused on digital logic design using the 'Digital Works' software tool. It aims to familiarize students with basic digital logic concepts, truth-tables, and simulation of logic circuits. The lab includes exercises involving various logic circuits, truth-table completion, and understanding the functions of different digital logic components.

Uploaded by

sybella597
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd

Investigating Digital Logic 1

Objectives
At the end of this lab you should be able to

 To gain an appreciation of a typical digital logic design tool


 To gain an appreciation of basic digital logic simulation
 To develop and experience a better understanding of truth-tables
 To observe and familiarise with basic digital logic building blocks
 To experiment with basic digital logic building blocks

Introduction

Today’s digital logic designers do not design complex components by hand. Software
tools have been created which will do this much faster and with high degree of
accuracy. They will enable a designer to test and verify his designs without the need
to resort to any wiring or using a soldering iron. Once a design functions as specified,
then the designed product can be manufactured.

A digital logic design software tool has two main functions: 1) capturing the logic
circuit, 2) simulating the logic. Capturing is the process of physically laying out the
basic building blocks on a drawing area and interconnecting them in order to achieve
a desired functionality. Simulation is the process of applying input signals to a logic
circuit and observing the output signals from it. If for all combinations of inputs the
outputs produce the expected results, i.e. as specified in a truth-table, then the
circuit is deemed to be functioning correctly.

“Digital Works” – A great digital logic design tool

About the tool

This is a Windows-based software tool, which is capable of both capturing and


simulating digital logic circuits. It was developed by David John Barker, at Teesside
University, primarily for educational purposes. However, it is powerful enough to
carry out serious digital logic design. Version 2 has been freely available.

In this lab session, we’ll use this tool to become familiar with the basic logic building
blocks, to demonstrate some basic logic circuits and to re-produce the truth-tables
by running the simulation tool. You’ll require some basic information in order to
enable you to use this tool. The information below should provide this basic
information, so please make sure you read it. The exercises below assume that you
are familiar with the basic functions of this tool.

1
Using the tool

You’ll be provided with all the software required by this tutorial. Once the main
window appears the exercises can then be attempted. The sample projects are in the
directory Lab Samples.

During the lab exercises you’ll be presented with some simple logic circuits to work
with. This will involve running the simulator and observing the output signals for all
combinations of input signals. In digital logic, all signals are identified as logic values
T (TRUE) or F (FALSE), or alternatively 1 or 0 respectively. So, if an input or an output
is present, then it is regarded as a T or 1; otherwise it is an F or 0. In this simulator,
inputs with signals present will turn red in colour and outputs with signals present
will turn green in colour. Don’t hesitate to ask if you have any questions…

DigitalWorks software functions in two different modes: 1) Capture and 2)


Simulation. In the Capture mode, you use the tool’s library of components and the
wiring tool in order to create a logic circuit. Image 1 shows the components toolbar.

NOT gate Wiring tool


OR gate Input connector
AND gate Labelling tool
Output connector
Image 1 – Library of components

In the Simulation mode, you can apply logic values (1 and 0) to each inputs and
observe the output levels (o or 1) corresponding to the input levels. This way you can
test your logic circuit’s validity. You can enter the simulation mode by selecting the
buttons on another toolbar the image of which is shown in Image 2 below.

Image 2 – Modes
Simulation
of operation Capture
mode
Stop mode
Simulation Toggles input
To capture you need to make sure the simulation
mode
is stoppedinand the arrow button is
simulation
selected. To simulate you need to select the simulation mode and if you require
mode
entering inputs you first need to select the hand button. The hand icon will be used
to toggle inputs from 0 (indicated by no colour at input) to 1 (red colour) and from 1
to 0 logic values. In the Simulation mode in order to apply input(s) to the logic gate(s)
you need to place the finger of the hand icon on the desired input(s) and click. If
there is no input at the time of clicking then the input will go red meaning input
signal is available otherwise it will go from red to blank meaning no input signal is
available.

2
What you need to do

The exercises are in two parts A and B. In part A you will be asked to apply all
combinations of inputs to each of the given logic circuits and will make note of the
outputs produced. You will then enter this information in the blank truth-tables
supplied. Having done this you will be asked some basic questions on the function of
the logic. In order to do this you’ll need to look at the outputs produced and try to
identify a pattern which will give you a clue as to what the logic is doing. You will also
be given a hint which you may find useful.

Just to help you a little, below is all the combinations of inputs available for two-
input logic and three-input logic:

2-input (A and B represent the 2 inputs):


2 inputs with binary values will have 22 = 4 outputs

A B
0 0
0 1
1 0
1 1
3-input (A, B and C represent the 3 inputs):
3 inputs with binary values will have 23 = 8 outputs
A B C
0 0 0
0 0 1
0 1 0
0 1 1
1 0 0
1 0 1
1 1 0
1 1 1

3
Exercises

1. Load the “[Link]” file. You’ll see a collection of basic digital logic
building blocks. They all have two inputs (small square rectangles) and single
outputs (small circles). Using the simulator, for all combinations of inputs,
observe the outputs and fill in the following truth tables.

A B C

Fig.1 Fig.2 Fig.3 Fig.4

Fig.5

Briefly explain what the relationships between 1 and 4, and 2 and 5 are? (Hint:
compare the outputs produced)

2. Load the “[Link]” file. Observe the way the basic building blocks are
interconnected. You can imagine how complicated this can get if the number of
the building blocks is doubled or tripled! In such cases, special software tools are
used to “wire” the circuit automatically. This circuit has 3 inputs and 1 output.
Run the simulator and observe the output for all combinations of the input
signals and fill in the following truth-table:

A B C P

4
This is an “Even Parity Detector/Generator” logic circuit. Briefly describe its
function below:

3. Load the “[Link]” file. You should see only two logic gates (another
name for the basic building blocks). This is a simpler circuit but what it does is
very important. It has 2 inputs and 2 outputs. Run the simulator and for all
combinations of input signals make note of the outputs and fill in the following
truth-table:

A B C S

This is a “Half-Adder” logic circuit. Briefly describe its function below and state
what the output labels S and C might stand for?

4. Load the “[Link]” file. Yet another relatively simple logic circuit. To
find out what it is doing, you must obtain its truth-table. By observing the pattern
of entries you may be able to guess what it is doing. So, make a note of the
outputs for all combinations of inputs and fill in the following truth-table:

V1 V0 S0 S1 S2 S3

This is a “2 to 4 Decoder” logic circuit. Briefly describe its function below:

5
5. Load the “[Link]” file. Here, there are 3 inputs and 1 output. We’ll do
something different with this circuit. We’ll construct two truth-tables. In one
case, the input S will be set to the logic level 1 and held at that. Then, for all
binary combinations of the other two inputs X and Y we’ll observe the
corresponding outputs and fill in the first table. Next, S will be set to logic level 0
and the above procedure for the other two inputs will be repeated. Record your
results in the following truth tables:

S X Y F
1 0 0 0
1 0 1 0
1 1 0 1
1 1 1 1

What is this circuit doing? What is the significance of input signal S (Select)?
(Hint: Ignore the last row, and consider when the output is a 1 in both cases)

The input SSS determines which input (XXX or YYY) is active and controls the output.
S=1S = 1S=1: Selects XXX.
S=0S = 0S=0: Selects YYY.
The select signal SSS is key to controlling which input signal influences the output.

6. Load the “[Link]” file. This should look familiar. It is a


single 7-segment display, which displays single digit numbers 0 to 9. The display
is driven by 10 8-bit binary value patterns stored in ROM locations 0 to 9. So, for
example, the bit pattern stored in location 5 is responsible for displaying the digit
5 on the display. Each bit in these binary values is used to switch on or off the
corresponding segments of the display, i.e. a bit with the value of 1 switches on
the segment; a bit with the value of 0 switches off the corresponding segment.
Notice that only the 7 bits of the 8-bit value is used to drive the display
segments, therefore the eighth bit is always set to 0.

Using inputs i0 to i3 apply some binary values and observe the displayed
corresponding numbers. For example, if you apply the binary value “1 1 1 0” to
these inputs, you should see the number 7 displayed. Notice only numbers 0 to 9
can be displayed this way. We’ll improve on this later!

Now, display the contents of the ROM by right-clicking on it and selecting the
menu item “Edit Memory Contents…” Carefully inspect the values stored in ROM
locations 0 to 9. From these work out which bits correspond to which display
segments and note this down in the boxes provided. When the bit corresponding
to a segment is a 1 then that segment is lit otherwise it is not lit.

The current arrangement can only display numbers 0 to 9. We now wish to use
this as a hexadecimal display so that we can display all 16 digits of the
hexadecimal numbering system, i.e. 0 to 9 and A to F. Since we have 4-bit binary
input, i.e. i0 to i3, and a ROM which can accommodate 16 8-bit binary numbers,

6
we ought to be able to do this. The goal is to store the correct 8-bit binary
patterns in ROM locations 10 to 15 in order to display the corresponding digits A
to F. To do this you need to edit ROM locations 10 to 15.

To edit a ROM location, make sure the simulation mode is off (click on the stop
icon on the third row) and select the object selector icon (the arrow). Right-click
on the ROM and select the “Edit Memory Contents…” menu item. Now, select
the ROM location you wish to edit. After editing, press the return button.
Continue editing other ROM locations until you are done and then click on the
OK button. The ROM should now contain the edited binary data. Test your new
binary data by applying the binary numbers corresponding to the new
hexadecimal digits A to F to the inputs i0 to i3, e.g. binary input value of “1 0 1 1”
should display D.

Enter in the table below the binary patterns for locations 10 to 15 which will be
used to produce the hex display digits A to F.

Note: The hex digits B and D will be displayed as lower case b and d otherwise
they can be mistaken for an 8 and a 0 respectively if displayed as capital letters.

7
ROM ROM value Hex
location Digit
10
11
12
13
14
15

Further Exercises (Optional)

If time allows, the following exercises can also be attempted. These will help widen
your understanding of digital logic and dispel any mystery about this very important
technology.

7. Load the “[Link]” file. This circuit is the basic building block of
data storage devices such as registers that behave like very fast memories (they
are not part of RAM). Registers are small memories within the CPU that store
temporary data when the CPU is making calculations or moving data about. Use
the simulator to explore it.

8. Now, start a new macro (click on File menu item followed by the New Macro
menu item). You’ll see a blank drawing area. Now place a building block from the
tool bar (just click on a shape and move to a location on the drawing area and
click again). You’ll see a larger image of the shape you selected. There will also be
input(s) and output(s). Put another building block (any will do). Now, experiment
with “wiring”. For this, you need to use the Wiring Tool in the tool bar (place
your mouse arrow on an item to display a tool tip). You can repeat these
processes until you manually construct your logic circuit.

You might also like