CSC270 Homework 1 2011

From dftwiki3
Revision as of 10:32, 28 January 2011 by Thiebaut (talk | contribs) (Problem #2)
Jump to: navigation, search

--D. Thiebaut 16:13, 27 January 2011 (EST)




This assignment is due Friday 2/4/11 at midnight. You will have to submit it electronically. No late assignment will be accepted. You can skip one assignment without penalty during the semester. This assignment must be done individually, and cannot be done in a group. Other assignments will give you a chance to work in pairs.

Problem #1

  • Write the most concise expression (as an equation using + . and the bar over a symbol) of the boolean function f( a, b, c ) = Σ(0, 1, 2, 3, 7 ).
  • Same question for g( a, b, c ) = Σ(0, 1, 2 )
  • Same question for h( a, b, c ) = Σ(0, 1, 2, 3, 4, 5, 6, 7 )
  • Same question for k( a, b, c ) = Σ(0, 1, 2, 3, 4, 6, 7 )
You may find the simplification rules illustrated here and here useful.
  • Include the code and the output of the program you will have used to check the validity of your answers in a file called hw1.txt. This file will contain the answers to all the questions. You will submit it as follows:
  submit hw1 hw1.txt
  • A convention used to write not a in a boolean expression when writing it in an electronic document is to use the quote (prime) after a. So if you need to write f = not (a + b ) . ( not a + not c ), write it as follows:
        f = ( a + b )'  . ( a' + c' )


Problem #2

  • What is the raw expression of the function f shown below? In other words, what is its direct translation of the diagram, without any simplification on your part? (Note the wire going from x to the second AND gate from the top should have a dot on it, to indicate that the signal is split from one wire to two.)
  • What is the most concise expression of f? In other words, use the same simplification rules as in the previous question and see if you can simplify the expression of f. Verify that the two expressions you come up with (if any) give the same answer by writing a program (or adding new code to your previous program).
  • What are the minterm and Maxterm canonical forms of f? Develop the Maxterm form of f wihout using the Π() notation, but instead representing it as a product of sums.
  • Append your answer to the same hw1.txt file, and include the program and its output.




CSC270LogicCircuitHomework1.jpg

Note

  • You may find this CSC103 lab of interest. It shows how to use a very simple circuit simulator to test logic designs.

Problem #3

  • What are the Maxterm canonical forms of the functions of Problem #1? Show the result in two different format, one using Π() and the other showing the function as a product of sums.
  • Append your answer to hw1.txt.

Submission

Working in your 270b-xx account

  • You can login to your 270b-xx account by ssh-ing to beowulf.csc.smith.edu to create the hw1.txt file. In this case, assuming that you are already using a Linux (or Mac) machine, you would type:
  ssh -Y 270b-xx@beowulf.csc.smith.edu


where xx represent your onw 2-letter Id.
  • Once logged in you can create the hw1.txt file with emacs:
  emacs hw1.txt 
  • If you are connected to beowulf from a Linux box, you should be able to use emacs in graphics mode. In this case open emacs this way:
  unalias emacs
  emacs hw1.txt &
the first command removes an alias that forces emacs to start with the -nw option (no window) when you call it. This way emacs will want to open up its own window where it will do syntax highlighting and be more easy to use. The second command forces emacs to run in the background (because you typed the & symbox), allowing you to type more commands in your terminal window while the emacs window is open.
  • When you're done editing hw1.txt, submit it as follows:
  submit hw1 hw1.txt


Note: You can submit your file as many times as you want. The last version will always erase the previous one.

Preparing the hw1.txt file on another machine

  • If you prefer to prepare your text file on another machine, just follow the steps above and copy/paste its contents to your emacs window. Or, more simply, at the prompt in your 270b-xx account, type:
   cat  > hw1.txt
then paste the text of hw1.txt that you will have copied from somewhere else. Then type
   RETURN
   CTRL-D
(that's pressing the RETURN key, followed by the control-D key on the keyboard, which will tell the cat command that you are closing the input. This is a quick and easy way to create text files with Linux.
  • Good luck!