A6 — Hardware and software: curcuits and turtles

Create memory and more complex digital circuits; program a turtle.

Due Oct 7, 2026

Estimated time to complete (just the assignment, excluding the prep materials): 1.5–2 hours.

Prep materials: Week 6: Hardware continued: Central Processing Unit (CPU)

What to do

For this assignment, you will continue working with the logic simulator and Logo Blocks turtle.

For each circuit-related part of the assignment, when you are done with it, create one screenshot of the circuit you built in the simulator and include it in your submission. The screenshot’s name should indicate the part of the assignment it corresponds to, for example, part1.png.
For each turtle-related part of the assignment, when you are done with it, save your program into a file (with the extension .xml) and include it in your submission. The file name should indicate the part of the assignment it corresponds to, for example, part3.xml.

Submit all your answers, screenshots, and turtle programs to Assignment 6 Submission on Brightspace.

  1. 0 and 1.

    • Recover the circuit for 1 from the previous assignment.

    • Remove the input toggle switch from the circuit and observe what happens with the light bulb. Write down your observations.

    • Build another circuit to represent 1. You can use a toggle switch to light up the bulb initially, but it should be possible to remove the toggle switch from the circuit and still have the bulb lit. Hint: you might need to use a Buffer gate to do this in the simulator. The solution is also covered in the previous prep materials, but we encourage you to try it yourself first.

    • Similarly, build a circuit for 0, such that removing the input toggle switch does not affect the output.

    • Write a response to the following:

      • Which gates did you use to build the circuits for 0 and 1?
      • What is different about these two circuits compared to the earlier ones you built? Why does removing the toggle switch not affect the output? What is the mechanism that allows the circuits to “remember” a value? Write anything you can think of! (This part will be graded for completion only, and we are interested in your thought process.)
  2. Full adder.

    • Build a full 1-bit adder, that is, a circuit with three binary toggle-switch inputs (A, B, and Carry-in) and two light-bulb outputs (Sum and Carry-out).
      Use a pre-built half adder circuit as a building block to construct the full adder. Remember to test your full adder and compare it with the pre-built full adder, similar to how the previous assignment suggested you test your xor-gate and half adder. Include the entire circuit (connected to the pre-built full adder) in your screenshot.

    • Write a response to the following:

      1. How many half adders and other gates you used to construct the full 1-bit adder?

      2. Assuming it takes 1 time unit for each gate/half adder to process its inputs, what is the total number of time units it takes the full 1-bit adder to produce its outputs? Briefly explain why.

        Click here for a hint

        Consider a circuit with two inputs A and B. The circuit represents the boolean function (not A) and B.

        The not-gate takes 1 time unit to process input A.

        Until both inputs of the and-gate are available, the output cannot be computed, so the and-gate does not do anything while the not-gate is processing input A. When the not-gate has finished processing input A, the and-gate can compute its output using the result from the not-gate and input B.

        Thus, for this circuit, it takes 2 time units to produce the output from the inputs.

  3. 3-bit full adder.

    • Build a full adder for two 3-bit input numbers.
      Use a pre-built full 1-bit adder circuit as a building block to construct the 3-bit full adder.

    • In the written response, specify how many full 1-bit adders and other gates you used to construct the 3-bit full adder.

    • Write a response to the following:

      1. How many full 1-bit adders and other gates you used to construct the 3-bit full adder?

      2. Assuming it takes 1 time unit for each gate/full 1-bit adder to process its inputs, what is the total number of time units it takes the 3-bit full adder to produce its outputs? Briefly explain why.

  4. Make the turtle draw a hexagon. Remember to save your file.

  5. Make the turtle draw the word HI. Remember to save your file.
    Hint. Look at the blocks with a pen in the Beginner level.

  6. Optional, ungraded. If you want to do something else with the turtle, go ahead and have fun! If you want, let the instructor know and they will show your program in the next class.

Grading

Graded for correctness.