25 lines
380 B
C#
25 lines
380 B
C#
using System;
|
|
using hwo.bitworks.identity;
|
|
|
|
namespace hwo.bitworks
|
|
{
|
|
public class NOT : LogicBase
|
|
{
|
|
public NOT(LogicBase source)
|
|
:base(new LogicBase[]{source})
|
|
{
|
|
}
|
|
|
|
public override bool value()
|
|
{
|
|
return !this.sources[0].value();
|
|
}
|
|
|
|
public override BitIdentity identity()
|
|
{
|
|
return new BitIdentity(BitOperation.NOT,identities(this.sources));
|
|
}
|
|
|
|
}
|
|
}
|