Computer Science 251
Spring Semester 1997
TTh 2:00 - 3:15
South College 04
Project #2 - 1 Bit Half and Full Adders
In this project you will be implementing functions that perform 1 bit addition. You will create a half adder function which can then be used to implement the full adder. The adders must be constructed using the logic gate functions created in project #1.
The Project resouce page contains links to UNIX and C++ references that you may find helpful.
Files For This Project:
If you need to know how and where to get these files refer to the documentation for Project #1.
Files From Past Projects:
- Header file that defines the functions that implement the full and half adders. It also defines a structure that is used to hold the result of an addition.
- From Project #1.
- Get the BitAdder.h header file.
- Read through and understand this header file.
- Decide how you are going to implement and test the functions prototyped in the BitAdder.h file.
- Write up a short design document that describes your implementation and testing strategy. The design document needs to describe how you developed the circuit that you are implementing. This will involve writing the functions in SOP representation and then using Boolean algebra to simplify the expressions.
- Create a file named BitAdder.cpp that implements the functions prototyped in the BitAdder.h file.
- Create a file named main.cpp that contains the main() function. The main function should call test functions that thouroughly test both of the BitAdder functions.
- Add BitAdder.cpp to the Makefile for your projcet. A sample makefile and a description of how to use it are available on the project resources page. If you are using your own PC based development environment the you'll have to check your manuals for how to create multi-file projects.
- Test your functions and revise the design document describing your implementation and testing strategies.
Submitting Your Solution:
For this project you need to submit 3 file.
- BitAdder.cpp - contains your implementation of the functions prototyped in the BitAdder.h header file.
- Main.cpp - contains your main() function and all of your test code.
- Design Document - the design document describes your implementation and testing strategies.
If you need to refresh your memory on how to submit the files refer to the Project #1 documentation.
Grading of Solutions:
The grade for your project will be divided equally into two parts, Design and Implementation. The Design portion of the grade includes:
The Implementation part of your grade includes:
- How effectively you have used the tools available to you. In this case that means did you use the enumerations, typedefs and conversion functions from Logic.h in an appropriate way.
- The elegance of your solution. This means does your code implement a solution in a reasonable way.
- The effectiveness of your test cases. I'll be looking to see if the test cases you implemented show with reasonable certainty that your solution is correct. Sometimes you will be able to test your classes/functions for every possible case and sometimes that will not be a reasonable approach and you will need to be more careful when selecting your test cases.
- Readability and Maintainability of your code. This is a qualitative appraisal of how well your code has been written. What I'm looking for is code of which I can follow the logic (comments help!). I also want to see appropriate defines, typedefs and the like to make your code easier to modify, update and maintain.
- The correctness of your solution. I will determine this by compiling my test cases using your implementation files. For this project I will compile my Logic.h, LogicGates.h, and main.cpp files with your LogicGates.cpp file. I will then run my test cases using the functions you implemented in LogicGates.cpp.
These pages designed and maintained by Grant Braught