Skip to content

Commit

Permalink
feat(docs): added documentation for force gate
Browse files Browse the repository at this point in the history
  • Loading branch information
niladrix719 committed Oct 14, 2023
1 parent 069e925 commit 5953e80
Show file tree
Hide file tree
Showing 2 changed files with 57 additions and 0 deletions.
57 changes: 57 additions & 0 deletions docs/chapter4/8misc.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
8. [Unequal Split](#unequal-split)
9. [Flag](#flag)
10. [Two's Complement](#twos-complement)
11. [Force Gate](#force-gate)

## ALU

Expand Down Expand Up @@ -479,3 +480,59 @@ add 1 + 1
You can verify the behavior of the **Two’s Complement** circuit element in the live circuit embedded below:

<iframe width="600px" height="400px" src="https://circuitverse.org/simulator/embed/110615" id="projectPreview" scrolling="no" webkitAllowFullScreen mozAllowFullScreen allowFullScreen></iframe>

## Force Gate

The **Force Gate** is a logical circuit element designed to manipulate and control binary data. It enables the user to force specific values onto the inputs of a connected circuit, allowing for custom simulations and testing scenarios. This documentation provides an overview of the Force Gate circuit element in CircuitVerse, its properties, and its usage.

>Properties that can be customized in the **PROPERTIES** panel include: **Direction, BitWidth**
![drawing](../images/img_chapter4/4.25.png)

<div align="center"><em>Figure 4.25: Relevant attributes for the Force Gate element</em></div>

Table 4.25: Truth table for a Force Gate
<table>
<tr>
<td><strong>Enable</strong>
</td>
<td><strong>Input</strong>
</td>
<td><strong>Output</strong>
</td>
</tr>
<tr>
<td>0
</td>
<td>0
</td>
<td>0
</td>
</tr>
<tr>
<td>0
</td>
<td>1
</td>
<td>0
</td>
</tr>
<tr>
<td>1
</td>
<td>0
</td>
<td>1
</td>
</tr>
<tr>
<td>1
</td>
<td>1
</td>
<td>1
</td>
</tr>
</table>

<iframe src="https://circuitverse.org/simulator/embed/force-gate?theme=default&display_title=false&clock_time=true&fullscreen=true&zoom_in_out=true" style="border-width:; border-style: solid; border-color:;" name="myiframe" id="projectPreview" scrolling="no" frameborder="1" marginheight="0px" marginwidth="0px" height="500" width="500" allowFullScreen></iframe>
Binary file added docs/images/img_chapter4/4.25.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 5953e80

Please sign in to comment.