Reference no: EM133548991
Objective: The objective of this project is to design and implement an 8-bit binary calculator using digital logic circuits in Logisim Evolution v3.8.0. The calculator will perform binary addition and subtraction operations. The solution will be developed in four stages to incrementally build the functionality.
The file calculator.circ provides all the user interface components this task will need (shown above). You are encouraged to use multiple circuits to implement specific components however your whole circuit must be operable and displayed using the buttons and display components in this file. That is, your solution should not require any additional interface components (e.g., buttons, displays, pins etc) in order to test the functionality of your circuit. You may adjust the position of components in this file if you need to, but please try to avoid large changes, and keep all UI components together.
Allowable Logisim Components
Only the following components may be used to develop your solution:
- Logic Gates: AND, OR, XOR, NOR, NOT, NAND, XNOR
- Flip Flops: JK, D, S-R, T
- LEDs
- Clock (only one)
- Hex Digit Display
- Buttons
- Pins (as inputs and for connecting sub-circuits)
- Constants (for setting inputs that will not change)
- Splitter (for using HEX Digit Display)
You must not use any pre-built circuits such as registers, shift registers, etc).
Outline:
Stage 1: Load and Reset Buttons
Input entry for your calculator will be done using the 8 pins provided for each input (Input A and Input B) in the provided interface. However, these values need to be loaded into registers before calculations can be performed on them. To this end, you are going to implement this functionality, such that when the "Load" button is pressed, the values from the Input A and Input B pins will be loaded into registers.
Specifically, Stage 1 needs you to:
• implement the "Load" button such that when it is pressed, the values represented by the Input A and Input B pins are fed into a dedicated register for each (i.e. a bank of Flip Flops).
• Implement the "Reset" button such that when it is pressed, all registers are set to 0
• Ensure the LED display for each of Input A and Input B reflects the value stored in each register.
• Your solution should include the use of Flip Flops to store both the input values • Save your solution as "stage1.circ".
Stage 2: Implement the "Add" Button
You are now going to build on your solution to Stage 1, and implement the Addition operation. Specifically, you are required to:
• Implement the "Add" button by designing a full 8-bit adder circuit that takes as inputs, the values stored in Input A and Input B registers from Stage 1
• Ensures the output of the addition calculation is displayed using the "Output" LED display. • Save your working solution of all stages up to Stage 2 in "stage2.circ".
Stage 3: Signed Integers Using 2's Complement
Most calculators allow positive or negative numbers to be entered. You're going to implement this by implementing a "+/-" button for each input binary number (i.e. a separate "+/-" button for each), allowing the user to specify if the value is negative or positive. You will be using 2's Complement representation to handle signed integers.
Building on Stage 2's solution:
• Implement the "+/-" button for each input binary value, such that when it is pressed, it toggles between the number being positive (by default) or negative. Use a labelled LED for each input binary value to indicate when the input is positive (LED off) or negative (LED on).
• When the "+/-" button is pressed, the current value of the corresponding binary input value should be converted to it's 2's Complement representation. That is, you should implement a circuit that performs 2's Complement conversion on an 8 bit input binary string whenever the "+/-" button is pressed.
• Ensure the 8 LEDs displaying each binary input value show the correctly converted version. • Ensure the addition calculation (when the "Add" button is pressed) operates on the correctly converted version of the inputs.
• Note that as we are using 2's Complement, the value range of your calculator will be between -128 and +127.
• If the output result is a negative number, ensure the +/- LED is on (otherwise off) • Save your working solution of all stages up to Stage 3 in "stage3.circ".
Stage 4: Implement Subtraction Using 2's Complement
Building on Stage 3's solution:
• Implement the "subtract" button for subtraction operations on the two binary input numbers.
• To implement subtraction, you should utilise your "2's Complement" conversion circuit from Stage 3 to convert the number to be subtracted. That is, if the calculation to be performed is:
01001100 (76) - 00110011 (51),
then "00110011" should first be converted to its 2's Complement representation: "11001101" (-51), and then added to 01001100 (76), yielding the result "00011001" (25).
• Combine the 8-bit adder circuit with the subtraction functionality.
• Detail the process of negating numbers using 2's complement and performing subtraction in your video.
• Include a labelled LED with the 8 output LEDs that is turned on when the result of the calculation is negative, and off is the result is positive.
• Save your working solution of all stages up to Stage 4 in "stage4.circ".