Digital System Design Q1 Q2
Digital System Design Q1 Q2
System Overview:
The digital system being designed consists of two 3-bit binary inputs (A and B) that can
perform subtraction or comparison operations based on a user's selection. The system is
controlled by a Control Unit (CU), which determines the operation to be executed and
handles additional flags like the carry flag and error flag. The goal is to create a functional
ALU (Arithmetic Logic Unit) that can operate efficiently with these inputs while clearly
indicating the results through LEDs.
Methodology Adopted:
The design methodology of the system is broken down into several steps:
1. Component Design:
- 3-bit Subtractor: The subtractor performs the subtraction operation (A - B) using a 2's
complement approach. It uses full adders where the bits of B are inverted and then added to
A to get the difference. This step also includes a carry detection mechanism that generates a
carry flag when required.
- 3-bit Comparator: The comparator checks whether A is greater than B by analyzing the
individual bits of A and B using XOR gates and combining the results through logical gates. It
provides a binary output to indicate whether A > B.
- Control Unit (CU): The control unit is the decision-maker of the system. It takes a 1-bit
control signal (X) to switch between the two operations. When X = 0, it activates the
comparison operation, and when X = 1, it triggers the subtraction operation.
- Flag Indicators: Two flags are designed for the system: the carry flag and the error flag.
The carry flag is set during the subtraction operation when a carry occurs, while the error
flag is triggered when the subtraction results in a situation where B > A.
2. Design Approach:
- Logic Gates Implementation: The core operations are implemented using basic logic
gates such as AND, OR, NOT, and XOR. This straightforward approach ensures that the
system remains simple, efficient, and easy to troubleshoot.
- Control Logic: The control logic is built to ensure seamless switching between the
subtractor and comparator based on the control signal (X). This design enhances the
system's versatility by allowing it to handle two distinct operations using a single control
mechanism.
- Visual Feedback: LEDs are used to represent the inputs, outputs, and flags visually, which
allows easy monitoring of the system's behavior and real-time feedback on the operation
status.
System Strengths:
1. Simplicity: The system's design uses basic logic gates, which makes it straightforward to
understand, analyze, and modify if required. This simplicity helps in maintaining the system
and ensuring its reliable performance.
2. Visualization: The use of LEDs for displaying inputs, outputs, and flags provides clear and
immediate feedback on the system's state, making it easier to detect and diagnose issues.
3. Modularity: The system is modular, meaning that each component (subtractor,
comparator, and control unit) is designed independently. This modularity simplifies
troubleshooting and future upgrades.
System Limitations:
1. Input Size Restriction: The design is limited to handling only 3-bit inputs. This constraint
reduces the system's flexibility in applications requiring larger data inputs or more complex
operations.
2. Scalability: While the current design is effective for small-scale operations, it may not
scale well to accommodate larger bit-widths or extended ALU functionalities without
significant redesign.
3. Error Handling: The error detection mechanism is basic and might not account for all
potential error conditions in more extensive and varied use cases.