<?xml version="1.0" encoding="utf-8"?>
<circuit>
  <version>1</version>
  <attributes>
    <entry>
      <string>isGeneric</string>
      <boolean>true</boolean>
    </entry>
    <entry>
      <string>Width</string>
      <int>5</int>
    </entry>
  </attributes>
  <visualElements>
    <visualElement>
      <elementName>In</elementName>
      <elementAttributes>
        <entry>
          <string>Label</string>
          <string>G</string>
        </entry>
        <entry>
          <string>Bits</string>
          <int>2</int>
        </entry>
      </elementAttributes>
      <pos x="160" y="200"/>
    </visualElement>
    <visualElement>
      <elementName>In</elementName>
      <elementAttributes>
        <entry>
          <string>Label</string>
          <string>ov</string>
        </entry>
      </elementAttributes>
      <pos x="160" y="280"/>
    </visualElement>
    <visualElement>
      <elementName>In</elementName>
      <elementAttributes>
        <entry>
          <string>Label</string>
          <string>T</string>
        </entry>
      </elementAttributes>
      <pos x="160" y="340"/>
    </visualElement>
    <visualElement>
      <elementName>And</elementName>
      <elementAttributes>
        <entry>
          <string>inverterConfig</string>
          <inverterConfig>
            <string>In_1</string>
          </inverterConfig>
        </entry>
      </elementAttributes>
      <pos x="260" y="240"/>
    </visualElement>
    <visualElement>
      <elementName>And</elementName>
      <elementAttributes>
        <entry>
          <string>Inputs</string>
          <int>3</int>
        </entry>
      </elementAttributes>
      <pos x="380" y="240"/>
    </visualElement>
    <visualElement>
      <elementName>Out</elementName>
      <elementAttributes>
        <entry>
          <string>Label</string>
          <string>G&apos;</string>
        </entry>
        <entry>
          <string>Bits</string>
          <int>4</int>
        </entry>
      </elementAttributes>
      <pos x="560" y="440"/>
    </visualElement>
    <visualElement>
      <elementName>T_FF</elementName>
      <elementAttributes>
        <entry>
          <string>generic</string>
          <string>this.Label=&quot;G_&quot;+args.inBits;</string>
        </entry>
      </elementAttributes>
      <pos x="480" y="260"/>
    </visualElement>
    <visualElement>
      <elementName>Clock</elementName>
      <elementAttributes>
        <entry>
          <string>Label</string>
          <string>C</string>
        </entry>
      </elementAttributes>
      <pos x="160" y="380"/>
    </visualElement>
    <visualElement>
      <elementName>GrayFinal-inc.dig</elementName>
      <elementAttributes>
        <entry>
          <string>generic</string>
          <string>export inBits := args.inBits+1;
if (args.inBits&lt;args.bits-2) {
  setCircuit(&quot;GrayNode-inc.dig&quot;);
}</string>
        </entry>
      </elementAttributes>
      <pos x="400" y="440"/>
    </visualElement>
    <visualElement>
      <elementName>Splitter</elementName>
      <elementAttributes>
        <entry>
          <string>rotation</string>
          <rotation rotation="3"/>
        </entry>
        <entry>
          <string>Input Splitting</string>
          <string>2,1</string>
        </entry>
        <entry>
          <string>Output Splitting</string>
          <string>3</string>
        </entry>
        <entry>
          <string>generic</string>
          <string>this.&apos;Input Splitting&apos; = args.inBits+&quot;,1&quot;;
this.&apos;Output Splitting&apos; = &quot;&quot;+(args.inBits+1);</string>
        </entry>
      </elementAttributes>
      <pos x="580" y="300"/>
    </visualElement>
    <visualElement>
      <elementName>Splitter</elementName>
      <elementAttributes>
        <entry>
          <string>Input Splitting</string>
          <string>2</string>
        </entry>
        <entry>
          <string>Output Splitting</string>
          <string>1-1,0-0</string>
        </entry>
        <entry>
          <string>generic</string>
          <string>this.&apos;Input Splitting&apos; = &quot;&quot;+args.inBits;
this.&apos;Output Splitting&apos; = (args.inBits-1)+&quot;-&quot;+(args.inBits-1)+&quot;,&quot;+(args.inBits-2)+&quot;-&quot;+(args.inBits-2);</string>
        </entry>
      </elementAttributes>
      <pos x="200" y="220"/>
    </visualElement>
    <visualElement>
      <elementName>Out</elementName>
      <elementAttributes>
        <entry>
          <string>Label</string>
          <string>ov&apos;</string>
        </entry>
      </elementAttributes>
      <pos x="560" y="500"/>
    </visualElement>
    <visualElement>
      <elementName>Text</elementName>
      <elementAttributes>
        <entry>
          <string>Description</string>
          <string>Adds a bit to the counter. The sub circuit 
&quot;GrayFinal&quot; is replaced by &quot;GrayNode&quot; if 
necessary.
{{de Fügt dem Zähler ein Bit hinzu. Die 
Teilschaltung &quot;GrayFinal&quot; wird ersetzt durch 
&quot;GrayNode&quot; wenn die erforderliche Bitzahl 
noch nicht erreicht ist.}}</string>
        </entry>
      </elementAttributes>
      <pos x="80" y="40"/>
    </visualElement>
    <visualElement>
      <elementName>GenericInitCode</elementName>
      <elementAttributes>
        <entry>
          <string>generic</string>
          <string>bits := 4;
inBits := 2;</string>
        </entry>
      </elementAttributes>
      <pos x="480" y="140"/>
    </visualElement>
  </visualElements>
  <wires>
    <wire>
      <p1 x="240" y="480"/>
      <p2 x="400" y="480"/>
    </wire>
    <wire>
      <p1 x="380" y="400"/>
      <p2 x="580" y="400"/>
    </wire>
    <wire>
      <p1 x="220" y="240"/>
      <p2 x="240" y="240"/>
    </wire>
    <wire>
      <p1 x="360" y="240"/>
      <p2 x="380" y="240"/>
    </wire>
    <wire>
      <p1 x="320" y="260"/>
      <p2 x="340" y="260"/>
    </wire>
    <wire>
      <p1 x="440" y="260"/>
      <p2 x="480" y="260"/>
    </wire>
    <wire>
      <p1 x="540" y="260"/>
      <p2 x="560" y="260"/>
    </wire>
    <wire>
      <p1 x="340" y="260"/>
      <p2 x="380" y="260"/>
    </wire>
    <wire>
      <p1 x="160" y="340"/>
      <p2 x="240" y="340"/>
    </wire>
    <wire>
      <p1 x="240" y="340"/>
      <p2 x="360" y="340"/>
    </wire>
    <wire>
      <p1 x="180" y="500"/>
      <p2 x="400" y="500"/>
    </wire>
    <wire>
      <p1 x="520" y="500"/>
      <p2 x="560" y="500"/>
    </wire>
    <wire>
      <p1 x="500" y="440"/>
      <p2 x="560" y="440"/>
    </wire>
    <wire>
      <p1 x="380" y="440"/>
      <p2 x="400" y="440"/>
    </wire>
    <wire>
      <p1 x="160" y="280"/>
      <p2 x="260" y="280"/>
    </wire>
    <wire>
      <p1 x="460" y="280"/>
      <p2 x="480" y="280"/>
    </wire>
    <wire>
      <p1 x="360" y="280"/>
      <p2 x="380" y="280"/>
    </wire>
    <wire>
      <p1 x="160" y="200"/>
      <p2 x="180" y="200"/>
    </wire>
    <wire>
      <p1 x="180" y="200"/>
      <p2 x="580" y="200"/>
    </wire>
    <wire>
      <p1 x="160" y="380"/>
      <p2 x="180" y="380"/>
    </wire>
    <wire>
      <p1 x="180" y="380"/>
      <p2 x="460" y="380"/>
    </wire>
    <wire>
      <p1 x="340" y="460"/>
      <p2 x="400" y="460"/>
    </wire>
    <wire>
      <p1 x="500" y="460"/>
      <p2 x="520" y="460"/>
    </wire>
    <wire>
      <p1 x="220" y="220"/>
      <p2 x="360" y="220"/>
    </wire>
    <wire>
      <p1 x="180" y="220"/>
      <p2 x="200" y="220"/>
    </wire>
    <wire>
      <p1 x="560" y="260"/>
      <p2 x="560" y="300"/>
    </wire>
    <wire>
      <p1 x="240" y="340"/>
      <p2 x="240" y="480"/>
    </wire>
    <wire>
      <p1 x="180" y="200"/>
      <p2 x="180" y="220"/>
    </wire>
    <wire>
      <p1 x="180" y="380"/>
      <p2 x="180" y="500"/>
    </wire>
    <wire>
      <p1 x="580" y="320"/>
      <p2 x="580" y="400"/>
    </wire>
    <wire>
      <p1 x="580" y="200"/>
      <p2 x="580" y="300"/>
    </wire>
    <wire>
      <p1 x="340" y="260"/>
      <p2 x="340" y="460"/>
    </wire>
    <wire>
      <p1 x="360" y="220"/>
      <p2 x="360" y="240"/>
    </wire>
    <wire>
      <p1 x="360" y="280"/>
      <p2 x="360" y="340"/>
    </wire>
    <wire>
      <p1 x="520" y="460"/>
      <p2 x="520" y="500"/>
    </wire>
    <wire>
      <p1 x="460" y="280"/>
      <p2 x="460" y="380"/>
    </wire>
    <wire>
      <p1 x="380" y="400"/>
      <p2 x="380" y="440"/>
    </wire>
  </wires>
  <measurementOrdering/>
</circuit>