DigitalLogicGate 0.0.1
Logicgate is a module for handling with logic gate inside python like it is happening right now behind your computer.
License: MIT
Requires Python: >=3.10.*, >=3.8.*
Keywords: logicgate in python

To download logicgate use "pip install logicgate"
NOTE: YOU MUST USE A UPGRADED VERSION OF PIP AND PYTHON MUST BE THE LASTEST VERSION.

Logicgate is a module for handling with logic gate inside python like it is happening right now behind your computer. 

After importing you can use the logicgate as:

-learning the logic behind the logic gate AND NOT OR NAND NOR XOR
-creating your own circuit

you can learn more about the module here:

-AND gate - to use the and gate we can say in our .py file 
import logicgate , from logicgate import * , from logicgate import AND
after importing the AND gate which in logicgate module is denoted as AND(A, B)
the AND has two input A and B. it can be use as AND(True, True) which input True because both are true.
Truth table of and gate

A      B        INPUT
0      0          0
0      1          0
1      0          0
1      1          1

-NOT GATE - not gate is denoted by NOT(A) in logicgate module. it has only one input and only one task . it's invert the input it get so True -> False and False -> True
Truth table of not gate.

A   INPUT
1     0
0     1

-NAND GATE - nand gate is denoted by NAND(A, B) in logicgate module. as the name says it is a NOT AND gate it is same as AND but it get inverted
Truth table of nand gate.

A      B        INPUT
0      0          1
0      1          1
1      0          1
1      1          0

-OR GATE - or gate is denoted by OR(A, B) in logicgate module. or gate will return true if one of it input A or B is True.
Truth table of or gate.

A      B        INPUT
0      0          0
0      1          1
1      0          1
1      1          1

-XOR GATE - xor gate is denoted by XOR(A, B) in logicgate module. or exculsive or gate it is same as or gate but when both the condition are true it return false.
Truth table of or gate.

A      B        INPUT
0      0          0
0      1          1
1      0          1
1      1          0

-NOR GATE - nor gate is denoted by NOR(A, B) in logicgate module. it is like or gate but has inverted input it follow the same thing like a AND and NAND gate.
Truth table of nor gate.

A      B        INPUT
0      0          1
0      1          0
1      0          0
1      1          0


-XNOR GATE - xnor gate is denoted by XNOR(A, B) in logicgate module. it is like xor gate but has inverted input it also follow the same thing as OR and NOR gate.
Truth table of nor gate.

A      B        INPUT
0      0          1
0      1          0
1      0          0
1      1          1

Just after continuing how to create your own circuit.
i jsut want to say please fix me i have any grammer or information mistake . and very very thank you for reading up to here.

-CIRCUIT
to create your own circuit, you need to import all the gate (optional) you can do that by from logicgate import *
so let's create a OR gate using nand and not gate and explaning it.

from logicgate import * #importing all function from logicgate module

def OR(A=False, B=False): #creating a function with the OR gate name you can name it anyhing you want to. here i name it OR gate because we're creating it

  circuit1 = NOT(A) #creating a variable that invert the value we enter through OR(A <- this get inverted)
  
  circuit2 = NOT(B) #creating a variable that invert the value we enter through OR(A, B <- this get inverted)
  
  return NAND(circuit1, circuit2) #now we put the inverted value to a NAND gate and return it  
IMPORTANT - IF YOU WANT TO USE THE VALUE use {var_name} = {logic_gate}(A, B)
to print the value in console USE print({logic_gate}(A, B))

if you see the wikies you can find out that

A --- |NOT ---|
              |-
			    |NAND -- output
			  |-
B --- |NOT ---|

you can email the module author at --> agnibhapal@gmail.com for more explanation
here is the package structure.

def {your_package_name}({amount_of_input}):
 {CIRCUITS}
 return {FINAL_VALUE}
  
---------------------X-------------------------