using System; namespace hwo.bitworks { public class BComplement : MultipleBitsSource { Invert invert; ADDX addx; public BComplement(LogicBase[] sources) :base(sources) { invert = new Invert(sources); addx = new ADDX(invert.getLogicalBases(),new LogicBase[]{Constants.ONE}); } public override bool bitValue(int bit) { return addx.bitValue(bit); } public override identity.BitIdentity getBitIdentity(int bit){ return addx.getBitIdentity(bit); } } }