Assignment 5: Boolean Algebra

Transcription

Assignment 5: Boolean Algebra
Assignment 5: Boolean Algebra
March 31, 2015
Abstract
Assignment Five covers boolean algebra and computer hardware.
As with previous labs, you will need to complete a lab report. In this
lab report, you should write the introduction, method, results, discussion
and conclusion sections. Other sections will already be filled in for you.
For the results and discussions sections in the report template, you will
find headings for the individual tasks. Please fill in the details under
these headings, and leave the headings as they are. Note: the submission
deadline for this lab report is Wednesday, April 8th at midday. As
always, you must submit your lab report as a PDF file. Any late
submissions — without prior agreement of the course coordinator — will
be penalised with the penalty system discussed in the course outline.
NOTE: The University is closed between Friday, April 2nd
and Tuesday, April 7th. You should not expect to be able to get
access to Cotton 145 on these days.
1
Marks for the Assignment
Parts of the Assignment:
1. A Core part, which involves programming the Arduino to perform simple
tasks using the basic concepts and constructs,
2. A Completion part, which extends the Core part and involves more
difficult thinking and may cover additional concepts and constructs,
3. A Challenge part, which usually involves substantially more difficult
programming and problem solving, and 5. Documenting your work in a
formal Lab Report.
Successfully performing of all the Core tasks will enable you to get awarded
up to 65% of the lab marks. By successfully performing all the Completion
tasks enables you to be awarded a maximum of 80%, the Challenge tasks can
take you up to 100%. But simply performing the tasks will not ensure that you
get the marks. You must clearly document your work in a lab report, and you
must make sure you include code for every task with brief explanations in your
report.
1
Actual questions are
boxed:
Please note that the CORE , COMPLETION and CHALLENGE
tasks have a note attached to them guiding you as to which of the
Results or Discussion sections that you should write them in. You will
also need to write an introduction, method and conclusions section,
although these do not need to be broken down by specific tasks, and
you have more flexibility in how you structure you’re writing here.
However, you must adhere to the Task structure in the Results and
Discussion sections.
Some questions require you to submit a screenshot of the circuit you have
created. You can achieve this via the ”export image” feature in the ”file” menu
of Logisim, and you MUST include these screenshots in the PDF. DO NOT
submit them separately.
2
Core
Core 1
RESULTS Section:
Using logisim confirm truth tables of AND, OR and NOT gates. Run simulations.
Include a screen-shot of the circuit and truth tables in your report.
Core 2
RESULTS Section:
Using logisim confirm boolean identities A + A = 1 and A · A = 0. Run
simulations.
Include a screen-shot of the circuit and truth tables in your report.
Core 3
DISCUSSION Section:
Using logisim build XOR gate A · B + A · B Enter your circuit in Logisim.
Compare your results with the truth table for the Logisim library XOR gate.
Include a screen-shot of the circuit and truth tables in your report.
2
Core 4
RESULTS Section:
Using logisim confirm DeMorgan rules (A + B) = A · B and A · B = A + B .
Enter the circuit in Logisim for each equation.
Run simulations.
Confirm DeMorgan’s rule using the truth tables.
Include screen-shot of the circuit and truth tables in your report.
Core 5
RESULTS Section: Build a half adder in Logisim for two binary numbers,
where each binary number is one bit long.
Start from truth table and work your way to the circuit, explaining your reasoning.
Include a screen-shot of the circuit in your report.
3
3
Completion
Completion 1
RESULTS Section: Build a full adder in Logisim for two binary numbers, where
each binary number is two bits long.
Start from truth table and work your way to the circuit, explaining your reasoning.
Include a screen-shot of the circuit in your report.
Completion 2
DISCUSSION Section:
Derive the circuit to implement the following truth table, using Karnaugh Maps:
A
0
0
0
0
1
1
1
1
B
0
0
1
1
0
0
1
1
C
0
1
0
1
0
1
0
1
Y
1
1
0
0
1
0
0
0
Enter the circuits in Logisim for the equation.
Run simulations.
Check truth table.
Include a screen-shot of your circuit in your report, and discuss how Karnaugh
Maps can assist in this process.
4
4
Challenge
A 7-segment LED display can be used to display numbers and letter. Each
segment can be turned ON if 1 is provided for the corresponding input. You
Figure 1: LED display
can find pins description in Logisim help.
Challenge 1
DISCUSSION Section: Make a circuit that:
• takes 3 bits as an input
• converts number to decimal
• displays decimal number using LED
You can use any facilities of Logisim that are available Include screenshot of the circuit in your report, and discuss why it works.
5