<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<project source="2.7.1" version="1.0">
This file is intended to be loaded by Logisim (http://www.cburch.com/logisim/).
<lib desc="#Wiring" name="0"/>
  <lib desc="#Gates" name="1"/>
  <lib desc="#Plexers" name="2"/>
  <lib desc="#Arithmetic" name="3"/>
  <lib desc="#Memory" name="4"/>
  <lib desc="#I/O" name="5"/>
  <lib desc="#Base" name="6">
    <tool name="Text Tool">
      <a name="text" val=""/>
      <a name="font" val="SansSerif plain 12"/>
      <a name="halign" val="center"/>
      <a name="valign" val="base"/>
    </tool>
  </lib>
  <main name="main"/>
  <options>
    <a name="gateUndefined" val="ignore"/>
    <a name="simlimit" val="1000"/>
    <a name="simrand" val="0"/>
  </options>
  <mappings>
    <tool lib="6" map="Button2" name="Menu Tool"/>
    <tool lib="6" map="Ctrl Button1" name="Menu Tool"/>
    <tool lib="6" map="Button3" name="Menu Tool"/>
  </mappings>
  <toolbar>
    <tool lib="6" name="Poke Tool"/>
    <tool lib="6" name="Edit Tool"/>
    <tool lib="6" name="Text Tool">
      <a name="text" val=""/>
      <a name="font" val="SansSerif plain 12"/>
      <a name="halign" val="center"/>
      <a name="valign" val="base"/>
    </tool>
    <sep/>
    <tool lib="0" name="Pin">
      <a name="tristate" val="false"/>
    </tool>
    <tool lib="0" name="Pin">
      <a name="facing" val="west"/>
      <a name="output" val="true"/>
      <a name="labelloc" val="east"/>
    </tool>
    <tool lib="1" name="NOT Gate"/>
    <tool lib="1" name="AND Gate"/>
    <tool lib="1" name="OR Gate"/>
  </toolbar>
  <circuit name="main">
    <a name="circuit" val="main"/>
    <a name="clabel" val=""/>
    <a name="clabelup" val="east"/>
    <a name="clabelfont" val="SansSerif plain 12"/>
    <wire from="(430,100)" to="(430,300)"/>
    <wire from="(140,690)" to="(340,690)"/>
    <wire from="(420,190)" to="(420,310)"/>
    <wire from="(330,190)" to="(350,190)"/>
    <wire from="(340,100)" to="(430,100)"/>
    <wire from="(70,100)" to="(80,100)"/>
    <wire from="(80,300)" to="(150,300)"/>
    <wire from="(410,330)" to="(410,370)"/>
    <wire from="(430,350)" to="(430,550)"/>
    <wire from="(120,710)" to="(360,710)"/>
    <wire from="(130,360)" to="(130,700)"/>
    <wire from="(260,190)" to="(290,190)"/>
    <wire from="(130,50)" to="(130,320)"/>
    <wire from="(410,320)" to="(450,320)"/>
    <wire from="(200,360)" to="(200,660)"/>
    <wire from="(120,350)" to="(120,710)"/>
    <wire from="(260,280)" to="(290,280)"/>
    <wire from="(330,280)" to="(360,280)"/>
    <wire from="(110,30)" to="(370,30)"/>
    <wire from="(230,390)" to="(290,390)"/>
    <wire from="(130,360)" to="(150,360)"/>
    <wire from="(350,190)" to="(420,190)"/>
    <wire from="(180,310)" to="(210,310)"/>
    <wire from="(130,50)" to="(350,50)"/>
    <wire from="(210,210)" to="(290,210)"/>
    <wire from="(80,20)" to="(80,100)"/>
    <wire from="(210,210)" to="(210,310)"/>
    <wire from="(420,340)" to="(450,340)"/>
    <wire from="(120,350)" to="(150,350)"/>
    <wire from="(540,330)" to="(540,400)"/>
    <wire from="(340,640)" to="(340,690)"/>
    <wire from="(410,330)" to="(450,330)"/>
    <wire from="(480,330)" to="(540,330)"/>
    <wire from="(480,310)" to="(500,310)"/>
    <wire from="(370,30)" to="(370,370)"/>
    <wire from="(140,370)" to="(140,690)"/>
    <wire from="(410,280)" to="(410,320)"/>
    <wire from="(260,100)" to="(260,190)"/>
    <wire from="(220,300)" to="(290,300)"/>
    <wire from="(440,290)" to="(450,290)"/>
    <wire from="(430,350)" to="(450,350)"/>
    <wire from="(330,550)" to="(350,550)"/>
    <wire from="(130,320)" to="(150,320)"/>
    <wire from="(260,370)" to="(290,370)"/>
    <wire from="(480,320)" to="(560,320)"/>
    <wire from="(350,550)" to="(430,550)"/>
    <wire from="(440,20)" to="(440,290)"/>
    <wire from="(480,340)" to="(500,340)"/>
    <wire from="(220,300)" to="(220,320)"/>
    <wire from="(260,460)" to="(290,460)"/>
    <wire from="(210,350)" to="(210,570)"/>
    <wire from="(330,460)" to="(360,460)"/>
    <wire from="(420,340)" to="(420,460)"/>
    <wire from="(220,480)" to="(290,480)"/>
    <wire from="(110,30)" to="(110,340)"/>
    <wire from="(440,360)" to="(450,360)"/>
    <wire from="(260,370)" to="(260,460)"/>
    <wire from="(140,60)" to="(340,60)"/>
    <wire from="(80,20)" to="(440,20)"/>
    <wire from="(230,330)" to="(230,390)"/>
    <wire from="(500,250)" to="(560,250)"/>
    <wire from="(130,700)" to="(350,700)"/>
    <wire from="(180,350)" to="(210,350)"/>
    <wire from="(210,570)" to="(290,570)"/>
    <wire from="(180,300)" to="(200,300)"/>
    <wire from="(140,370)" to="(150,370)"/>
    <wire from="(260,280)" to="(260,370)"/>
    <wire from="(200,120)" to="(290,120)"/>
    <wire from="(230,780)" to="(260,780)"/>
    <wire from="(260,100)" to="(290,100)"/>
    <wire from="(180,360)" to="(200,360)"/>
    <wire from="(260,190)" to="(260,280)"/>
    <wire from="(180,340)" to="(220,340)"/>
    <wire from="(360,460)" to="(360,710)"/>
    <wire from="(360,280)" to="(410,280)"/>
    <wire from="(440,360)" to="(440,640)"/>
    <wire from="(540,400)" to="(560,400)"/>
    <wire from="(500,340)" to="(500,450)"/>
    <wire from="(110,340)" to="(150,340)"/>
    <wire from="(260,550)" to="(290,550)"/>
    <wire from="(430,300)" to="(450,300)"/>
    <wire from="(140,310)" to="(150,310)"/>
    <wire from="(220,340)" to="(220,480)"/>
    <wire from="(180,330)" to="(230,330)"/>
    <wire from="(200,120)" to="(200,300)"/>
    <wire from="(360,460)" to="(420,460)"/>
    <wire from="(330,640)" to="(340,640)"/>
    <wire from="(350,50)" to="(350,190)"/>
    <wire from="(260,640)" to="(260,780)"/>
    <wire from="(500,450)" to="(560,450)"/>
    <wire from="(370,370)" to="(410,370)"/>
    <wire from="(260,640)" to="(290,640)"/>
    <wire from="(120,330)" to="(150,330)"/>
    <wire from="(120,40)" to="(360,40)"/>
    <wire from="(420,310)" to="(450,310)"/>
    <wire from="(260,460)" to="(260,550)"/>
    <wire from="(340,640)" to="(440,640)"/>
    <wire from="(360,40)" to="(360,280)"/>
    <wire from="(180,320)" to="(220,320)"/>
    <wire from="(200,660)" to="(290,660)"/>
    <wire from="(120,40)" to="(120,330)"/>
    <wire from="(500,250)" to="(500,310)"/>
    <wire from="(80,100)" to="(80,300)"/>
    <wire from="(330,370)" to="(370,370)"/>
    <wire from="(350,550)" to="(350,700)"/>
    <wire from="(340,60)" to="(340,100)"/>
    <wire from="(140,60)" to="(140,310)"/>
    <wire from="(330,100)" to="(340,100)"/>
    <wire from="(260,550)" to="(260,640)"/>
    <comp lib="4" loc="(330,280)" name="D Flip-Flop">
      <a name="label" val="Y3"/>
    </comp>
    <comp lib="0" loc="(560,400)" name="Pin">
      <a name="facing" val="west"/>
      <a name="output" val="true"/>
      <a name="label" val="OUT1"/>
      <a name="labelloc" val="north"/>
    </comp>
    <comp loc="(480,310)" name="output"/>
    <comp lib="4" loc="(330,640)" name="D Flip-Flop">
      <a name="label" val="Z4"/>
    </comp>
    <comp loc="(180,300)" name="next-state"/>
    <comp lib="4" loc="(330,550)" name="D Flip-Flop">
      <a name="label" val="Z3"/>
    </comp>
    <comp lib="4" loc="(330,100)" name="D Flip-Flop">
      <a name="label" val="S"/>
    </comp>
    <comp lib="4" loc="(330,460)" name="D Flip-Flop">
      <a name="label" val="Z2"/>
    </comp>
    <comp lib="0" loc="(560,450)" name="Pin">
      <a name="facing" val="west"/>
      <a name="output" val="true"/>
      <a name="label" val="OUT0"/>
      <a name="labelloc" val="north"/>
    </comp>
    <comp lib="4" loc="(330,370)" name="D Flip-Flop">
      <a name="label" val="Z1"/>
    </comp>
    <comp lib="0" loc="(230,780)" name="Clock"/>
    <comp lib="4" loc="(330,190)" name="D Flip-Flop">
      <a name="label" val="Y2"/>
    </comp>
    <comp lib="0" loc="(560,320)" name="Pin">
      <a name="facing" val="west"/>
      <a name="output" val="true"/>
      <a name="label" val="OUT2"/>
      <a name="labelloc" val="north"/>
    </comp>
    <comp lib="0" loc="(560,250)" name="Pin">
      <a name="facing" val="west"/>
      <a name="output" val="true"/>
      <a name="label" val="OUT3"/>
      <a name="labelloc" val="north"/>
    </comp>
    <comp lib="0" loc="(70,100)" name="Pin">
      <a name="tristate" val="false"/>
      <a name="label" val="LOC"/>
      <a name="labelloc" val="north"/>
    </comp>
  </circuit>
  <circuit name="next-state">
    <a name="circuit" val="next-state"/>
    <a name="clabel" val=""/>
    <a name="clabelup" val="east"/>
    <a name="clabelfont" val="SansSerif plain 12"/>
    <wire from="(40,330)" to="(180,330)"/>
    <wire from="(80,220)" to="(220,220)"/>
    <wire from="(240,70)" to="(280,70)"/>
    <wire from="(80,90)" to="(80,220)"/>
    <wire from="(40,380)" to="(200,380)"/>
    <wire from="(160,290)" to="(340,290)"/>
    <wire from="(80,90)" to="(280,90)"/>
    <wire from="(200,30)" to="(340,30)"/>
    <wire from="(160,280)" to="(160,290)"/>
    <wire from="(180,330)" to="(180,340)"/>
    <wire from="(320,240)" to="(340,240)"/>
    <wire from="(250,230)" to="(290,230)"/>
    <wire from="(180,340)" to="(340,340)"/>
    <wire from="(40,280)" to="(160,280)"/>
    <wire from="(60,70)" to="(60,240)"/>
    <wire from="(40,80)" to="(80,80)"/>
    <wire from="(60,240)" to="(220,240)"/>
    <wire from="(80,80)" to="(80,90)"/>
    <wire from="(40,230)" to="(140,230)"/>
    <wire from="(140,260)" to="(270,260)"/>
    <wire from="(40,180)" to="(340,180)"/>
    <wire from="(60,70)" to="(220,70)"/>
    <wire from="(200,30)" to="(200,380)"/>
    <wire from="(40,30)" to="(60,30)"/>
    <wire from="(60,30)" to="(60,70)"/>
    <wire from="(270,250)" to="(290,250)"/>
    <wire from="(140,230)" to="(140,260)"/>
    <wire from="(310,80)" to="(340,80)"/>
    <wire from="(270,250)" to="(270,260)"/>
    <wire from="(40,130)" to="(340,130)"/>
    <comp lib="1" loc="(310,80)" name="AND Gate">
      <a name="size" val="30"/>
      <a name="inputs" val="2"/>
    </comp>
    <comp lib="0" loc="(40,330)" name="Pin">
      <a name="tristate" val="false"/>
      <a name="label" val="Z3"/>
      <a name="labelloc" val="north"/>
    </comp>
    <comp lib="0" loc="(40,80)" name="Pin">
      <a name="tristate" val="false"/>
      <a name="label" val="S"/>
      <a name="labelloc" val="north"/>
    </comp>
    <comp lib="0" loc="(40,230)" name="Pin">
      <a name="tristate" val="false"/>
      <a name="label" val="Z1"/>
      <a name="labelloc" val="north"/>
    </comp>
    <comp lib="0" loc="(40,380)" name="Pin">
      <a name="tristate" val="false"/>
      <a name="label" val="Z4"/>
      <a name="labelloc" val="north"/>
    </comp>
    <comp lib="0" loc="(40,280)" name="Pin">
      <a name="tristate" val="false"/>
      <a name="label" val="Z2"/>
      <a name="labelloc" val="north"/>
    </comp>
    <comp lib="0" loc="(340,240)" name="Pin">
      <a name="facing" val="west"/>
      <a name="output" val="true"/>
      <a name="label" val="DZ2"/>
      <a name="labelloc" val="north"/>
    </comp>
    <comp lib="0" loc="(340,80)" name="Pin">
      <a name="facing" val="west"/>
      <a name="output" val="true"/>
      <a name="label" val="DY2"/>
      <a name="labelloc" val="north"/>
    </comp>
    <comp lib="1" loc="(250,230)" name="AND Gate">
      <a name="size" val="30"/>
      <a name="inputs" val="2"/>
    </comp>
    <comp lib="0" loc="(40,30)" name="Pin">
      <a name="tristate" val="false"/>
      <a name="label" val="LOC"/>
      <a name="labelloc" val="north"/>
    </comp>
    <comp lib="0" loc="(340,340)" name="Pin">
      <a name="facing" val="west"/>
      <a name="output" val="true"/>
      <a name="label" val="DZ4"/>
      <a name="labelloc" val="north"/>
    </comp>
    <comp lib="0" loc="(40,130)" name="Pin">
      <a name="tristate" val="false"/>
      <a name="label" val="Y2"/>
      <a name="labelloc" val="north"/>
    </comp>
    <comp lib="0" loc="(340,290)" name="Pin">
      <a name="facing" val="west"/>
      <a name="output" val="true"/>
      <a name="label" val="DZ3"/>
      <a name="labelloc" val="north"/>
    </comp>
    <comp lib="0" loc="(340,130)" name="Pin">
      <a name="facing" val="west"/>
      <a name="output" val="true"/>
      <a name="label" val="DY3"/>
      <a name="labelloc" val="north"/>
    </comp>
    <comp lib="0" loc="(40,180)" name="Pin">
      <a name="tristate" val="false"/>
      <a name="label" val="Y3"/>
      <a name="labelloc" val="north"/>
    </comp>
    <comp lib="1" loc="(320,240)" name="OR Gate">
      <a name="size" val="30"/>
      <a name="inputs" val="2"/>
    </comp>
    <comp lib="0" loc="(340,180)" name="Pin">
      <a name="facing" val="west"/>
      <a name="output" val="true"/>
      <a name="label" val="DZ1"/>
      <a name="labelloc" val="north"/>
    </comp>
    <comp lib="0" loc="(340,30)" name="Pin">
      <a name="facing" val="west"/>
      <a name="output" val="true"/>
      <a name="label" val="DS"/>
      <a name="labelloc" val="north"/>
    </comp>
    <comp lib="1" loc="(240,70)" name="NOT Gate">
      <a name="size" val="20"/>
    </comp>
  </circuit>
  <circuit name="output">
    <a name="circuit" val="output"/>
    <a name="clabel" val=""/>
    <a name="clabelup" val="east"/>
    <a name="clabelfont" val="SansSerif plain 12"/>
    <wire from="(40,290)" to="(160,290)"/>
    <wire from="(270,40)" to="(290,40)"/>
    <wire from="(270,40)" to="(270,50)"/>
    <wire from="(310,260)" to="(330,260)"/>
    <wire from="(380,180)" to="(400,180)"/>
    <wire from="(240,140)" to="(280,140)"/>
    <wire from="(120,90)" to="(220,90)"/>
    <wire from="(80,60)" to="(220,60)"/>
    <wire from="(40,80)" to="(80,80)"/>
    <wire from="(160,220)" to="(160,290)"/>
    <wire from="(140,20)" to="(140,240)"/>
    <wire from="(160,100)" to="(160,220)"/>
    <wire from="(80,60)" to="(80,80)"/>
    <wire from="(320,30)" to="(400,30)"/>
    <wire from="(100,180)" to="(350,180)"/>
    <wire from="(380,230)" to="(400,230)"/>
    <wire from="(40,340)" to="(180,340)"/>
    <wire from="(60,140)" to="(60,250)"/>
    <wire from="(330,240)" to="(350,240)"/>
    <wire from="(60,250)" to="(220,250)"/>
    <wire from="(60,140)" to="(220,140)"/>
    <wire from="(80,80)" to="(80,160)"/>
    <wire from="(40,130)" to="(100,130)"/>
    <wire from="(40,190)" to="(120,190)"/>
    <wire from="(180,190)" to="(180,340)"/>
    <wire from="(180,110)" to="(180,190)"/>
    <wire from="(80,160)" to="(280,160)"/>
    <wire from="(80,160)" to="(80,270)"/>
    <wire from="(240,250)" to="(280,250)"/>
    <wire from="(40,240)" to="(140,240)"/>
    <wire from="(120,90)" to="(120,190)"/>
    <wire from="(310,150)" to="(330,150)"/>
    <wire from="(80,270)" to="(280,270)"/>
    <wire from="(60,30)" to="(60,40)"/>
    <wire from="(200,230)" to="(200,390)"/>
    <wire from="(140,20)" to="(290,20)"/>
    <wire from="(40,390)" to="(200,390)"/>
    <wire from="(160,100)" to="(220,100)"/>
    <wire from="(250,50)" to="(270,50)"/>
    <wire from="(180,190)" to="(350,190)"/>
    <wire from="(180,110)" to="(220,110)"/>
    <wire from="(250,100)" to="(400,100)"/>
    <wire from="(200,230)" to="(350,230)"/>
    <wire from="(60,40)" to="(60,140)"/>
    <wire from="(100,130)" to="(100,180)"/>
    <wire from="(330,170)" to="(350,170)"/>
    <wire from="(330,240)" to="(330,260)"/>
    <wire from="(40,30)" to="(60,30)"/>
    <wire from="(330,150)" to="(330,170)"/>
    <wire from="(160,220)" to="(350,220)"/>
    <wire from="(60,40)" to="(220,40)"/>
    <comp lib="0" loc="(40,240)" name="Pin">
      <a name="tristate" val="false"/>
      <a name="label" val="Z1"/>
      <a name="labelloc" val="north"/>
    </comp>
    <comp lib="1" loc="(310,150)" name="AND Gate">
      <a name="size" val="30"/>
      <a name="inputs" val="2"/>
    </comp>
    <comp lib="0" loc="(40,340)" name="Pin">
      <a name="tristate" val="false"/>
      <a name="label" val="Z3"/>
      <a name="labelloc" val="north"/>
    </comp>
    <comp lib="0" loc="(40,390)" name="Pin">
      <a name="tristate" val="false"/>
      <a name="label" val="Z4"/>
      <a name="labelloc" val="north"/>
    </comp>
    <comp lib="1" loc="(240,250)" name="NOT Gate">
      <a name="size" val="20"/>
    </comp>
    <comp lib="1" loc="(380,180)" name="OR Gate">
      <a name="size" val="30"/>
      <a name="inputs" val="3"/>
    </comp>
    <comp lib="1" loc="(250,100)" name="OR Gate">
      <a name="size" val="30"/>
      <a name="inputs" val="3"/>
    </comp>
    <comp lib="1" loc="(250,50)" name="AND Gate">
      <a name="size" val="30"/>
      <a name="inputs" val="2"/>
    </comp>
    <comp lib="0" loc="(40,290)" name="Pin">
      <a name="tristate" val="false"/>
      <a name="label" val="Z2"/>
      <a name="labelloc" val="north"/>
    </comp>
    <comp lib="1" loc="(380,230)" name="OR Gate">
      <a name="size" val="30"/>
      <a name="inputs" val="3"/>
    </comp>
    <comp lib="1" loc="(310,260)" name="AND Gate">
      <a name="size" val="30"/>
      <a name="inputs" val="2"/>
    </comp>
    <comp lib="1" loc="(240,140)" name="NOT Gate">
      <a name="size" val="20"/>
    </comp>
    <comp lib="0" loc="(400,180)" name="Pin">
      <a name="facing" val="west"/>
      <a name="output" val="true"/>
      <a name="label" val="OUT1"/>
      <a name="labelloc" val="north"/>
    </comp>
    <comp lib="0" loc="(40,190)" name="Pin">
      <a name="tristate" val="false"/>
      <a name="label" val="Y3"/>
      <a name="labelloc" val="north"/>
    </comp>
    <comp lib="0" loc="(40,30)" name="Pin">
      <a name="tristate" val="false"/>
      <a name="label" val="LOC"/>
      <a name="labelloc" val="north"/>
    </comp>
    <comp lib="0" loc="(400,30)" name="Pin">
      <a name="facing" val="west"/>
      <a name="output" val="true"/>
      <a name="label" val="OUT3"/>
      <a name="labelloc" val="north"/>
    </comp>
    <comp lib="0" loc="(40,80)" name="Pin">
      <a name="tristate" val="false"/>
      <a name="label" val="S"/>
      <a name="labelloc" val="north"/>
    </comp>
    <comp lib="0" loc="(400,230)" name="Pin">
      <a name="facing" val="west"/>
      <a name="output" val="true"/>
      <a name="label" val="OUT0"/>
      <a name="labelloc" val="north"/>
    </comp>
    <comp lib="0" loc="(400,100)" name="Pin">
      <a name="facing" val="west"/>
      <a name="output" val="true"/>
      <a name="label" val="OUT2"/>
      <a name="labelloc" val="north"/>
    </comp>
    <comp lib="1" loc="(320,30)" name="OR Gate">
      <a name="size" val="30"/>
      <a name="inputs" val="2"/>
    </comp>
    <comp lib="0" loc="(40,130)" name="Pin">
      <a name="tristate" val="false"/>
      <a name="label" val="Y2"/>
      <a name="labelloc" val="north"/>
    </comp>
  </circuit>
</project>
