0% found this document useful (0 votes)
17 views

Digital System Design and Simulation

Uploaded by

ihassam baloch
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
17 views

Digital System Design and Simulation

Uploaded by

ihassam baloch
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 2

Digital System Design and Simulation

Step 1: System Overview


This digital system takes two 3-bit binary inputs and performs two ALU operations:
subtraction and comparison. The system consists of the following components:
- Inputs: Two 3-bit binary numbers (A and B).
- Operations:
1. Subtraction: A - B.
2. Comparison: Compare A and B to determine whether A > B.
- Control Unit (CU):
- Selects between subtraction and comparison operations.
- Shows a carry flag if a carry/borrow is generated during subtraction.
- Shows an error flag if B > A during subtraction.
- Outputs: A 3-bit binary output for the result and two flags (carry and error).

Step 2: Design the Subtractor


A 3-bit subtractor computes A - B using the 2's complement method.
1. Full Adders: Use full adders to calculate A + (~B + 1).
2. Carry/Borrow Flag: Check the output of the last adder for a borrow.
3. Error Flag: Set the error flag if B > A.

Step 3: Design the Comparator


The comparator checks two 3-bit binary inputs (A and B) and outputs:
- 1 if A > B.
- 0 if A <= B.
1. XOR Gates: Use XOR gates to check if corresponding bits are equal.
2. AND/OR Gates: Determine if A is greater than B.

Step 4: Design the Control Unit (CU)


The control unit selects the operation and displays the flags:
1. Control Input: A 1-bit control input (X) selects the operation.
2. Inverter (NOT Gate): Invert the control signal for routing.
3. AND Gates: Route output based on the value of X.
4. OR Gate: Combine outputs from subtractor and comparator.
5. Carry Flag: Generated only during subtraction.
6. Error Flag: Generated if B > A during subtraction.

Step 5: Build the Circuit in Proteus


1. Add Components: Include logic gates, full adders, XOR gates, LEDs, and digital inputs in
Proteus.
2. Wire the Circuit: Connect inputs to both subtractor and comparator, implement control
logic, and output to LEDs.
3. Simulation: Run the simulation and check correct performance for both operations.

Step 6: Testing and Debugging


1. Subtraction Operation: Test different inputs to verify correct results and flags.
2. Comparison Operation: Verify outputs correctly indicate A > B or A <= B.
3. Edge Cases: Test scenarios where A = B, B > A, and B = 0.
4. Test Flags: Ensure carry and error flags function as expected.

Step 7: Report and Presentation


In the report and presentation, cover the following:
Q1. System Overview and Methodology:
- Introduction: Explain the purpose of the system.
- Methodology: Describe the design process.
Q2. Strengths, Limitations, and Resources:
1. Strengths: Advantages of the design.
2. Limitations: Constraints and potential improvements.
3. Resources: Tools and references used.
Q3. Testing and Robustness:
- Describe tests performed to ensure reliability and functionality.

Conclusion
This design and simulation guide provides a comprehensive approach to creating a digital
system in Proteus. By following these steps, you will ensure that your system is functional
and robust. Test and debug thoroughly to prepare for your assignment presentation.

You might also like