Wave 2 Beta Release

 Wave 2 Beta Release: New Logic Gates, Improved UX, and Major Enhancements! 

---

## **🆕 New Features**
### **1️⃣ Additional Logic Gates**
#### **🔲 NAND Gate**
- **Fully functional NAND logic** implemented.
- **Truth Table**:
  | **Input A** | **Input B** | **Output (A NAND B)** |
  |-------------|-------------|-----------------------|
  | 0           | 0           | **1** (ON)            |
  | 0           | 1           | **1** (ON)            |
  | 1           | 0           | **1** (ON)            |
  | 1           | 1           | **0** (OFF)           |
- **Toggle buttons** for Input 1 and Input 2 work as expected.
- Lightbulb updates correctly to match the logic output.

#### **🔲 NOR Gate**
- **Fully functional NOR logic** implemented.
- **Truth Table**:
  | **Input A** | **Input B** | **Output (A NOR B)** |
  |-------------|-------------|----------------------|
  | 0           | 0           | **1** (ON)           |
  | 0           | 1           | **0** (OFF)          |
  | 1           | 0           | **0** (OFF)          |
  | 1           | 1           | **0** (OFF)          |
- Lightbulb updates correctly to match the logic output.
- Toggle buttons for Input 1 and Input 2 work as expected.

#### **🔲 XOR Gate**
- **Fully functional XOR logic** implemented.
- **Truth Table**:
  | **Input A** | **Input B** | **Output (A XOR B)** |
  |-------------|-------------|----------------------|
  | 0           | 0           | **0** (OFF)          |
  | 0           | 1           | **1** (ON)           |
  | 1           | 0           | **1** (ON)           |
  | 1           | 1           | **0** (OFF)          |
- Toggle buttons for Input 1 and Input 2 trigger the logic updates.
- Lightbulb behavior reflects the XOR output logic.

#### **🔲 XNOR Gate**
- **Fully functional XNOR logic** implemented.
- **Truth Table**:
  | **Input A** | **Input B** | **Output (A XNOR B)** |
  |-------------|-------------|-----------------------|
  | 0           | 0           | **1** (ON)            |
  | 0           | 1           | **0** (OFF)           |
  | 1           | 0           | **0** (OFF)           |
  | 1           | 1           | **1** (ON)            |
- Lightbulb updates correctly based on the logic.
- Input toggle buttons work correctly for Input 1 and Input 2.

---

## **🛠️ Enhancements & Improvements**
- **Input Handling**:
  - **Input toggles** now work consistently across all logic gate types (AND, OR, NOT, XOR, NOR, NAND, XNOR).
  - Input logic is consistent across all gate types, including the lightbulb status updates.

- **Reset Functionality**:
  - The **reset button** now works across all logic gates.
  - The lightbulb and toggle button status are properly reset.

- **Code Refactoring**:
  - Reduced **redundancy** in the toggle input functions.
  - Enhanced **code readability** and maintainability.
  - Removed unnecessary logic duplications and consolidated shared logic for gate input handling.

---

## **🐛 Bug Fixes**
- **Fixed NAND Gate logic** — lightbulb now correctly updates according to the truth table.
- **Fixed XNOR Gate logic** — logic now correctly handles the logic for matching inputs.
- **Fixed Reset Functionality** — lightbulbs and buttons now reset correctly across all gate types.
- **General Bug Fixes** — Minor improvements in input toggle functions for better user experience.

---

## **📁 Files Changed**
📄 logicGates.js 📄 logicGates.html

---

## **🚀 Release Notes**
This release marks the **Wave 2 Beta** of the CS:Box project, bringing support for all fundamental logic gates. This wave includes the **NAND, NOR, XOR, and XNOR gates**, which have been built with consistent logic, responsive lightbulb behavior, and proper input handling. This release also introduces major fixes to the **reset functionality**, ensuring that all gates reset properly when the reset button is pressed.

**New Features Include:**
- Full support for **NAND, NOR, XOR, XNOR logic gates**.
- Input toggle buttons now work seamlessly for all gates.
- Lightbulb status updates in real-time according to input changes.
- **Reset button** now clears all input states and correctly resets the lightbulb status for each gate type.

**Looking Ahead**:
- Further UI improvements to make the interface more user-friendly.
- Expanded testing to ensure accurate logic across all devices.

Enjoy this latest version of CS:Box! 🚀
This commit is contained in:
2024-12-07 23:46:18 +00:00
parent a247bc036e
commit d4441afd55
18 changed files with 1180 additions and 188 deletions

View File

@@ -117,8 +117,8 @@
<link rel="stylesheet" href="/assets/bootstrap/css/bootstrap.min.css?h=1bd2fff2799ca0c747d7b2f342f09263">
<link rel="stylesheet" href="/assets/css/DSEG7%20Classic%20Regular.css">
<link rel="stylesheet" href="/assets/css/IEC%20symbols%20Unicode.css?h=f58bcc159dfcde3a8902f3c3e5961248">
<link rel="stylesheet" href="/assets/css/Inter.css?h=22b95cd67c81e5664b0c191202b83c10">
<link rel="stylesheet" href="/assets/css/Open%20Sans.css?h=b35fe44580a9487b7d79edaefb010eea">
<link rel="stylesheet" href="/assets/css/Inter.css?h=ef85e53047102b777e7deb25bab583c9">
<link rel="stylesheet" href="/assets/css/Open%20Sans.css?h=4afd515aa4663edcfb6121d868bc7f5a">
<link rel="stylesheet" href="/assets/css/Seven%20Segment.css?h=f58bcc159dfcde3a8902f3c3e5961248">
<link rel="stylesheet" href="/assets/css/bs-theme-overrides.css?h=c211b632aade4ff7985e7a32a316c7b8">
<link rel="stylesheet" href="/assets/css/Slider-Range.css?h=f8e9df474f99934e8bddde82bea5ff22">
@@ -142,7 +142,7 @@
</li>
<li class="nav-item"><a class="nav-link" href="hex-colours">Hex Colours</a></li>
<li class="nav-item dropdown"><a class="dropdown-toggle nav-link" aria-expanded="false" data-bs-toggle="dropdown" data-bs-auto-close="false" href="#">Logic Gates</a>
<div class="dropdown-menu"><a class="dropdown-item" href="not-gate">NOT</a><a class="dropdown-item" href="and-gate">AND</a><a class="dropdown-item" href="or-gate">OR</a></div>
<div class="dropdown-menu"><a class="dropdown-item" href="not-gate">NOT</a><a class="dropdown-item" href="and-gate">AND</a><a class="dropdown-item" href="or-gate">OR</a><a class="dropdown-item" href="nor-gate">NOR</a><a class="dropdown-item" href="nand-gate">NAND</a><a class="dropdown-item" href="xor-gate">XOR</a><a class="dropdown-item" href="xnor-gate">XNOR</a></div>
</li>
</ul>
</div>
@@ -331,7 +331,7 @@
<script src="/assets/js/boldAndDark.js?h=78569998362133b84a76614652f3624f"></script>
<script src="/assets/js/hexadecimal.js?h=ed5c6d92d71af17004fe145227303d9d"></script>
<script src="/assets/js/hexColours.js?h=c64f15434dac1c095562a6a5fe8b155b"></script>
<script src="/assets/js/logicGates.js?h=0be60168b29f5bdee77760531f4a6858"></script>
<script src="/assets/js/logicGates.js?h=cb132aa615fb58918ab65db03c7face7"></script>
</body>
</html>