using System; namespace hwo.bitworks { public class MultipleBitsSource { protected LogicBase[] sources; public MultipleBitsSource() { this.sources = null; } public MultipleBitsSource(LogicBase[] sources) { this.sources = sources; } public virtual int getBits(){ return sources.Length; } public virtual bool bitValue(int bit){ throw new NotImplementedException(String.Format("Class {0} doesn't implement needed method 'bool bitValue(int bit)'",this.GetType().FullName)); } public LogicBase getLogicalBase(int bit){ return new BIT(this,bit); } public LogicBase[] getLogicalBases(){ return getLogicalBases(0,getBits()); } public LogicBase[] getLogicalBases(int start,int len){ LogicBase[] lb = new LogicBase[len]; for (int n=0;n