logic gates

Roman Thilenius's icon

i have to rebuild some of my gate and trigger stuff for a project, and i am a bit unsure if my logic gates are right or not.

the following is the core expression of my older 8-channel logic gates. (beside the expression there is also an auto-reset function in the abstractions to make sure that the output remains right after a change of the number of inputs, which is dynamic between 2-8. this is also what $i9 stands for.)

but are these the correct formulas / names anyway or is there something strange?

OR
expr ($i1+$i2+$i3+$i4+$i5+$i6+$i7+$i8)!=0

NOR
expr ($i1+$i2+$i3+$i4+$i5+$i6+$i7+$i8)==0

AND
expr ($i1+$i2+$i3+$i4+$i5+$i6+$i7+$i8)==$i9

NAND
expr (($i1+$i2+$i3+$i4+$i5+$i6+$i7+$i8)==$i9)==0

XOR
expr ($i1+$i2+$i3+$i4+$i5+$i6+$i7+$i8)%2

XNOR
expr ($i1+$i2+$i3+$i4+$i5+$i6+$i7+$i8+1)%2

Ernest's icon

no def for $i9 in AND or NAND

Roman Thilenius's icon

just think of it as "8" here