bitworks/hwo.bitworks/NOR.cs

29 lines
448 B
C#
Raw Normal View History

2017-06-14 11:25:16 +02:00
using System;
2017-06-14 15:06:37 +02:00
using hwo.bitworks.identity;
2017-06-14 11:25:16 +02:00
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;
}
2017-06-14 15:06:37 +02:00
public override BitIdentity identity()
{
return new BitIdentity(BitOperation.NOR,identities(this.sources));
}
2017-06-14 11:25:16 +02:00
}
}