The Elements of Computing Systems (From NAND to Tetris)

The Elements of Computing Systems (From NAND to Tetris) : Building an ALU (Arithmatic Logic Unit)



All computer systems have what is known as an ALU (Arithmatic Logic Unit) to perform basic arithmatic operations. In this section, we will use the logic gates which we have built, to built an ALU for our computer.


If you have purchased the TECS book, then you should read chapter 2. If you have not yet purchased the book, then you can read the text from this pdf.






Submitting Responses to Activities

At diycomputerscience.com, we normally encourage participants to blog their solutions to various course activities, and submit links to their blog posts for peer review. However, this course is based on a book, which is often used in university courses. For that reason, as well as for preserving the experience of future learners, the authors have requested that we follow the code sharing guidelines stated below. I request all course participants to co-operate with the code sharing policy stated below. Very soon I will create a private pastebin for this course where everyone is encouraged to post their solution code for peer review.


Code Sharing Policy: We developed this course and made all its materials freely available because we want as many people in the world to learn computer science on their own terms. We believe that students and self-learners who set out to do the hardware and software projects should have the benefit and challenge of doing original work, without seeing published solutions. Therefore, we request that you don't post solutions publicly on the web, e.g. in blogs or forums. If your course instructor or organizer creates a private space in which students can share their work outside the public domain, that's fine. Likewise, you can share your work with others using a password-protected space. Please use your judgment and help ensure that many more students, like you, will be able to fully benefit from this learning experience. Thx – Noam Nisan and Shimon Schocken



Activities
This session has the following activities. Please complete them and submit links to your work. A good place to publish your activities is your blog, website, some wiki, or any publicly accessible page on the Internet.
View All Activity Responses

Activity 1 : TECS - Build a Half Adder

In this activity you have to build a 'Half Adder'. You can use any of the chips created until now, to implement the 'Half Adder'.
Resources
Test your work in the hardware simulator, and ensure it works by testing it with the test script specified above. Blog your notes, and submit a link to your blog post, using the submit form below.
If you are enrolled in this course, then please login to submit your response to this activity

Activity 2 : TECS - Build a Full Adder

In this activity you have to build a 'Full Adder'. You can use any of the chips created until now, to implement the 'Full Adder'.
Resources
Test your work in the hardware simulator, and ensure it works by testing it with the test script specified above. Blog your notes, and submit a link to your blog post, using the submit form below.
If you are enrolled in this course, then please login to submit your response to this activity

Activity 3 : TECS - Build a 16 bit Adder

In this activity you have to build a '16 Bit Adder'. You can use any of the chips created in until now, to implement the '16 Bit Adder'.
Resources
Test your work in the hardware simulator, and ensure it works by testing it with the test script specified above. Blog your notes, and submit a link to your blog post, using the submit form below.
If you are enrolled in this course, then please login to submit your response to this activity

Activity 4 : TECS - Build a 16 bit Incrementer

In this activity you have to build a '16-bit Incrementer'. You can use any of the chips created in the course until now, to implement the '16-bit Incrementer'.
Resources
Test your work in the hardware simulator, and ensure it works by testing it with the test script specified above. Blog your notes, and submit a link to your blog post, using the submit form below.
If you are enrolled in this course, then please login to submit your response to this activity

Activity 5 : TECS - Build an ALU

In this activity you have to build an 'Arithmetic-Logic Unit'. You can use any of the chips created in the course until now, to implement the 'Arithmetic-Logic Unit'.
Resources
  • A template script for the 'Arithmetic-Logic Unit' chip... you have to fill in the details
  • The test script for the 'Arithmetic-Logic Unit' chip
  • The compare file for the 'Arithmetic-Logic Unit' chip
Test your work in the hardware simulator, and ensure it works by testing it with the test script specified above. Blog your notes, and submit a link to your blog post, using the submit form below.
If you are enrolled in this course, then please login to submit your response to this activity
Recent Course Updates: