Initial Commit

This commit is contained in:
2022-03-26 11:21:46 +02:00
commit da7b8cb1ed
124 changed files with 66228 additions and 0 deletions
+16
View File
@@ -0,0 +1,16 @@
from Source.Pre_Built_Gates.And import And
from Source.Pre_Built_Gates.Not import Not
from Source.Pre_Built_Gates.Power import Power
class DMux:
def __init__(self,a,sel) -> None:
self.a=a
self.sel=sel
self.out=[Power(False),Power(False)]
self()
def __call__(self) -> None:
negSel=Not(self.sel)
out1=And(self.a,negSel)
out2=And(self.a,self.sel)
self.out[0].out=out1.out
self.out[1].out=out2.out