bitworks/hwo.bitworks/NOR.cs

29 lines
448 B
C#

using System;
using hwo.bitworks.identity;
namespace hwo.bitworks
{
public class NOR : LogicBase
{
public NOR(LogicBase[] sources)
:base(sources)
{
}
public override bool value()
{
foreach (LogicBase source in this.sources){
if (source.value()){
return false;
}
}
return true;
}
public override BitIdentity identity()
{
return new BitIdentity(BitOperation.NOR,identities(this.sources));
}
}
}