Fundamentals of Computer Systems Project 1
ECE 5484 (Fall 2019) Project 1 Page 1 of 7
Virginia Tech ECE 5484: Fundamentals of Computer Systems Fall 2019
Project 1 Assignment (updated 9/19/2019)
Preface
Before you start this project, please be sure that you have completed all of the following
activities.
Read the project all the way through before starting. For example, there are some
suggestions in the last section.
Complete all reading and watch all videos for Modules 1, 2, and 3. Ensure that you
understand number systems, codes, Boolean logic, and combinational logic circuits and
that you are familiar with Logisim.
Note the grading policies, including policies for submitting assignments, in the syllabus.
Review the course schedule. Note the due dates for course assignments including this
one.
Please note the following.
All submissions of graded work in this class are subject to the Graduate Honor System.
Work on this project is to be completely your own. You are welcome to discuss high-
level aspects of the project with others and you are encouraged to the Project 1
discussion area on the class website for this. Any questions concerning design details
must be directed to the instructor or teaching assistant.
Submit your assignment using the Assignments area of the class website. You must
submit your assignment by 11:55 p.m. on the due date.
1. Introduction
The objective of this project is to reinforce your understanding of binary codes, combinational
logic design, and logic simulation. You must:
a) design a combinational logic circuit that displays the decimal value of an Aiken (or
“2421”) code input according to the specifications given below;
b) debug and test your design by simulating it using the Logisim simulator; and
c) document your work in a short report.
2. Aiken Codes
Computer systems usually represent decimal and hexadecimal numbers in standard radix-2
form. The four bits representing a decimal or hexadecimal digit have weights 8-4-2-1. For
example, the value 9 decimal is represented as 1001 (18 + 04 + 02 + 11). Some systems
use different codes, with different weights for the digits, to achieve special properties.
Converters can translate from or to standard radix-2 representation.
ECE 5484 (Fall 2019) Project 1 Page 2 of 7
One example of such a special code is the Aiken (or 2421) code1 which uses weights 2-4-2-1
instead of 8-4-2-1 to represent decimal digits using four binary digits. Consider a decimal
number N with binary representation B using the Aiken code. Using the Aiken code, the 9’s
complement2 of N is represented in binary form as the 1’s complement of B. For example, the
decimal number 2 is represented as 0010 (just like in standard radix-2 representation). The 9’s
complement of 2 is 7. Using the Aiken code, 7 is represented as 1101 (and not 0111 as it is in
radix-2). Note that 1101 is the 1’s complement of 0010. The Aiken code makes it easier to
perform decimal arithmetic with the decimal digits represented in binary form. The Aiken code
is used in inherently decimal devices such as calculators and digital clocks. These devices use
decimal, rather than binary, arithmetic. Table I shows how decimal values 0 through 9 are
represented using the Aiken code as well as the standard binary (radix-2) code.
Table I. Decimal Values and Associated 4-bit Aiken Code and Standard Binary Code
Decimal
Digit
Aiken (2421)
Code
Binary (8421)
Code
0 0000 0000
1 0001 0001
2 0010 0010
3 0011 0011
4 0100 0100
5 1011 0101
6 1100 0110
7 1101 0111
8 1110 1000
9 1111 1001
One might think you could represent some decimal numbers in two different ways, such as
both 1011 and 0101 for decimal 5. But, the Aiken code is defined so that it maintains the
complementation property described above. Note that there are six combination of four bits
that are not included in the table as an Aiken code, namely 0101, 0110, 0111, 1000, 1001, and
1010. These six values are considered undefined or disallowed for the Aiken code.
3. Design Specification
You are to design a combinational logic circuit that accepts a decimal value represented as a
four-bit Aiken code (X3 X2 X1 X0) as its input and that creates a four-bit output (Y3 Y2 Y1 Y0) that
uses standard binary (radix-2) encoding to represent the same decimal value. In other words,
the circuit translates between the Aiken code input and the standard binary code output as
indicated in Table I. For example, if X3X2X1X0 = 1110, then output Y3Y2Y1Y0 = 1000.
1 More information is at https://en.wikipedia.org/wiki/Aiken_code. 2 For more information, see: https://www.geeksforgeeks.org/9s-complement-decimal-number/ and
https://en.wikipedia.org/wiki/Method_of_complements.
ECE 5484 (Fall 2019) Project 1 Page 3 of 7
Figure 1 provides a block diagram of the converter function.
Figure 1. Block diagram of the Aiken-to-binary code converter function.
Note that not all input combinations of X3 X2 X1 X0 will occur. The six disallowed inputs
described above will never be input to the circuit. In designing the logic circuit, we do not care
what the output values Y3 Y2 Y1 Y0 are for these six disallowed inputs since they never occur.
We can use these “don’t care” conditions to our advantage to simplify the design. We may be
able to reduce the amount of logic needed by assuming they are a logic 1 or a logic 0. In a truth
table, we use “X” to represent a don’t care value.
Note that Table I is not a true truth table, although it specifies all that we need to know to
create the truth tables for the four outputs (Y3 Y2 Y1 Y0). Table 1 specifies only 10 of the 16
possible input combinations of inputs X3 X2 X1 X0. From the discussion above, we know that we
can assign a don’t care, or “X,” output for the six disallowed input combinations.
For each of the four outputs, you can construct a standard truth table with inputs X3 X2 X1 X0
appearing in order from 0000, 0001, 0010, …, 1111. The 6 disallowed input combinations can
be specified as don’t cares. You can create a separate truth table for each output signal, or you
can merge the four truth tables into one truth table with four output columns for Y3 Y2 Y1 Y0.
For this project, you are not required to minimize the logic function or associated circuit, but
you may choose to do so. Reducing the complexity of the logic function will make the logic
circuit simpler and, hence, easier to simulate in Logisim.
4. Modeling the Circuit in Logisim
Use the Pin device in Logisim’s Wiring library to control the four inputs (X3 X2 X1 X0) to the
combinational circuit. The Pin device is also available on Logisim’s toolbar. Each pin can be
interactively set to 0 or 1 using Logisim’s Poke tool to test the circuit for different Aiken code
input values. If the proper connections are in place when Logisim is running, signals with logic
level 1 appear in bright green and signals with logic level 0 are shown in dark green.
The circuit’s four output bits should be used to control a hexadecimal display to show values 0
through 9, inclusive. Use the Hex Digit Display device in Logisim’s Input/Output library. It
accepts a 4-bit binary encoded value as input and displays the decimal digit. Note that the
display is capable of showing hexadecimal digits A through F, but these should not appear in
this circuit since the Aiken code inputs only represent digits 0 through 9. Use the Splitter device
in Logisim’s Wiring library to interface the four individual single bits produced by the
Aiken Code to
Binary Code Converter
X0
X1
X2
X3
Y0
X1
X2
X3
ECE 5484 (Fall 2019) Project 1 Page 4 of 7
combinational circuit (Y3 Y2 Y1 Y0) to the four-bit wide input to the Hex Digit Display. The Hex
Digit Display device has a second input to control the decimal (hexadecimal) point. The decimal
point input can be left unconnected.
Figure 2 shows a possible layout for part of the design to implement the output Y3. The
associated Logisim circuit file is provided with this assignment.
Figure 2. Possible circuit layout including logic to produce output Y3 (input is for
Aiken code value 1110 which produces binary output 1000 or decimal 8).
5. Simulation
After you create your design, use Logisim to simulate the code conversion circuit. You should
test all 10 possible valid input combinations (0 through 9) and verify that the correct values of
Y3, Y2, Y1, and Y0 are produced and that the correct decimal value is displayed.
ECE 5484 (Fall 2019) Project 1 Page 5 of 7
6. Submission
6.1. Report
You must document the design, simulation, and outcomes in a brief written report. Your report
should contain the following items.
At the top of the first page of your report, include: your name (as recorded by the
university); your email address; and the assignment name (e.g., “ECE 5484, Project 1”).
Do not include your Virginia Tech ID number or your social security number.
The body of the report must contain the following sections. Use section numbers and
headings to organize your report.
Section 1 – Objectives: Provide a brief summary of the design objectives and general approach
to the design.
Section 2 – Truth Table: Provide a truth table with inputs X3, X2, X1, and X0 and outputs Y3, Y2,
Y1, and Y0 (or you can provide four separate truth tables with one for each of the four outputs).
Each row should also be labeled with the corresponding hexadecimal value. The inputs should
be in standard truth table order, from “0000” down to “1111.” Thus, the truth table will look
similar to Table I above, but will have 16 rows instead of 10 and must be in the proper order.
Section 3 – Logic Expressions: Specify the Boolean logic expressions for Y3, Y2, Y1, and Y0. Show
any work that led to the expressions. Cite any tools you have may have used in deriving the
expressions. (Note that you can just state the expression for Y3 given above, assuming you
implement Y3 as shown in Figure 2.) The Boolean expressions shown in this section for the
report should correspond exactly to what is shown in the circuit diagram of the next section.
Section 4 – Circuit Design: Include a schematic diagram of the logic circuit that you created
using Logisim. Within Logisim, you can select Export Image from the File menu to produce an
image file that can then be incorporated into your report. Uncheck the “Printer View” box
when exporting the image from Logisim.
Show the circuit with input X3X2X1X0 = 1110 (decimal value 8) applied. For full credit, the
Logisim schematic must be neat and easy to read. The four input pins and the four output
signals should be labeled, as shown in Figure 2. The diagram should be labeled with a title, your
name, and the date.
Section 5 – Conclusions: Briefly discuss the outcome of your design and any problems or
aspects that do not work properly; what you learned by doing this project; and any experiences
that were particularly good or bad. Also, specify the approximate number of hours that you
devoted to the project. (The number of hours is just for the instructor to assess the suitability of
this project assignment.)
6.2. Submission
Carefully follow these instructions when submitting your project.
ECE 5484 (Fall 2019) Project 1 Page 6 of 7
Create a single PDF file for your report. Name the PDF file lastname_firstname_P1.pdf,
where lastname is your last or family name and firstname is your first or given name.
Submit this file.
Save your Logisim circuit with file name lastname_firstname_P1.circ. This file will be
used to test your design for grading. Submit this file in addition to the PDF report file.
Submit your assignment in the Assignments area of the class website. You must submit
both files by 11:55 p.m. on the due date.
7. Grading
The project will be evaluated based on the following criteria. Also, see the grading rubric on
the Project 1 assignment page on the class Canvas site.
Overall Presentation (15 points)
o Complete, clear, and well organized report
o Mechanics (spelling, grammar, etc.)
Technical Merit (40 points)
o Discussion of design objectives (Section 1)
o Correct and complete truth table (Section 2)
o Correct and complete logic expressions and brief discussion of how they were
derived (Section 3)
o Correct and complete circuit design that follows from the logic expressions
(Section 4)
o Brief discussion of conclusions (Section 5)
Correct operation (45 points)
o Correct operation as verified using the circuit simulation file
8. Suggestions and Tools
8.1. Design Process Hints
You need to use a systematic approach for this design and the project. Here are key steps and
some suggestions.
1) Be sure you understand the design objectives including how the Aiken code relates to
the standard binary code. Be sure you understand Table I.
2) Develop the truth table. Check the entries against Table I.
3) Develop the four expressions for the outputs. Try a few input combinations to be sure
that the outputs match the correct ones in your truth table and in Table I. Look at the
tools suggestions below before starting this step.
4) Create a circuit diagram in Logisim. Follow the instructions given in Section 4. Starting
with the provided circuit file is probably best although it is not required. Build the
circuit incrementally by creating the logic diagrams for one output at a time and testing
ECE 5484 (Fall 2019) Project 1 Page 7 of 7
to ensure that it operates correctly. After you have tested that output’s logic, add the
next to the diagram. Test the circuit thoroughly for all 10 valid input combinations.
5) Write your report and submit it and your circuit file.
8.1. Tools
While some work with pencil, paper, and brain power is needed (especially some brain power),
tools are also very helpful in the design and synthesis of logic functions and larger systems. For
this project, you can use any helpful tool that can take your work as input and create outputs to
help you complete the project. Be sure to cite any tools that you do use for any part of this
project other than Logisim (and Microsoft Word, Google Docs, or other word processing
software used to create the report itself). Here are some tools that you may find useful.
Logisim is a must. You should already have some experience using Logisim from
previous work in this class.
An online synthesis tool or a synthesis application you run on your computer may be
helpful. Here’s a specific tool that allows you to input a truth table (including “x” for
“don’t care” outputs) and outputs a Boolean expression.
Online Minimization of Boolean Functions: http://tma.main.jp/logic/index_en.html
You would need to use four-input truth table and run the tool four times, once for each
input. Remember the old saying, “garbage in, garbage out.” So, you will get correct
expressions from the tool only if the input truth table is correct.
Note that there are other tools and some may be better than this one, but this one is
very helpful.
Remembering another old saying, “Excel is the second best tool for everything,” you
may find Microsoft Excel is a useful tool for this project if you have good Excel skills. You
can create truth tables, convert between different bases, create logic functions, etc.
Other than Logisim, use of other tools is optional. But, you will likely other tools can be very
helpful in successfully completing this project.