bitworks/hwo.bitworks/Invert.cs

23 lines
345 B
C#

using System;
namespace hwo.bitworks
{
public class Invert : MultipleBitsSource
{
public Invert(LogicBase[] sources)
:base(sources)
{
}
public override bool bitValue(int bit)
{
return !sources[bit].value();
}
public override identity.BitIdentity getBitIdentity(int bit)
{
return sources[bit].identity();
}
}
}