Assignments | Course Home | Schedule & Lecture Notes | Submit

Saint Louis University

Computer Science 140
Introduction to Computer Science

Michael Goldwasser

Fall 2006

Dept. of Math & Computer Science

Assignment ÿØÿ

Data Representation and Compression

Contents:


Overview

Topic: Gates and Circuits
Related Reading: Ch. 1.1 and notes
Due: 8pm Wednesday, 27 September 2006


Internet Requirements

For this assignment, we will rely heavily on the Logic Simulator software demonstrated in class. You will need to have an external Internet connection to run this software.


Practice Problems


Problems to be Submitted (20 points)

  1. (4 points)

    A three-way majority circuit is one with three inputs and a single output which is set to 1 whenever two or more of the inputs are set to 1.

    There are eight possible combinations for the input settings. Please give a truth table which lists all eight combinations along with the output setting for each case.

  2. (3 points)

    Complete Chapter Review Problem 1 of Ch. 1 (p. 71), however we want you to give a truth table showing the result for each input setting. When giving your answer, let's refer to the top switch as "A" and the bottom as "B" and the output as "OUTPUT", and so your answer might be formatted as the following simple table:

    ABOutput
    00?
    01?
    10?
    11?

    You should give a separate truth table for each of the three circuits given.

  3. (3 points)

    Complete Chapter Review Problem 2 of Ch. 1 (p. 71). Note well that you are to identify all possible input combinations that produce an output of 1. When giving your answer, let's refer to the top switch as "A" and the bottom as "B".

  4. (6 points)

    Complete Chapter Review Problem 3 of Ch. 1 (p. 71). However instead of doing this on paper, use the Logic Simulator software to construct the circuit. Save your three circuit in individual files, 3a.dat, 3b.dat, 3c.dat respectively and submit those files.

  5. (4 points)

    Construct a circuit which implements the three-way majority function discussed in the previous question, while using the Logic Simulator software. After testing its validity, save it in a file named Majority.dat for submission.

Please type your answers to questions A, B and C in a single document to be submitted electronically. Submit the Logic Simulator files for problems D and E as well. Please see details about the submission process.


Extra Credit (3 points)

Interestingly, any given boolean function can be calculated by a circuit consisting solely of NAND gates. Demonstrate this fact by example, re-create a working "half-adder" circuit using only NAND gates. You should Submit a Logic Simulator file named Extra.dat with your solution.

Please make sure to verify that your circuit produces the expected output in all possible cases. For reference, our original half-adder circuit was demonstrated in class and is available for download.


CSCI 140, Fall 2006
Michael Goldwasser
goldwamh at our university domain

Last modified: Wednesday, 20 September 2006
Assignments | Course Home | Schedule & Lecture Notes | Submit