Computer_Science
 Home | People | Curriculum | Projects | Resources | Media

The World of Computing

CS100

Haverford College

Spring 2008

Lab 3

April 23


We will use PIPPIN, Rosetta and Loggo extensively. These applications are available on the web as well as on the CD-ROM from the text.

Goals:

Exercises: you are encouraged to confirm your answers using the tools from lecture and lab. For questions #6-8, note that the following Boolean (logic) expressions are equivalent:

(a + a')b = (a OR (NOT(a))) AND b = (a ∨ ¬a) ∧ b
  1. convert binary 101100 to decimal
  2. convert binary 101100 to hexidecimal
  3. convert decimal 328 to binary
  4. construct the parse tree for the statement
    w = x - y * z

    (it is suggested that you confirm your tree using Rosetta)
  5. generate the corresponding PIPPIN assembly code for the statement from the previous question, w = x - y * z (again, you can use Rosetta, but it is also suggested that you insert the code into the PIPPIN machine and execute it to witness how the parts of the architecture interact)
  6. diagram the circuit for the Boolean statement
    z = (a + a')b

    (it is suggested that you use Logg-o to build and simulate the logic of your circuit diagram)
  7. provide the truth table for the Boolean statement from the previous question, z = (a + a')b
  8. review the previous two answers, and provide a simpler version of the Boolean statement from the previous two questions, z = (a + a')b
  9. write a PIPPIN assembly code program that computes the expression w = xy, or w = x raised to the power y, where x and y are whole numbers (zero and the counting numbers). It is suggested that you first write the program using control structures from a higher level language (like Alice), and then translate it into PIPPIN. Run your code on the PIPPIN machine to make sure that it works, then take a screenshot of the window with the PIPPIN machine in its final state when the program halts

Evaluation:


CS100 Labs: 0 1 2 3 Schedule Links

Haverford College Page maintained by John Dougherty.
Computer Science Department, Haverford College.