18 lines
330 B
C#
18 lines
330 B
C#
|
using System;
|
|||
|
namespace hwo.bitworks
|
|||
|
{
|
|||
|
public static class BitFormat
|
|||
|
{
|
|||
|
|
|||
|
public static string toString(LogicBase[] sources){
|
|||
|
char[] digits = new char[sources.Length];
|
|||
|
for (int n=0;n<sources.Length;n++){
|
|||
|
digits[n] = sources[sources.Length - 1 - n].value() ? '1' : '0';
|
|||
|
}
|
|||
|
return new string(digits);
|
|||
|
}
|
|||
|
|
|||
|
|
|||
|
}
|
|||
|
}
|