Mini Computer and Logic Circuit Design
Mini Computer and Logic Circuit Design
A simple digital circuit simulation can emulate a manual CPU cycle by utilizing switches to control each function of the CPU, such as data loading (via LoadA and LoadB), ALU operation choice (via Add/Sub), and clock synchronization. During this process, users can observe the data flow from memory to registers, through the ALU, and to outputs, verifying operations by checking individual LED outputs for correctness as per expected results (such as arithmetic operations outcomes) and seeing the effects of different control signal states, ensuring manual control over the entire cycle .
XOR gates are used in the 4-bit ALU setup to allow the ALU to perform both addition and subtraction. This is achieved by placing XOR gates between the outputs of Register B and the inputs to the Adder. A control switch labeled Add/Sub determines the operation type: when Add/Sub is 0, the XOR gates allow straightforward addition; when Add/Sub is 1, the XOR gates invert the inputs from Register B to perform subtraction by implementing two's complement logic .
The outcomes and deliverables from a project designed to simulate combinational circuits using Logisim Evolution include a functional simulation file (.circ), visual diagrams of circuit layouts, and screenshot evidence of the simulation's output. It's essential to have truth tables verifying the accuracy of each circuit's logical operations, particularly for different circuit types such as adders and multiplexers, demonstrating comprehensive testing across all input combinations. These deliverables ensure stakeholders can readily assess the simulation's fidelity and educational effectiveness .
The control inputs needed for manual operation of a simple CPU simulation include LoadA, LoadB, Add/Sub, Clock, and Memory Read/Write. These controls facilitate manual input and operation within the CPU. LoadA and LoadB are used to load data into Register A and Register B, respectively. The Add/Sub control switch determines whether the ALU performs an addition or a subtraction operation. The Clock input synchronizes data transfers and operations, while Memory Read/Write controls data flow to and from memory .
To design a half-adder circuit, one must place two input pins representing bits A and B, connect these to an XOR gate for the Sum output and to an AND gate for the Carry output, and provide two output LEDs for displaying Sum and Carry. The half-adder can be integrated into a full-adder configuration by cascading two half-adders and an OR gate to accommodate the carry-in input (Cin) while computing the full-adder carry-out logic: Carry = C1 OR C2, where C1 and C2 are the outputs of each half-adder .
A 2-to-4 decoder illustrates the mapping of binary inputs to distinct outputs by using two input pins (A0 and A1) to control four output lines (Y0–Y3). Each combination of inputs activates one specific output line while turning off all others. This binary-to-one-hot conversion is crucial in applications such as memory address decoding and selecting among multiple data sources, where distinct binary expressions need unique outputs for signal routing .
In a basic digital circuit setup, memory components like ROM or RAM are configured by setting the address bit width and data bit width to define the memory capacity and data size per address. For instance, a setup with 4-bit address width and 4-bit data width allows 16 memory locations each holding a 4-bit value. The configuration involves connecting address input sources, such as switches or counters, to memory address inputs, and memory data outputs to other components such as registers, facilitating data retrieval and storage as a part of processing pathways .
A truth table is essential in the verification of logic circuits as it provides a comprehensive reference of expected behaviors for every possible input combination. In the context of experiments with basic gates like AND, OR, NOT, etc., a truth table facilitates a systematic approach to testing, ensuring circuit outputs consistently align with theoretical predictions. This aids in confirming correct gate operations and identifying any discrepancies due to incorrect wiring or component faults .
Input pins (switches) and output pins (LEDs) help in verifying the functionality of combinational circuits by providing an interactive and visual method to test and observe circuit behavior. Switches allow users to manually set input conditions, while LEDs indicate the state of the outputs, enabling real-time comparison against expected results as per truth tables. This setup facilitates easy troubleshooting and confirmation that the circuit behaves as intended under various input combinations .
Setting the Bit Width to 4 affects the design and operation by determining the input and output sizes of components such as registers and adders in the digital circuit. For example, in a 4-bit register or adder, four input pins are required to handle the 4-bit data, which affects the size and complexity of the overall circuit. This Bit Width setting also dictates the range of numerical values each component can operate on (0 to 15 for unsigned numbers) and the carry-out implications in arithmetic operations .