Skip to content

Instantly share code, notes, and snippets.

@karaketir16
Last active December 22, 2024 14:36
Show Gist options
  • Save karaketir16/06062632822996b16387ff71c906f662 to your computer and use it in GitHub Desktop.
Save karaketir16/06062632822996b16387ff71c906f662 to your computer and use it in GitHub Desktop.

Simple CPU Instruction Set

Overview

  • 12-bit registers: R0--R7 (3-bit register indices).
  • R0 is hardwired to zero.
  • All instructions are 16 bits.
  • Instruction groups by opcode patterns:
    • 0000 (0x0): Arithmetic & Shift Instructions (with funct field)
    • 0001 (0x1): Logical Instructions (with funct field)
    • 0010 (0x2): Load Immediate Low
    • 0011 (0x3): Load Immediate Upper
    • 0100–1000 (0x4–0x8): Branch Instructions
    • 1001 (0x9): Jump Instructions
    • 1010 (0xA): Jump Register
    • 1011 (0xB): Load Word
    • 1100 (0xC): Store Word
    • 1101–1111 (0xD–0xF): Reserved for future extensions

Opcodes and Functions

0000 (0x0): Arithmetic & Instructions

funct Mnemonic Description
000 ADD rd,rs,rt rd = rs + rt
001 SUB rd,rs,rt rd = rs - rt
010 AND rd,rs,rt rd = rs & rt
011 OR rd,rs,rt `rd = rs
100 XOR rd,rs,rt rd = rs ^ rt
101 SRA rd,rs,rt rd = rs >> rt (arith)
110 SLL rd,rs,rt rd = rs << rt
111 SRL rd,rs,rt rd = rs >> rt (logical)

0001 (0x1): Future use

0010 (0x2): Load Immediate Low

Mnemonic Description
LIL rd, imm rd = imm (9-bit lower immediate)

0011 (0x3): Load Immediate Upper

Mnemonic Description
LIU rd, imm rd = imm << 3 (shifted upper immediate)

0100–1000 (0x4–0x8): Branch Instructions

Mnemonic Opcode (hex) Description
BEQ rs,rt,off 0x4 if (rs == rt) PC += off
BLTU rs,rt,off 0x5 if (rs < rt) unsigned PC += off
BLTS rs,rt,off 0x6 if (rs < rt) signed PC += off
BLTEU rs,rt,off 0x7 if (rs <= rt) unsigned PC += off
BLTES rs,rt,off 0x8 if (rs <= rt) signed PC += off

1001 (0x9): Jump Instructions

Mnemonic Description
J addr PC = addr

1010 (0xA): Jump Register

Mnemonic Description
JR rs PC = R[rs]

1011 (0xB): Load Word

Mnemonic Description
LW rd,base,off rd = Mem[base + off]

1100 (0xC): Store Word

Mnemonic Description
SW rs,base,off Mem[base + off] = rs

(0xD–0xF reserved for future extensions.)


Instruction Formats

R-Type (Arithmetic/Shift/Logical)

| opcode (4b) | rd (3b) | rs (3b) | rt (3b) | funct (3b) |

  • bits[15..12]: opcode
  • bits[11..9]: rd (destination register)
  • bits[8..6]: rs (source register)
  • bits[5..3]: rt (source register)
  • bits[2..0]: funct (specific operation)

I-Type (Load Immediate)

| opcode (4b) | rd (3b) | imm (9b) |

  • bits[15..12]: opcode
  • bits[11..9]: rd (destination register)
  • bits[8..0]: imm (9-bit immediate)

Branch

| opcode (4b) | rs (3b) | rt (3b) | offset (6b) |

  • bits[15..12]: opcode
  • bits[11..9]: rs (register tested)
  • bits[8..6]: rt (comparison register)
  • bits[5..0]: offset (6-bit signed offset)

Jump (J)

| opcode (4b) | addr (12b) |

  • bits[15..12]: opcode
  • bits[11..0]: addr (12-bit address)

Jump Register (JR)

| opcode (4b) | rs (3b) | unused (9b) |

  • bits[15..12]: opcode
  • bits[11..9]: rs (register containing target address)
  • bits[8..0]: unused = 0

Load/Store

| opcode (4b) | rd/rs (3b) | base (3b) | offset (6b) |

  • bits[15..12]: opcode
  • bits[11..9]: For LW: rd (destination), For SW: rs (source)
  • bits[8..6]: base (base register)
  • bits[5..0]: offset (6-bit signed offset)

Summary

  • 0000 (0x0) + funct: Arithmetic & Shift Instructions
  • 0001 (0x1) + funct: Logical Instructions
  • 0010 (0x2): LIL (Load Immediate Low)
  • 0011 (0x3): LIU (Load Immediate Upper)
  • 0100–1000 (0x4–0x8): Branch Instructions
  • 1001 (0x9): Jump
  • 1010 (0xA): Jump Register
  • 1011 (0xB): Load Word
  • 1100 (0xC): Store Word
  • 1101–1111 (0xD–0xF): Reserved for future extensions.
import sys
def assemble(instructions):
REGISTERS = {
"R0": 0, "R1": 1, "R2": 2, "R3": 3,
"R4": 4, "R5": 5, "R6": 6, "R7": 7
}
OPCODES = {
"ADD": 0x0, "SUB": 0x0, "AND": 0x0, "OR": 0x0, "XOR": 0x0,
"SRA": 0x0, "SLL": 0x0, "SRL": 0x0, "LIL": 0x2, "LIU": 0x3,
"BEQ": 0x4, "BLTU": 0x5, "BLTS": 0x6, "BLTEU": 0x7, "BLTES": 0x8,
"J": 0x9, "JR": 0xA, "LW": 0xB, "SW": 0xC
}
FUNCT_CODES = {
"ADD": 0b000, "SUB": 0b001, "AND": 0b010, "OR": 0b011,
"XOR": 0b100, "SRA": 0b101, "SLL": 0b110, "SRL": 0b111
}
assembled = []
for line in instructions.splitlines():
line = line.split("#")[0].strip() # Remove comments
if not line:
continue
parts = line.replace(',', ' ').split()
mnemonic = parts[0].upper()
if mnemonic in ["ADD", "SUB", "AND", "OR", "XOR", "SRA", "SLL", "SRL"]:
rd = REGISTERS[parts[1]]
rs = REGISTERS[parts[2]]
rt = REGISTERS[parts[3]]
funct = FUNCT_CODES[mnemonic]
opcode = OPCODES[mnemonic]
instr = (opcode << 12) | (rd << 9) | (rs << 6) | (rt << 3) | funct
elif mnemonic in ["LIL", "LIU"]:
rd = REGISTERS[parts[1]]
imm = int(parts[2]) & 0x1FF
opcode = OPCODES[mnemonic]
instr = (opcode << 12) | (rd << 9) | imm
elif mnemonic in ["BEQ", "BLTU", "BLTS", "BLTEU", "BLTES"]:
rs = REGISTERS[parts[1]]
rt = REGISTERS[parts[2]]
offset = int(parts[3]) & 0x3F
opcode = OPCODES[mnemonic]
instr = (opcode << 12) | (rs << 9) | (rt << 6) | offset
elif mnemonic == "J":
addr = int(parts[1]) & 0xFFF
opcode = OPCODES[mnemonic]
instr = (opcode << 12) | addr
elif mnemonic == "JR":
rs = REGISTERS[parts[1]]
opcode = OPCODES[mnemonic]
instr = (opcode << 12) | (rs << 9)
elif mnemonic in ["LW", "SW"]:
rd_rs = REGISTERS[parts[1]]
base = REGISTERS[parts[2]]
offset = int(parts[3]) & 0x3F
opcode = OPCODES[mnemonic]
instr = (opcode << 12) | (rd_rs << 9) | (base << 6) | offset
else:
print(f"Unknown mnemonic: {mnemonic}")
continue
# Convert to little endian
instr_bytes = instr.to_bytes(2, byteorder='little')
assembled.append(instr_bytes.hex())
return assembled
# Example input
assembly_code = """
LIL R1, 15 # Load Immediate Low
LIU R2, 8 # Load Immediate Upper
ADD R3, R1, R2 # R3 = R1 + R2
BEQ R3, R0, 4 # Branch if Equal
J 1024 # Jump to address 1024
LW R4, R1, 2 # Load Word
SW R4, R1, 2 # Store Word
JR R2 # Jump Register
"""
if __name__ == "__main__":
machine_code = assemble(assembly_code)
print("Assembled Machine Code (Little Endian Hex):")
for instr in machine_code:
print(instr)
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<project source="3.9.0" version="1.0">
This file is intended to be loaded by Logisim-evolution v3.9.0(https://github.com/logisim-evolution/).
<lib desc="#Wiring" name="0">
<tool name="Pin">
<a name="appearance" val="classic"/>
</tool>
</lib>
<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="#TTL" name="6"/>
<lib desc="#TCL" name="7"/>
<lib desc="#Base" name="8"/>
<lib desc="#BFH-Praktika" name="9"/>
<lib desc="#Input/Output-Extra" name="10"/>
<lib desc="#Soc" name="11"/>
<main name="ALU"/>
<options>
<a name="gateUndefined" val="ignore"/>
<a name="simlimit" val="1000"/>
<a name="simrand" val="0"/>
</options>
<mappings>
<tool lib="8" map="Button2" name="Poke Tool"/>
<tool lib="8" map="Button3" name="Menu Tool"/>
<tool lib="8" map="Ctrl Button1" name="Menu Tool"/>
</mappings>
<toolbar>
<tool lib="8" name="Poke Tool"/>
<tool lib="8" name="Edit Tool"/>
<tool lib="8" name="Wiring Tool"/>
<tool lib="8" name="Text Tool"/>
<sep/>
<tool lib="0" name="Pin"/>
<tool lib="0" name="Pin">
<a name="facing" val="west"/>
<a name="output" val="true"/>
</tool>
<sep/>
<tool lib="1" name="NOT Gate"/>
<tool lib="1" name="AND Gate"/>
<tool lib="1" name="OR Gate"/>
<tool lib="1" name="XOR Gate"/>
<tool lib="1" name="NAND Gate"/>
<tool lib="1" name="NOR Gate"/>
<sep/>
<tool lib="4" name="D Flip-Flop"/>
<tool lib="4" name="Register"/>
</toolbar>
<circuit name="main">
<a name="appearance" val="logisim_evolution"/>
<a name="circuit" val="main"/>
<a name="circuitnamedboxfixedsize" val="true"/>
<a name="simulationFrequency" val="1.0"/>
<comp lib="0" loc="(1000,1360)" name="Tunnel">
<a name="label" val="opcode"/>
<a name="width" val="4"/>
</comp>
<comp lib="0" loc="(1010,330)" name="Tunnel">
<a name="facing" val="east"/>
<a name="label" val="Clk"/>
</comp>
<comp lib="0" loc="(1020,160)" name="Probe">
<a name="appearance" val="NewPins"/>
<a name="radix" val="16"/>
</comp>
<comp lib="0" loc="(1030,1390)" name="Tunnel">
<a name="label" val="R_X"/>
<a name="labelfont" val="Monospaced bold 16"/>
<a name="width" val="3"/>
</comp>
<comp lib="0" loc="(1030,1420)" name="Tunnel">
<a name="label" val="R_Y"/>
<a name="labelfont" val="Monospaced bold 16"/>
<a name="width" val="3"/>
</comp>
<comp lib="0" loc="(1040,1080)" name="Tunnel">
<a name="label" val="R_X"/>
<a name="labelfont" val="Monospaced bold 16"/>
<a name="width" val="3"/>
</comp>
<comp lib="0" loc="(1040,1110)" name="Tunnel">
<a name="label" val="R_Y"/>
<a name="labelfont" val="Monospaced bold 16"/>
<a name="width" val="3"/>
</comp>
<comp lib="0" loc="(1040,1140)" name="Tunnel">
<a name="label" val="R_Z"/>
<a name="labelfont" val="Monospaced bold 16"/>
<a name="width" val="3"/>
</comp>
<comp lib="0" loc="(1040,1520)" name="Tunnel">
<a name="facing" val="east"/>
<a name="label" val="BranchOffset"/>
<a name="labelfont" val="Monospaced bold 16"/>
<a name="width" val="6"/>
</comp>
<comp lib="0" loc="(1040,430)" name="Tunnel">
<a name="label" val="Instruction"/>
<a name="width" val="16"/>
</comp>
<comp lib="0" loc="(1050,760)" name="Tunnel">
<a name="label" val="LoadImmLower"/>
</comp>
<comp lib="0" loc="(1050,790)" name="Tunnel">
<a name="label" val="LoadImmUpper"/>
</comp>
<comp lib="0" loc="(1060,1580)" name="Tunnel">
<a name="facing" val="east"/>
<a name="label" val="PC_Val"/>
<a name="labelfont" val="Monospaced bold 16"/>
<a name="width" val="12"/>
</comp>
<comp lib="0" loc="(1070,730)" name="Tunnel">
<a name="label" val="AritmeticOp"/>
</comp>
<comp lib="0" loc="(1070,820)" name="Tunnel">
<a name="label" val="BranchEqual"/>
</comp>
<comp lib="0" loc="(1070,850)" name="Tunnel">
<a name="label" val="BranchLTUnsigned"/>
</comp>
<comp lib="0" loc="(1070,880)" name="Tunnel">
<a name="label" val="BranchLTSigned"/>
</comp>
<comp lib="0" loc="(1070,910)" name="Tunnel">
<a name="label" val="BranchLTEqUnsigned"/>
</comp>
<comp lib="0" loc="(1070,940)" name="Tunnel">
<a name="label" val="BranchLTEqSigned"/>
</comp>
<comp lib="0" loc="(1070,970)" name="Tunnel">
<a name="label" val="JumpOp"/>
</comp>
<comp lib="0" loc="(1090,1520)" name="Bit Extender">
<a name="in_width" val="6"/>
<a name="out_width" val="12"/>
</comp>
<comp lib="0" loc="(1160,1510)" name="Constant">
<a name="value" val="0x0"/>
</comp>
<comp lib="0" loc="(1210,340)" name="Probe">
<a name="appearance" val="NewPins"/>
<a name="radix" val="16"/>
</comp>
<comp lib="0" loc="(1220,1090)" name="Tunnel">
<a name="facing" val="east"/>
<a name="label" val="Instruction"/>
<a name="width" val="16"/>
</comp>
<comp lib="0" loc="(1240,1090)" name="Splitter">
<a name="bit0" val="2"/>
<a name="bit1" val="2"/>
<a name="bit10" val="1"/>
<a name="bit11" val="1"/>
<a name="bit12" val="0"/>
<a name="bit13" val="0"/>
<a name="bit14" val="0"/>
<a name="bit15" val="0"/>
<a name="bit3" val="2"/>
<a name="bit4" val="2"/>
<a name="bit5" val="2"/>
<a name="bit6" val="2"/>
<a name="bit7" val="2"/>
<a name="bit8" val="2"/>
<a name="bit9" val="1"/>
<a name="fanout" val="4"/>
<a name="incoming" val="16"/>
</comp>
<comp lib="0" loc="(1240,1560)" name="Tunnel">
<a name="label" val="BranchAddr"/>
<a name="labelfont" val="Monospaced bold 16"/>
<a name="width" val="12"/>
</comp>
<comp lib="0" loc="(1280,1210)" name="Constant">
<a name="value" val="0x0"/>
<a name="width" val="3"/>
</comp>
<comp lib="0" loc="(1290,1160)" name="Constant">
<a name="value" val="0x0"/>
<a name="width" val="3"/>
</comp>
<comp lib="0" loc="(1310,1190)" name="Splitter">
<a name="bit0" val="1"/>
<a name="bit10" val="0"/>
<a name="bit11" val="0"/>
<a name="bit2" val="1"/>
<a name="bit3" val="0"/>
<a name="bit4" val="0"/>
<a name="bit5" val="0"/>
<a name="bit6" val="0"/>
<a name="bit7" val="0"/>
<a name="bit8" val="0"/>
<a name="bit9" val="0"/>
<a name="facing" val="west"/>
<a name="incoming" val="12"/>
</comp>
<comp lib="0" loc="(1320,1050)" name="Tunnel">
<a name="label" val="opcode"/>
<a name="width" val="4"/>
</comp>
<comp lib="0" loc="(1320,1140)" name="Splitter">
<a name="bit1" val="0"/>
<a name="bit10" val="1"/>
<a name="bit11" val="1"/>
<a name="bit2" val="0"/>
<a name="bit3" val="0"/>
<a name="bit4" val="0"/>
<a name="bit5" val="0"/>
<a name="bit6" val="0"/>
<a name="bit7" val="0"/>
<a name="bit8" val="0"/>
<a name="bit9" val="1"/>
<a name="facing" val="west"/>
<a name="incoming" val="12"/>
</comp>
<comp lib="0" loc="(1320,1140)" name="Tunnel">
<a name="label" val="ImmediateAsLower"/>
<a name="labelfont" val="Monospaced bold 16"/>
<a name="width" val="12"/>
</comp>
<comp lib="0" loc="(1320,1190)" name="Tunnel">
<a name="label" val="ImmediateAsUpper"/>
<a name="labelfont" val="Monospaced bold 16"/>
<a name="width" val="12"/>
</comp>
<comp lib="0" loc="(1350,1080)" name="Tunnel">
<a name="label" val="R_X"/>
<a name="labelfont" val="Monospaced bold 16"/>
<a name="width" val="3"/>
</comp>
<comp lib="0" loc="(140,630)" name="Constant"/>
<comp lib="0" loc="(140,660)" name="Tunnel">
<a name="facing" val="east"/>
<a name="label" val="Clk"/>
</comp>
<comp lib="0" loc="(1560,1080)" name="Tunnel">
<a name="facing" val="east"/>
<a name="label" val="Instruction"/>
<a name="width" val="16"/>
</comp>
<comp lib="0" loc="(1570,170)" name="Tunnel">
<a name="facing" val="east"/>
<a name="label" val="RegWriteEnable"/>
</comp>
<comp lib="0" loc="(1570,200)" name="Tunnel">
<a name="facing" val="east"/>
<a name="label" val="RegOut0Select"/>
<a name="labelfont" val="Monospaced bold 16"/>
<a name="width" val="3"/>
</comp>
<comp lib="0" loc="(1570,230)" name="Tunnel">
<a name="facing" val="east"/>
<a name="label" val="RegOut1Select"/>
<a name="labelfont" val="Monospaced bold 16"/>
<a name="width" val="3"/>
</comp>
<comp lib="0" loc="(1580,1080)" name="Splitter">
<a name="bit0" val="1"/>
<a name="bit10" val="1"/>
<a name="bit11" val="1"/>
<a name="bit12" val="0"/>
<a name="bit13" val="0"/>
<a name="bit14" val="0"/>
<a name="bit15" val="0"/>
<a name="bit2" val="1"/>
<a name="bit3" val="1"/>
<a name="bit4" val="1"/>
<a name="bit5" val="1"/>
<a name="bit6" val="1"/>
<a name="bit7" val="1"/>
<a name="bit8" val="1"/>
<a name="bit9" val="1"/>
<a name="fanout" val="4"/>
<a name="incoming" val="16"/>
</comp>
<comp lib="0" loc="(1580,90)" name="Tunnel">
<a name="facing" val="east"/>
<a name="label" val="RegWriteVal"/>
<a name="width" val="12"/>
</comp>
<comp lib="0" loc="(1590,640)" name="Tunnel">
<a name="facing" val="east"/>
<a name="label" val="AritmeticOp"/>
</comp>
<comp lib="0" loc="(1590,770)" name="Tunnel">
<a name="facing" val="east"/>
<a name="label" val="S_decode"/>
</comp>
<comp lib="0" loc="(1600,130)" name="Tunnel">
<a name="facing" val="east"/>
<a name="label" val="RegWriteSelect"/>
<a name="labelfont" val="Monospaced bold 16"/>
<a name="width" val="3"/>
</comp>
<comp lib="0" loc="(1610,670)" name="Tunnel">
<a name="facing" val="east"/>
<a name="label" val="LoadImmLower"/>
</comp>
<comp lib="0" loc="(1610,700)" name="Tunnel">
<a name="facing" val="east"/>
<a name="label" val="LoadImmUpper"/>
</comp>
<comp lib="0" loc="(1620,510)" name="Tunnel">
<a name="facing" val="east"/>
<a name="label" val="R_X"/>
<a name="labelfont" val="Monospaced bold 16"/>
<a name="width" val="3"/>
</comp>
<comp lib="0" loc="(1650,1070)" name="Tunnel">
<a name="label" val="JumpAddr"/>
<a name="labelfont" val="Monospaced bold 16"/>
<a name="width" val="12"/>
</comp>
<comp lib="0" loc="(1650,190)" name="Tunnel">
<a name="facing" val="east"/>
<a name="label" val="Clk"/>
</comp>
<comp lib="0" loc="(1670,1040)" name="Tunnel">
<a name="label" val="opcode"/>
<a name="width" val="4"/>
</comp>
<comp lib="0" loc="(1730,1160)" name="Tunnel">
<a name="facing" val="east"/>
<a name="label" val="R_Y"/>
<a name="labelfont" val="Monospaced bold 16"/>
<a name="width" val="3"/>
</comp>
<comp lib="0" loc="(1730,1190)" name="Tunnel">
<a name="facing" val="east"/>
<a name="label" val="R_Z"/>
<a name="labelfont" val="Monospaced bold 16"/>
<a name="width" val="3"/>
</comp>
<comp lib="0" loc="(1730,1230)" name="Tunnel">
<a name="facing" val="east"/>
<a name="label" val="R_X"/>
<a name="labelfont" val="Monospaced bold 16"/>
<a name="width" val="3"/>
</comp>
<comp lib="0" loc="(1730,1260)" name="Tunnel">
<a name="facing" val="east"/>
<a name="label" val="R_Y"/>
<a name="labelfont" val="Monospaced bold 16"/>
<a name="width" val="3"/>
</comp>
<comp lib="0" loc="(1750,480)" name="Probe">
<a name="appearance" val="NewPins"/>
</comp>
<comp lib="0" loc="(1780,1160)" name="Splitter">
<a name="bit1" val="0"/>
<a name="bit2" val="0"/>
<a name="bit3" val="1"/>
<a name="bit4" val="1"/>
<a name="bit5" val="1"/>
<a name="facing" val="west"/>
<a name="incoming" val="6"/>
</comp>
<comp lib="0" loc="(1780,1230)" name="Splitter">
<a name="bit1" val="0"/>
<a name="bit2" val="0"/>
<a name="bit3" val="1"/>
<a name="bit4" val="1"/>
<a name="bit5" val="1"/>
<a name="facing" val="west"/>
<a name="incoming" val="6"/>
</comp>
<comp lib="0" loc="(1780,530)" name="Tunnel">
<a name="label" val="RegWriteSelect"/>
<a name="width" val="3"/>
</comp>
<comp lib="0" loc="(1790,700)" name="Tunnel">
<a name="label" val="RegWriteEnable"/>
</comp>
<comp lib="0" loc="(1850,1390)" name="Tunnel">
<a name="facing" val="east"/>
<a name="label" val="AritmeticOp"/>
</comp>
<comp lib="0" loc="(1850,1440)" name="Tunnel">
<a name="facing" val="east"/>
<a name="label" val="BranchInst"/>
</comp>
<comp lib="0" loc="(1850,1520)" name="Tunnel">
<a name="facing" val="east"/>
<a name="label" val="S_decode"/>
</comp>
<comp lib="0" loc="(1970,40)" name="Tunnel">
<a name="label" val="RegOut0"/>
<a name="labelfont" val="Monospaced bold 16"/>
<a name="width" val="12"/>
</comp>
<comp lib="0" loc="(1970,70)" name="Tunnel">
<a name="label" val="RegOut1"/>
<a name="labelfont" val="Monospaced bold 16"/>
<a name="width" val="12"/>
</comp>
<comp lib="0" loc="(1990,880)" name="Tunnel">
<a name="facing" val="east"/>
<a name="label" val="BranchLTSigned"/>
</comp>
<comp lib="0" loc="(1990,910)" name="Tunnel">
<a name="facing" val="east"/>
<a name="label" val="BranchLTEqSigned"/>
</comp>
<comp lib="0" loc="(2010,1230)" name="Probe">
<a name="appearance" val="NewPins"/>
</comp>
<comp lib="0" loc="(2040,1280)" name="Splitter">
<a name="bit1" val="0"/>
<a name="bit2" val="0"/>
<a name="bit3" val="1"/>
<a name="bit4" val="1"/>
<a name="bit5" val="1"/>
<a name="incoming" val="6"/>
</comp>
<comp lib="0" loc="(2050,480)" name="Tunnel">
<a name="facing" val="east"/>
<a name="label" val="AluResult"/>
<a name="width" val="12"/>
</comp>
<comp lib="0" loc="(2060,810)" name="Tunnel">
<a name="facing" val="east"/>
<a name="label" val="RegOut0"/>
<a name="labelfont" val="Monospaced bold 16"/>
<a name="width" val="12"/>
</comp>
<comp lib="0" loc="(2060,840)" name="Tunnel">
<a name="facing" val="east"/>
<a name="label" val="RegOut1"/>
<a name="labelfont" val="Monospaced bold 16"/>
<a name="width" val="12"/>
</comp>
<comp lib="0" loc="(2110,1250)" name="Tunnel">
<a name="label" val="RegOut0Select"/>
<a name="labelfont" val="Monospaced bold 16"/>
<a name="width" val="3"/>
</comp>
<comp lib="0" loc="(2110,1280)" name="Tunnel">
<a name="label" val="RegOut1Select"/>
<a name="labelfont" val="Monospaced bold 16"/>
<a name="width" val="3"/>
</comp>
<comp lib="0" loc="(2130,510)" name="Tunnel">
<a name="facing" val="east"/>
<a name="label" val="ImmediateAsLower"/>
<a name="labelfont" val="Monospaced bold 16"/>
<a name="width" val="12"/>
</comp>
<comp lib="0" loc="(2130,540)" name="Tunnel">
<a name="facing" val="east"/>
<a name="label" val="ImmediateAsUpper"/>
<a name="labelfont" val="Monospaced bold 16"/>
<a name="width" val="12"/>
</comp>
<comp lib="0" loc="(2180,140)" name="Tunnel">
<a name="facing" val="east"/>
<a name="label" val="aluFunc"/>
<a name="width" val="3"/>
</comp>
<comp lib="0" loc="(2180,200)" name="Probe">
<a name="appearance" val="NewPins"/>
<a name="radix" val="16"/>
</comp>
<comp lib="0" loc="(2180,220)" name="Probe">
<a name="appearance" val="NewPins"/>
<a name="radix" val="16"/>
</comp>
<comp lib="0" loc="(2180,260)" name="Probe">
<a name="appearance" val="NewPins"/>
</comp>
<comp lib="0" loc="(2240,80)" name="Probe">
<a name="appearance" val="NewPins"/>
<a name="radix" val="16"/>
</comp>
<comp lib="0" loc="(2260,430)" name="Probe">
<a name="appearance" val="NewPins"/>
<a name="radix" val="16"/>
</comp>
<comp lib="0" loc="(2280,530)" name="Tunnel">
<a name="label" val="RegWriteVal"/>
<a name="width" val="12"/>
</comp>
<comp lib="0" loc="(2300,1130)" name="Tunnel">
<a name="facing" val="east"/>
<a name="label" val="S_decode"/>
</comp>
<comp lib="0" loc="(2310,1020)" name="Tunnel">
<a name="facing" val="east"/>
<a name="label" val="BranchLTSigned"/>
</comp>
<comp lib="0" loc="(2310,1050)" name="Tunnel">
<a name="facing" val="east"/>
<a name="label" val="BranchLTEqUnsigned"/>
</comp>
<comp lib="0" loc="(2310,1080)" name="Tunnel">
<a name="facing" val="east"/>
<a name="label" val="BranchLTEqSigned"/>
</comp>
<comp lib="0" loc="(2310,960)" name="Tunnel">
<a name="facing" val="east"/>
<a name="label" val="BranchEqual"/>
</comp>
<comp lib="0" loc="(2310,990)" name="Tunnel">
<a name="facing" val="east"/>
<a name="label" val="BranchLTUnsigned"/>
</comp>
<comp lib="0" loc="(2520,100)" name="Tunnel">
<a name="label" val="AluResult"/>
<a name="width" val="12"/>
</comp>
<comp lib="0" loc="(2520,1220)" name="Tunnel">
<a name="facing" val="east"/>
<a name="label" val="JumpAddr"/>
<a name="labelfont" val="Monospaced bold 16"/>
<a name="width" val="12"/>
</comp>
<comp lib="0" loc="(2520,1250)" name="Tunnel">
<a name="facing" val="east"/>
<a name="label" val="BranchAddr"/>
<a name="labelfont" val="Monospaced bold 16"/>
<a name="width" val="12"/>
</comp>
<comp lib="0" loc="(2560,1060)" name="Tunnel">
<a name="label" val="BranchInst"/>
</comp>
<comp lib="0" loc="(2560,840)" name="Tunnel">
<a name="label" val="TakeBrach"/>
</comp>
<comp lib="0" loc="(2570,1370)" name="Tunnel">
<a name="facing" val="east"/>
<a name="label" val="JumpOp"/>
</comp>
<comp lib="0" loc="(2570,1400)" name="Tunnel">
<a name="facing" val="east"/>
<a name="label" val="TakeBrach"/>
</comp>
<comp lib="0" loc="(2610,1480)" name="Tunnel">
<a name="facing" val="east"/>
<a name="label" val="S_decode"/>
</comp>
<comp lib="0" loc="(2770,1190)" name="Probe">
<a name="appearance" val="NewPins"/>
</comp>
<comp lib="0" loc="(2900,970)" name="Tunnel">
<a name="facing" val="east"/>
<a name="label" val="PC_WE"/>
<a name="labelfont" val="Monospaced bold 16"/>
</comp>
<comp lib="0" loc="(2910,1220)" name="Tunnel">
<a name="facing" val="east"/>
<a name="label" val="PC_Val"/>
<a name="labelfont" val="Monospaced bold 16"/>
<a name="width" val="12"/>
</comp>
<comp lib="0" loc="(2910,930)" name="Tunnel">
<a name="facing" val="east"/>
<a name="label" val="PC_NextVal"/>
<a name="labelfont" val="Monospaced bold 16"/>
<a name="width" val="12"/>
</comp>
<comp lib="0" loc="(2930,990)" name="Tunnel">
<a name="facing" val="east"/>
<a name="label" val="Clk"/>
</comp>
<comp lib="0" loc="(2950,1310)" name="Tunnel">
<a name="facing" val="east"/>
<a name="label" val="S_last"/>
</comp>
<comp lib="0" loc="(2970,1350)" name="Tunnel">
<a name="facing" val="east"/>
<a name="label" val="S_fetch_0"/>
</comp>
<comp lib="0" loc="(3030,950)" name="Tunnel">
<a name="label" val="PC_Val"/>
<a name="labelfont" val="Monospaced bold 16"/>
<a name="width" val="12"/>
</comp>
<comp lib="0" loc="(3110,1230)" name="Tunnel">
<a name="label" val="PC_NextVal"/>
<a name="labelfont" val="Monospaced bold 16"/>
<a name="width" val="12"/>
</comp>
<comp lib="0" loc="(3140,1340)" name="Tunnel">
<a name="label" val="PC_WE"/>
<a name="labelfont" val="Monospaced bold 16"/>
</comp>
<comp lib="0" loc="(330,190)" name="Tunnel">
<a name="facing" val="east"/>
<a name="label" val="PC_Val"/>
<a name="labelfont" val="Monospaced bold 16"/>
<a name="width" val="12"/>
</comp>
<comp lib="0" loc="(350,230)" name="Constant">
<a name="value" val="0x0"/>
</comp>
<comp lib="0" loc="(450,520)" name="Tunnel">
<a name="label" val="S_fetch_0"/>
</comp>
<comp lib="0" loc="(450,550)" name="Tunnel">
<a name="label" val="S_fetch_1"/>
</comp>
<comp lib="0" loc="(450,580)" name="Tunnel">
<a name="label" val="S_decode"/>
</comp>
<comp lib="0" loc="(460,610)" name="Tunnel">
<a name="label" val="S_last"/>
</comp>
<comp lib="0" loc="(470,270)" name="Tunnel">
<a name="facing" val="east"/>
<a name="label" val="Clk"/>
</comp>
<comp lib="0" loc="(480,240)" name="Constant"/>
<comp lib="0" loc="(710,140)" name="Tunnel">
<a name="facing" val="east"/>
<a name="label" val="S_fetch_0"/>
</comp>
<comp lib="0" loc="(750,670)" name="Tunnel">
<a name="facing" val="east"/>
<a name="label" val="opcode"/>
<a name="width" val="4"/>
</comp>
<comp lib="0" loc="(800,100)" name="Probe">
<a name="appearance" val="NewPins"/>
<a name="radix" val="16"/>
</comp>
<comp lib="0" loc="(820,1100)" name="Tunnel">
<a name="facing" val="east"/>
<a name="label" val="Instruction"/>
<a name="width" val="16"/>
</comp>
<comp lib="0" loc="(820,210)" name="Tunnel">
<a name="facing" val="east"/>
<a name="label" val="Clk"/>
</comp>
<comp lib="0" loc="(830,1050)" name="Probe">
<a name="appearance" val="NewPins"/>
</comp>
<comp lib="0" loc="(840,400)" name="Clock"/>
<comp lib="0" loc="(880,1120)" name="Splitter">
<a name="bit0" val="4"/>
<a name="bit1" val="4"/>
<a name="bit10" val="1"/>
<a name="bit11" val="1"/>
<a name="bit12" val="0"/>
<a name="bit13" val="0"/>
<a name="bit14" val="0"/>
<a name="bit15" val="0"/>
<a name="bit2" val="4"/>
<a name="bit4" val="3"/>
<a name="bit5" val="3"/>
<a name="bit6" val="2"/>
<a name="bit7" val="2"/>
<a name="bit8" val="2"/>
<a name="bit9" val="1"/>
<a name="fanout" val="5"/>
<a name="incoming" val="16"/>
</comp>
<comp lib="0" loc="(890,400)" name="Tunnel">
<a name="label" val="Clk"/>
</comp>
<comp lib="0" loc="(900,1400)" name="Tunnel">
<a name="facing" val="east"/>
<a name="label" val="Instruction"/>
<a name="width" val="16"/>
</comp>
<comp lib="0" loc="(920,1400)" name="Splitter">
<a name="bit0" val="3"/>
<a name="bit1" val="3"/>
<a name="bit10" val="1"/>
<a name="bit11" val="1"/>
<a name="bit12" val="0"/>
<a name="bit13" val="0"/>
<a name="bit14" val="0"/>
<a name="bit15" val="0"/>
<a name="bit2" val="3"/>
<a name="bit4" val="3"/>
<a name="bit5" val="3"/>
<a name="bit6" val="2"/>
<a name="bit7" val="2"/>
<a name="bit8" val="2"/>
<a name="bit9" val="1"/>
<a name="fanout" val="4"/>
<a name="incoming" val="16"/>
</comp>
<comp lib="0" loc="(930,1170)" name="Probe">
<a name="appearance" val="NewPins"/>
</comp>
<comp lib="0" loc="(930,1190)" name="Probe">
<a name="appearance" val="NewPins"/>
</comp>
<comp lib="0" loc="(930,1210)" name="Probe">
<a name="appearance" val="NewPins"/>
</comp>
<comp lib="0" loc="(960,290)" name="Tunnel">
<a name="facing" val="east"/>
<a name="label" val="S_fetch_1"/>
</comp>
<comp lib="0" loc="(970,1020)" name="Tunnel">
<a name="label" val="aluFunc"/>
<a name="width" val="3"/>
</comp>
<comp lib="0" loc="(970,1050)" name="Tunnel">
<a name="label" val="opcode"/>
<a name="width" val="4"/>
</comp>
<comp lib="0" loc="(980,1450)" name="Tunnel">
<a name="label" val="BranchOffset"/>
<a name="labelfont" val="Monospaced bold 16"/>
<a name="width" val="6"/>
</comp>
<comp lib="0" loc="(990,240)" name="Splitter">
<a name="bit1" val="0"/>
<a name="bit10" val="1"/>
<a name="bit11" val="1"/>
<a name="bit12" val="1"/>
<a name="bit13" val="1"/>
<a name="bit14" val="1"/>
<a name="bit15" val="1"/>
<a name="bit2" val="0"/>
<a name="bit3" val="0"/>
<a name="bit4" val="0"/>
<a name="bit5" val="0"/>
<a name="bit6" val="0"/>
<a name="bit7" val="0"/>
<a name="bit8" val="1"/>
<a name="bit9" val="1"/>
<a name="facing" val="west"/>
<a name="incoming" val="16"/>
</comp>
<comp lib="1" loc="(2090,900)" name="OR Gate">
<a name="size" val="30"/>
</comp>
<comp lib="1" loc="(3080,1340)" name="OR Gate">
<a name="inputs" val="3"/>
</comp>
<comp lib="2" loc="(1720,530)" name="Multiplexer">
<a name="select" val="2"/>
<a name="width" val="3"/>
</comp>
<comp lib="2" loc="(1720,690)" name="Priority Encoder">
<a name="select" val="2"/>
</comp>
<comp lib="2" loc="(1980,1280)" name="Multiplexer">
<a name="select" val="2"/>
<a name="width" val="6"/>
</comp>
<comp lib="2" loc="(1980,1440)" name="Priority Encoder">
<a name="select" val="2"/>
</comp>
<comp lib="2" loc="(2220,530)" name="Multiplexer">
<a name="select" val="2"/>
<a name="width" val="12"/>
</comp>
<comp lib="2" loc="(2430,990)" name="Priority Encoder"/>
<comp lib="2" loc="(2520,840)" name="Multiplexer">
<a name="enable" val="true"/>
<a name="select" val="3"/>
</comp>
<comp lib="2" loc="(2740,1240)" name="Multiplexer">
<a name="select" val="2"/>
<a name="width" val="12"/>
</comp>
<comp lib="2" loc="(2740,1400)" name="Priority Encoder">
<a name="select" val="2"/>
</comp>
<comp lib="2" loc="(3040,1230)" name="Multiplexer">
<a name="width" val="12"/>
</comp>
<comp lib="2" loc="(330,600)" name="Decoder">
<a name="enable" val="false"/>
<a name="select" val="3"/>
</comp>
<comp lib="2" loc="(400,200)" name="Multiplexer">
<a name="width" val="12"/>
</comp>
<comp lib="2" loc="(910,760)" name="Decoder">
<a name="enable" val="false"/>
<a name="select" val="4"/>
<a name="selloc" val="tr"/>
</comp>
<comp lib="3" loc="(1200,1560)" name="Adder">
<a name="width" val="12"/>
</comp>
<comp lib="4" loc="(1030,260)" name="Register">
<a name="appearance" val="logisim_evolution"/>
<a name="width" val="16"/>
</comp>
<comp lib="4" loc="(170,580)" name="Register">
<a name="appearance" val="logisim_evolution"/>
<a name="label" val="State"/>
<a name="width" val="3"/>
</comp>
<comp lib="4" loc="(2940,920)" name="Register">
<a name="appearance" val="logisim_evolution"/>
<a name="label" val="PC"/>
<a name="width" val="12"/>
</comp>
<comp lib="4" loc="(500,200)" name="RAM">
<a name="addrWidth" val="12"/>
<a name="appearance" val="logisim_evolution"/>
<a name="label" val="MyRam"/>
</comp>
<comp lib="4" loc="(840,140)" name="Register">
<a name="appearance" val="logisim_evolution"/>
</comp>
<comp lib="8" loc="(1167,58)" name="Text">
<a name="font" val="SansSerif bold 23"/>
<a name="text" val="Load, load Imm, Sign??"/>
</comp>
<comp lib="8" loc="(1255,1025)" name="Text">
<a name="font" val="SansSerif bold 25"/>
<a name="text" val="I-Type"/>
</comp>
<comp lib="8" loc="(1635,1015)" name="Text">
<a name="font" val="SansSerif bold 25"/>
<a name="text" val="Jump Format"/>
</comp>
<comp lib="8" loc="(895,1020)" name="Text">
<a name="font" val="SansSerif bold 25"/>
<a name="text" val="R-Type"/>
</comp>
<comp lib="8" loc="(961,1318)" name="Text">
<a name="font" val="SansSerif bold 25"/>
<a name="text" val="Branch Format"/>
</comp>
<comp loc="(1890,130)" name="RegBlock"/>
<comp loc="(200,520)" name="increment_one_3_bit">
<a name="facing" val="west"/>
</comp>
<comp loc="(2390,820)" name="CompareBlock"/>
<comp loc="(2500,100)" name="ALU"/>
<comp loc="(2970,1220)" name="increment_one_12_bit"/>
<wire from="(1000,1100)" to="(1000,1210)"/>
<wire from="(1000,1100)" to="(1020,1100)"/>
<wire from="(1000,840)" to="(1000,860)"/>
<wire from="(1000,860)" to="(1030,860)"/>
<wire from="(1010,330)" to="(1030,330)"/>
<wire from="(1010,830)" to="(1010,850)"/>
<wire from="(1010,850)" to="(1040,850)"/>
<wire from="(1020,1100)" to="(1020,1140)"/>
<wire from="(1020,1140)" to="(1040,1140)"/>
<wire from="(1020,1400)" to="(1020,1420)"/>
<wire from="(1020,1420)" to="(1030,1420)"/>
<wire from="(1020,160)" to="(1030,160)"/>
<wire from="(1020,240)" to="(1020,290)"/>
<wire from="(1020,240)" to="(1030,240)"/>
<wire from="(1020,290)" to="(1030,290)"/>
<wire from="(1020,820)" to="(1020,840)"/>
<wire from="(1020,840)" to="(1050,840)"/>
<wire from="(1030,1090)" to="(1030,1110)"/>
<wire from="(1030,1110)" to="(1040,1110)"/>
<wire from="(1030,160)" to="(1030,240)"/>
<wire from="(1030,410)" to="(1030,430)"/>
<wire from="(1030,410)" to="(1100,410)"/>
<wire from="(1030,430)" to="(1040,430)"/>
<wire from="(1030,810)" to="(1030,830)"/>
<wire from="(1030,830)" to="(1060,830)"/>
<wire from="(1030,860)" to="(1030,940)"/>
<wire from="(1030,940)" to="(1070,940)"/>
<wire from="(1040,1520)" to="(1050,1520)"/>
<wire from="(1040,760)" to="(1040,770)"/>
<wire from="(1040,760)" to="(1050,760)"/>
<wire from="(1040,800)" to="(1040,820)"/>
<wire from="(1040,820)" to="(1070,820)"/>
<wire from="(1040,850)" to="(1040,910)"/>
<wire from="(1040,910)" to="(1070,910)"/>
<wire from="(1050,840)" to="(1050,880)"/>
<wire from="(1050,880)" to="(1070,880)"/>
<wire from="(1060,1580)" to="(1130,1580)"/>
<wire from="(1060,830)" to="(1060,850)"/>
<wire from="(1060,850)" to="(1070,850)"/>
<wire from="(1060,950)" to="(1060,970)"/>
<wire from="(1060,970)" to="(1070,970)"/>
<wire from="(1090,1520)" to="(1130,1520)"/>
<wire from="(1090,290)" to="(1100,290)"/>
<wire from="(1100,290)" to="(1100,370)"/>
<wire from="(1100,370)" to="(1100,410)"/>
<wire from="(1100,370)" to="(1220,370)"/>
<wire from="(1130,1520)" to="(1130,1550)"/>
<wire from="(1130,1550)" to="(1160,1550)"/>
<wire from="(1130,1570)" to="(1130,1580)"/>
<wire from="(1130,1570)" to="(1160,1570)"/>
<wire from="(1160,1510)" to="(1180,1510)"/>
<wire from="(1180,1510)" to="(1180,1540)"/>
<wire from="(1200,1560)" to="(1240,1560)"/>
<wire from="(1210,340)" to="(1220,340)"/>
<wire from="(1220,1090)" to="(1240,1090)"/>
<wire from="(1220,340)" to="(1220,370)"/>
<wire from="(1260,1050)" to="(1320,1050)"/>
<wire from="(1260,1060)" to="(1300,1060)"/>
<wire from="(1260,1070)" to="(1270,1070)"/>
<wire from="(1270,1070)" to="(1270,1150)"/>
<wire from="(1270,1150)" to="(1270,1200)"/>
<wire from="(1270,1150)" to="(1300,1150)"/>
<wire from="(1270,1200)" to="(1290,1200)"/>
<wire from="(1280,1210)" to="(1290,1210)"/>
<wire from="(1290,1160)" to="(1300,1160)"/>
<wire from="(130,520)" to="(130,610)"/>
<wire from="(130,520)" to="(200,520)"/>
<wire from="(130,610)" to="(170,610)"/>
<wire from="(1300,1060)" to="(1300,1080)"/>
<wire from="(1300,1080)" to="(1350,1080)"/>
<wire from="(1310,1190)" to="(1320,1190)"/>
<wire from="(140,630)" to="(170,630)"/>
<wire from="(140,660)" to="(160,660)"/>
<wire from="(1560,1080)" to="(1580,1080)"/>
<wire from="(1570,170)" to="(1670,170)"/>
<wire from="(1570,200)" to="(1600,200)"/>
<wire from="(1570,230)" to="(1670,230)"/>
<wire from="(1580,90)" to="(1640,90)"/>
<wire from="(1590,640)" to="(1630,640)"/>
<wire from="(1590,770)" to="(1700,770)"/>
<wire from="(160,650)" to="(160,660)"/>
<wire from="(160,650)" to="(170,650)"/>
<wire from="(1600,1040)" to="(1670,1040)"/>
<wire from="(1600,1050)" to="(1640,1050)"/>
<wire from="(1600,130)" to="(1620,130)"/>
<wire from="(1600,200)" to="(1600,210)"/>
<wire from="(1600,210)" to="(1670,210)"/>
<wire from="(1610,670)" to="(1620,670)"/>
<wire from="(1610,700)" to="(1680,700)"/>
<wire from="(1620,130)" to="(1620,150)"/>
<wire from="(1620,150)" to="(1670,150)"/>
<wire from="(1620,510)" to="(1660,510)"/>
<wire from="(1620,670)" to="(1620,690)"/>
<wire from="(1620,690)" to="(1680,690)"/>
<wire from="(1630,640)" to="(1630,680)"/>
<wire from="(1630,680)" to="(1680,680)"/>
<wire from="(1640,1050)" to="(1640,1070)"/>
<wire from="(1640,1070)" to="(1650,1070)"/>
<wire from="(1640,130)" to="(1670,130)"/>
<wire from="(1640,90)" to="(1640,130)"/>
<wire from="(1650,190)" to="(1670,190)"/>
<wire from="(1660,510)" to="(1660,520)"/>
<wire from="(1660,510)" to="(1680,510)"/>
<wire from="(1660,520)" to="(1660,530)"/>
<wire from="(1660,520)" to="(1680,520)"/>
<wire from="(1660,530)" to="(1680,530)"/>
<wire from="(1700,550)" to="(1700,580)"/>
<wire from="(1700,580)" to="(1750,580)"/>
<wire from="(1700,720)" to="(1700,770)"/>
<wire from="(1720,530)" to="(1760,530)"/>
<wire from="(1720,690)" to="(1750,690)"/>
<wire from="(1720,700)" to="(1790,700)"/>
<wire from="(1730,1160)" to="(1750,1160)"/>
<wire from="(1730,1190)" to="(1750,1190)"/>
<wire from="(1730,1230)" to="(1750,1230)"/>
<wire from="(1730,1260)" to="(1750,1260)"/>
<wire from="(1750,1160)" to="(1750,1170)"/>
<wire from="(1750,1170)" to="(1760,1170)"/>
<wire from="(1750,1180)" to="(1750,1190)"/>
<wire from="(1750,1180)" to="(1760,1180)"/>
<wire from="(1750,1230)" to="(1750,1240)"/>
<wire from="(1750,1240)" to="(1760,1240)"/>
<wire from="(1750,1250)" to="(1750,1260)"/>
<wire from="(1750,1250)" to="(1760,1250)"/>
<wire from="(1750,480)" to="(1760,480)"/>
<wire from="(1750,580)" to="(1750,690)"/>
<wire from="(1750,580)" to="(2200,580)"/>
<wire from="(1760,480)" to="(1760,530)"/>
<wire from="(1760,530)" to="(1780,530)"/>
<wire from="(1780,1160)" to="(1840,1160)"/>
<wire from="(1780,1230)" to="(1820,1230)"/>
<wire from="(1820,1230)" to="(1820,1270)"/>
<wire from="(1820,1270)" to="(1940,1270)"/>
<wire from="(1840,1160)" to="(1840,1260)"/>
<wire from="(1840,1260)" to="(1940,1260)"/>
<wire from="(1850,1390)" to="(1890,1390)"/>
<wire from="(1850,1440)" to="(1940,1440)"/>
<wire from="(1850,1520)" to="(1960,1520)"/>
<wire from="(1870,1450)" to="(1940,1450)"/>
<wire from="(1890,130)" to="(1900,130)"/>
<wire from="(1890,1390)" to="(1890,1430)"/>
<wire from="(1890,1430)" to="(1940,1430)"/>
<wire from="(1890,150)" to="(1910,150)"/>
<wire from="(1900,100)" to="(1900,130)"/>
<wire from="(1900,100)" to="(1940,100)"/>
<wire from="(1910,120)" to="(1910,150)"/>
<wire from="(1910,120)" to="(1960,120)"/>
<wire from="(1940,100)" to="(2200,100)"/>
<wire from="(1940,40)" to="(1940,100)"/>
<wire from="(1940,40)" to="(1970,40)"/>
<wire from="(1960,120)" to="(2230,120)"/>
<wire from="(1960,1300)" to="(1960,1330)"/>
<wire from="(1960,1330)" to="(2010,1330)"/>
<wire from="(1960,1470)" to="(1960,1520)"/>
<wire from="(1960,70)" to="(1960,120)"/>
<wire from="(1960,70)" to="(1970,70)"/>
<wire from="(1980,1280)" to="(2020,1280)"/>
<wire from="(1980,1440)" to="(2010,1440)"/>
<wire from="(1980,1450)" to="(2010,1450)"/>
<wire from="(1990,880)" to="(2040,880)"/>
<wire from="(1990,910)" to="(2060,910)"/>
<wire from="(2010,1230)" to="(2020,1230)"/>
<wire from="(2010,1330)" to="(2010,1440)"/>
<wire from="(2020,1230)" to="(2020,1280)"/>
<wire from="(2020,1280)" to="(2040,1280)"/>
<wire from="(2040,880)" to="(2040,890)"/>
<wire from="(2040,890)" to="(2060,890)"/>
<wire from="(2050,480)" to="(2160,480)"/>
<wire from="(2060,1260)" to="(2090,1260)"/>
<wire from="(2060,1270)" to="(2090,1270)"/>
<wire from="(2060,810)" to="(2110,810)"/>
<wire from="(2060,840)" to="(2170,840)"/>
<wire from="(2090,1250)" to="(2090,1260)"/>
<wire from="(2090,1250)" to="(2110,1250)"/>
<wire from="(2090,1270)" to="(2090,1280)"/>
<wire from="(2090,1280)" to="(2110,1280)"/>
<wire from="(2090,900)" to="(2100,900)"/>
<wire from="(2100,860)" to="(2100,900)"/>
<wire from="(2100,860)" to="(2170,860)"/>
<wire from="(2110,810)" to="(2110,820)"/>
<wire from="(2110,820)" to="(2170,820)"/>
<wire from="(2130,510)" to="(2150,510)"/>
<wire from="(2130,540)" to="(2150,540)"/>
<wire from="(2150,510)" to="(2150,520)"/>
<wire from="(2150,520)" to="(2180,520)"/>
<wire from="(2150,530)" to="(2150,540)"/>
<wire from="(2150,530)" to="(2180,530)"/>
<wire from="(2160,480)" to="(2160,510)"/>
<wire from="(2160,510)" to="(2180,510)"/>
<wire from="(2180,140)" to="(2250,140)"/>
<wire from="(2180,200)" to="(2200,200)"/>
<wire from="(2180,220)" to="(2230,220)"/>
<wire from="(2180,260)" to="(2250,260)"/>
<wire from="(2200,100)" to="(2200,200)"/>
<wire from="(2200,100)" to="(2280,100)"/>
<wire from="(2200,550)" to="(2200,580)"/>
<wire from="(2220,530)" to="(2270,530)"/>
<wire from="(2230,120)" to="(2230,220)"/>
<wire from="(2230,120)" to="(2280,120)"/>
<wire from="(2240,80)" to="(2500,80)"/>
<wire from="(2250,140)" to="(2250,260)"/>
<wire from="(2250,140)" to="(2280,140)"/>
<wire from="(2260,430)" to="(2270,430)"/>
<wire from="(2270,430)" to="(2270,530)"/>
<wire from="(2270,530)" to="(2280,530)"/>
<wire from="(230,520)" to="(260,520)"/>
<wire from="(230,610)" to="(260,610)"/>
<wire from="(2300,1130)" to="(2410,1130)"/>
<wire from="(2310,1020)" to="(2330,1020)"/>
<wire from="(2310,1050)" to="(2340,1050)"/>
<wire from="(2310,1080)" to="(2350,1080)"/>
<wire from="(2310,960)" to="(2390,960)"/>
<wire from="(2310,990)" to="(2320,990)"/>
<wire from="(2320,970)" to="(2320,990)"/>
<wire from="(2320,970)" to="(2390,970)"/>
<wire from="(2330,980)" to="(2330,1020)"/>
<wire from="(2330,980)" to="(2390,980)"/>
<wire from="(2340,990)" to="(2340,1050)"/>
<wire from="(2340,990)" to="(2390,990)"/>
<wire from="(2350,1000)" to="(2350,1080)"/>
<wire from="(2350,1000)" to="(2390,1000)"/>
<wire from="(2390,800)" to="(2390,820)"/>
<wire from="(2390,800)" to="(2480,800)"/>
<wire from="(2390,840)" to="(2400,840)"/>
<wire from="(2390,860)" to="(2440,860)"/>
<wire from="(2400,810)" to="(2400,840)"/>
<wire from="(2400,810)" to="(2460,810)"/>
<wire from="(2410,1040)" to="(2410,1130)"/>
<wire from="(2430,1000)" to="(2480,1000)"/>
<wire from="(2430,990)" to="(2500,990)"/>
<wire from="(2440,830)" to="(2440,860)"/>
<wire from="(2440,830)" to="(2460,830)"/>
<wire from="(2460,810)" to="(2460,820)"/>
<wire from="(2460,810)" to="(2480,810)"/>
<wire from="(2460,820)" to="(2480,820)"/>
<wire from="(2460,830)" to="(2460,840)"/>
<wire from="(2460,830)" to="(2480,830)"/>
<wire from="(2460,840)" to="(2480,840)"/>
<wire from="(2480,1000)" to="(2480,1060)"/>
<wire from="(2480,1000)" to="(2510,1000)"/>
<wire from="(2480,1060)" to="(2560,1060)"/>
<wire from="(2500,100)" to="(2520,100)"/>
<wire from="(2500,80)" to="(2500,100)"/>
<wire from="(2500,880)" to="(2500,990)"/>
<wire from="(2510,880)" to="(2510,1000)"/>
<wire from="(2520,1220)" to="(2700,1220)"/>
<wire from="(2520,1250)" to="(2540,1250)"/>
<wire from="(2520,840)" to="(2560,840)"/>
<wire from="(2540,1230)" to="(2540,1250)"/>
<wire from="(2540,1230)" to="(2700,1230)"/>
<wire from="(2570,1370)" to="(2650,1370)"/>
<wire from="(2570,1400)" to="(2700,1400)"/>
<wire from="(260,520)" to="(260,610)"/>
<wire from="(260,610)" to="(330,610)"/>
<wire from="(2610,1480)" to="(2720,1480)"/>
<wire from="(2630,1410)" to="(2700,1410)"/>
<wire from="(2650,1370)" to="(2650,1390)"/>
<wire from="(2650,1390)" to="(2700,1390)"/>
<wire from="(2720,1260)" to="(2720,1290)"/>
<wire from="(2720,1290)" to="(2770,1290)"/>
<wire from="(2720,1430)" to="(2720,1480)"/>
<wire from="(2740,1240)" to="(2780,1240)"/>
<wire from="(2740,1400)" to="(2770,1400)"/>
<wire from="(2740,1410)" to="(2820,1410)"/>
<wire from="(2770,1190)" to="(2780,1190)"/>
<wire from="(2770,1290)" to="(2770,1400)"/>
<wire from="(2780,1190)" to="(2780,1240)"/>
<wire from="(2780,1240)" to="(3010,1240)"/>
<wire from="(2820,1260)" to="(2820,1410)"/>
<wire from="(2820,1260)" to="(3020,1260)"/>
<wire from="(2820,1410)" to="(2930,1410)"/>
<wire from="(2900,970)" to="(2940,970)"/>
<wire from="(2910,1220)" to="(2940,1220)"/>
<wire from="(2910,930)" to="(2930,930)"/>
<wire from="(2930,1400)" to="(2930,1410)"/>
<wire from="(2930,1400)" to="(3000,1400)"/>
<wire from="(2930,930)" to="(2930,950)"/>
<wire from="(2930,950)" to="(2940,950)"/>
<wire from="(2930,990)" to="(2940,990)"/>
<wire from="(2950,1310)" to="(3000,1310)"/>
<wire from="(2970,1220)" to="(3010,1220)"/>
<wire from="(2970,1350)" to="(2980,1350)"/>
<wire from="(2980,1340)" to="(2980,1350)"/>
<wire from="(2980,1340)" to="(3030,1340)"/>
<wire from="(3000,1310)" to="(3000,1320)"/>
<wire from="(3000,1320)" to="(3030,1320)"/>
<wire from="(3000,1360)" to="(3000,1400)"/>
<wire from="(3000,1360)" to="(3030,1360)"/>
<wire from="(3000,950)" to="(3030,950)"/>
<wire from="(3020,1250)" to="(3020,1260)"/>
<wire from="(3040,1230)" to="(3110,1230)"/>
<wire from="(3080,1340)" to="(3140,1340)"/>
<wire from="(330,190)" to="(370,190)"/>
<wire from="(330,600)" to="(330,610)"/>
<wire from="(350,230)" to="(380,230)"/>
<wire from="(350,520)" to="(450,520)"/>
<wire from="(350,530)" to="(440,530)"/>
<wire from="(350,540)" to="(430,540)"/>
<wire from="(350,590)" to="(420,590)"/>
<wire from="(380,220)" to="(380,230)"/>
<wire from="(400,200)" to="(470,200)"/>
<wire from="(420,590)" to="(420,610)"/>
<wire from="(420,610)" to="(460,610)"/>
<wire from="(430,540)" to="(430,560)"/>
<wire from="(430,560)" to="(440,560)"/>
<wire from="(440,530)" to="(440,550)"/>
<wire from="(440,550)" to="(450,550)"/>
<wire from="(440,560)" to="(440,580)"/>
<wire from="(440,580)" to="(450,580)"/>
<wire from="(470,200)" to="(470,210)"/>
<wire from="(470,210)" to="(500,210)"/>
<wire from="(470,270)" to="(500,270)"/>
<wire from="(480,240)" to="(480,260)"/>
<wire from="(480,260)" to="(500,260)"/>
<wire from="(710,140)" to="(790,140)"/>
<wire from="(740,290)" to="(770,290)"/>
<wire from="(750,670)" to="(770,670)"/>
<wire from="(770,170)" to="(770,260)"/>
<wire from="(770,170)" to="(820,170)"/>
<wire from="(770,260)" to="(770,290)"/>
<wire from="(770,260)" to="(970,260)"/>
<wire from="(770,650)" to="(770,670)"/>
<wire from="(770,650)" to="(910,650)"/>
<wire from="(790,140)" to="(790,190)"/>
<wire from="(790,190)" to="(840,190)"/>
<wire from="(800,100)" to="(820,100)"/>
<wire from="(820,100)" to="(820,170)"/>
<wire from="(820,1100)" to="(850,1100)"/>
<wire from="(820,170)" to="(840,170)"/>
<wire from="(820,210)" to="(840,210)"/>
<wire from="(830,1050)" to="(910,1050)"/>
<wire from="(840,400)" to="(890,400)"/>
<wire from="(850,1100)" to="(850,1120)"/>
<wire from="(850,1120)" to="(880,1120)"/>
<wire from="(900,1070)" to="(910,1070)"/>
<wire from="(900,1080)" to="(980,1080)"/>
<wire from="(900,1090)" to="(990,1090)"/>
<wire from="(900,1100)" to="(1000,1100)"/>
<wire from="(900,1110)" to="(950,1110)"/>
<wire from="(900,1400)" to="(920,1400)"/>
<wire from="(900,170)" to="(940,170)"/>
<wire from="(910,1050)" to="(910,1070)"/>
<wire from="(910,1050)" to="(970,1050)"/>
<wire from="(910,650)" to="(910,760)"/>
<wire from="(930,1170)" to="(980,1170)"/>
<wire from="(930,1190)" to="(990,1190)"/>
<wire from="(930,1210)" to="(1000,1210)"/>
<wire from="(930,760)" to="(970,760)"/>
<wire from="(930,780)" to="(950,780)"/>
<wire from="(930,790)" to="(1050,790)"/>
<wire from="(930,800)" to="(1040,800)"/>
<wire from="(930,810)" to="(1030,810)"/>
<wire from="(930,810)" to="(930,820)"/>
<wire from="(930,820)" to="(1020,820)"/>
<wire from="(930,830)" to="(1010,830)"/>
<wire from="(930,840)" to="(1000,840)"/>
<wire from="(930,850)" to="(990,850)"/>
<wire from="(940,1360)" to="(1000,1360)"/>
<wire from="(940,1370)" to="(980,1370)"/>
<wire from="(940,1380)" to="(970,1380)"/>
<wire from="(940,1390)" to="(950,1390)"/>
<wire from="(940,170)" to="(940,250)"/>
<wire from="(940,250)" to="(970,250)"/>
<wire from="(950,1020)" to="(950,1110)"/>
<wire from="(950,1020)" to="(970,1020)"/>
<wire from="(950,1390)" to="(950,1450)"/>
<wire from="(950,1450)" to="(980,1450)"/>
<wire from="(950,770)" to="(1040,770)"/>
<wire from="(950,770)" to="(950,780)"/>
<wire from="(960,290)" to="(970,290)"/>
<wire from="(970,1380)" to="(970,1400)"/>
<wire from="(970,1400)" to="(1020,1400)"/>
<wire from="(970,290)" to="(970,310)"/>
<wire from="(970,310)" to="(1030,310)"/>
<wire from="(970,730)" to="(1070,730)"/>
<wire from="(970,730)" to="(970,760)"/>
<wire from="(980,1080)" to="(1040,1080)"/>
<wire from="(980,1080)" to="(980,1170)"/>
<wire from="(980,1370)" to="(980,1390)"/>
<wire from="(980,1390)" to="(1030,1390)"/>
<wire from="(990,1090)" to="(1030,1090)"/>
<wire from="(990,1090)" to="(990,1190)"/>
<wire from="(990,240)" to="(1020,240)"/>
<wire from="(990,850)" to="(990,950)"/>
<wire from="(990,950)" to="(1060,950)"/>
</circuit>
<circuit name="ALU">
<a name="appearance" val="logisim_evolution"/>
<a name="circuit" val="ALU"/>
<a name="circuitnamedboxfixedsize" val="true"/>
<a name="simulationFrequency" val="1.0"/>
<comp lib="0" loc="(1000,230)" name="Pin">
<a name="appearance" val="NewPins"/>
<a name="facing" val="west"/>
<a name="label" val="Result"/>
<a name="output" val="true"/>
<a name="radix" val="16"/>
<a name="width" val="12"/>
</comp>
<comp lib="0" loc="(470,130)" name="Pin">
<a name="appearance" val="classic"/>
<a name="label" val="A"/>
<a name="tristate" val="true"/>
<a name="width" val="12"/>
</comp>
<comp lib="0" loc="(470,160)" name="Pin">
<a name="appearance" val="classic"/>
<a name="label" val="B"/>
<a name="tristate" val="true"/>
<a name="width" val="12"/>
</comp>
<comp lib="0" loc="(470,210)" name="Pin">
<a name="appearance" val="classic"/>
<a name="label" val="Ctrl"/>
<a name="tristate" val="true"/>
<a name="width" val="3"/>
</comp>
<comp lib="0" loc="(530,160)" name="Splitter">
<a name="bit1" val="0"/>
<a name="bit10" val="none"/>
<a name="bit11" val="none"/>
<a name="bit2" val="0"/>
<a name="bit3" val="0"/>
<a name="bit4" val="none"/>
<a name="bit5" val="none"/>
<a name="bit6" val="none"/>
<a name="bit7" val="none"/>
<a name="bit8" val="none"/>
<a name="bit9" val="none"/>
<a name="fanout" val="1"/>
<a name="incoming" val="12"/>
</comp>
<comp lib="0" loc="(570,270)" name="Constant">
<a name="value" val="0x0"/>
</comp>
<comp lib="0" loc="(710,230)" name="Splitter">
<a name="bit1" val="0"/>
<a name="bit2" val="none"/>
<a name="fanout" val="1"/>
<a name="incoming" val="3"/>
</comp>
<comp lib="0" loc="(710,260)" name="Splitter">
<a name="bit0" val="1"/>
<a name="bit1" val="none"/>
<a name="bit2" val="0"/>
<a name="facing" val="south"/>
<a name="incoming" val="3"/>
</comp>
<comp lib="1" loc="(900,280)" name="NOT Gate"/>
<comp lib="2" loc="(770,360)" name="Multiplexer">
<a name="width" val="12"/>
</comp>
<comp lib="2" loc="(780,150)" name="Multiplexer">
<a name="select" val="2"/>
<a name="width" val="12"/>
</comp>
<comp lib="2" loc="(940,230)" name="Multiplexer">
<a name="width" val="12"/>
</comp>
<comp lib="3" loc="(650,140)" name="Shifter">
<a name="width" val="12"/>
</comp>
<comp lib="3" loc="(650,190)" name="Shifter">
<a name="shift" val="lr"/>
<a name="width" val="12"/>
</comp>
<comp lib="3" loc="(650,330)" name="Adder">
<a name="width" val="12"/>
</comp>
<comp lib="3" loc="(650,400)" name="Subtractor">
<a name="width" val="12"/>
</comp>
<comp lib="3" loc="(650,90)" name="Shifter">
<a name="shift" val="ar"/>
<a name="width" val="12"/>
</comp>
<comp lib="8" loc="(630,55)" name="Text">
<a name="text" val="SHIFTER"/>
</comp>
<wire from="(470,130)" to="(500,130)"/>
<wire from="(470,160)" to="(490,160)"/>
<wire from="(470,210)" to="(520,210)"/>
<wire from="(490,160)" to="(490,340)"/>
<wire from="(490,160)" to="(530,160)"/>
<wire from="(490,340)" to="(540,340)"/>
<wire from="(500,130)" to="(500,320)"/>
<wire from="(500,130)" to="(560,130)"/>
<wire from="(500,320)" to="(560,320)"/>
<wire from="(520,210)" to="(520,230)"/>
<wire from="(520,230)" to="(710,230)"/>
<wire from="(540,340)" to="(540,410)"/>
<wire from="(540,340)" to="(610,340)"/>
<wire from="(540,410)" to="(610,410)"/>
<wire from="(550,150)" to="(590,150)"/>
<wire from="(560,130)" to="(560,180)"/>
<wire from="(560,130)" to="(610,130)"/>
<wire from="(560,180)" to="(610,180)"/>
<wire from="(560,320)" to="(560,390)"/>
<wire from="(560,320)" to="(610,320)"/>
<wire from="(560,390)" to="(610,390)"/>
<wire from="(560,80)" to="(560,130)"/>
<wire from="(560,80)" to="(610,80)"/>
<wire from="(570,270)" to="(580,270)"/>
<wire from="(580,270)" to="(580,370)"/>
<wire from="(580,270)" to="(630,270)"/>
<wire from="(580,370)" to="(630,370)"/>
<wire from="(590,100)" to="(590,150)"/>
<wire from="(590,100)" to="(610,100)"/>
<wire from="(590,150)" to="(590,200)"/>
<wire from="(590,150)" to="(610,150)"/>
<wire from="(590,200)" to="(610,200)"/>
<wire from="(630,270)" to="(630,310)"/>
<wire from="(630,370)" to="(630,380)"/>
<wire from="(650,140)" to="(670,140)"/>
<wire from="(650,190)" to="(730,190)"/>
<wire from="(650,330)" to="(680,330)"/>
<wire from="(650,400)" to="(680,400)"/>
<wire from="(650,90)" to="(720,90)"/>
<wire from="(670,130)" to="(670,140)"/>
<wire from="(670,130)" to="(740,130)"/>
<wire from="(670,140)" to="(670,150)"/>
<wire from="(670,150)" to="(740,150)"/>
<wire from="(680,330)" to="(680,350)"/>
<wire from="(680,350)" to="(740,350)"/>
<wire from="(680,370)" to="(680,400)"/>
<wire from="(680,370)" to="(740,370)"/>
<wire from="(710,230)" to="(710,260)"/>
<wire from="(720,140)" to="(740,140)"/>
<wire from="(720,280)" to="(720,400)"/>
<wire from="(720,400)" to="(750,400)"/>
<wire from="(720,90)" to="(720,140)"/>
<wire from="(730,160)" to="(730,190)"/>
<wire from="(730,160)" to="(740,160)"/>
<wire from="(730,220)" to="(760,220)"/>
<wire from="(730,280)" to="(870,280)"/>
<wire from="(750,380)" to="(750,400)"/>
<wire from="(760,170)" to="(760,220)"/>
<wire from="(770,360)" to="(850,360)"/>
<wire from="(780,150)" to="(850,150)"/>
<wire from="(850,150)" to="(850,220)"/>
<wire from="(850,220)" to="(910,220)"/>
<wire from="(850,240)" to="(850,360)"/>
<wire from="(850,240)" to="(910,240)"/>
<wire from="(900,280)" to="(920,280)"/>
<wire from="(920,250)" to="(920,280)"/>
<wire from="(940,230)" to="(1000,230)"/>
</circuit>
<circuit name="increment_one_8_bit">
<a name="appearance" val="custom"/>
<a name="circuit" val="increment_one_8_bit"/>
<a name="circuitnamedboxfixedsize" val="true"/>
<a name="simulationFrequency" val="1.0"/>
<appear>
<text dominant-baseline="central" font-family="SansSerif" font-size="10" text-anchor="middle" x="253" y="59">+1</text>
<polyline fill="none" points="250,50 271,60" stroke="#000000"/>
<polyline fill="none" points="250,70 270,60" stroke="#000000"/>
<polyline fill="none" points="240,50 250,50" stroke="#000000"/>
<polyline fill="none" points="240,50 240,70" stroke="#000000"/>
<polyline fill="none" points="240,70 250,70" stroke="#000000"/>
<circ-anchor facing="east" x="270" y="60"/>
<circ-port dir="in" pin="300,110" x="240" y="60"/>
<circ-port dir="out" pin="450,120" x="270" y="60"/>
</appear>
<comp lib="0" loc="(280,150)" name="Constant">
<a name="width" val="8"/>
</comp>
<comp lib="0" loc="(300,110)" name="Pin">
<a name="appearance" val="NewPins"/>
<a name="label" val="A"/>
<a name="width" val="8"/>
</comp>
<comp lib="0" loc="(360,80)" name="Constant">
<a name="value" val="0x0"/>
</comp>
<comp lib="0" loc="(450,120)" name="Pin">
<a name="appearance" val="NewPins"/>
<a name="facing" val="west"/>
<a name="label" val="Result"/>
<a name="output" val="true"/>
<a name="width" val="8"/>
</comp>
<comp lib="3" loc="(410,120)" name="Adder"/>
<wire from="(280,150)" to="(300,150)"/>
<wire from="(300,110)" to="(370,110)"/>
<wire from="(300,130)" to="(300,150)"/>
<wire from="(300,130)" to="(370,130)"/>
<wire from="(360,80)" to="(390,80)"/>
<wire from="(390,80)" to="(390,100)"/>
<wire from="(410,120)" to="(450,120)"/>
</circuit>
<circuit name="increment_one_3_bit">
<a name="appearance" val="custom"/>
<a name="circuit" val="increment_one_3_bit"/>
<a name="circuitnamedboxfixedsize" val="true"/>
<a name="simulationFrequency" val="1.0"/>
<appear>
<text dominant-baseline="central" font-family="SansSerif" font-size="10" text-anchor="middle" x="253" y="59">+1</text>
<polyline fill="none" points="240,50 240,70" stroke="#000000"/>
<polyline fill="none" points="240,50 250,50" stroke="#000000"/>
<polyline fill="none" points="250,50 271,60" stroke="#000000"/>
<polyline fill="none" points="250,70 270,60" stroke="#000000"/>
<polyline fill="none" points="240,70 250,70" stroke="#000000"/>
<circ-anchor facing="east" x="270" y="60"/>
<circ-port dir="in" pin="300,110" x="240" y="60"/>
<circ-port dir="out" pin="450,120" x="270" y="60"/>
</appear>
<comp lib="0" loc="(280,150)" name="Constant">
<a name="width" val="3"/>
</comp>
<comp lib="0" loc="(300,110)" name="Pin">
<a name="appearance" val="NewPins"/>
<a name="label" val="A"/>
<a name="width" val="3"/>
</comp>
<comp lib="0" loc="(360,80)" name="Constant">
<a name="value" val="0x0"/>
</comp>
<comp lib="0" loc="(450,120)" name="Pin">
<a name="appearance" val="NewPins"/>
<a name="facing" val="west"/>
<a name="label" val="Result"/>
<a name="output" val="true"/>
<a name="width" val="3"/>
</comp>
<comp lib="3" loc="(410,120)" name="Adder">
<a name="width" val="3"/>
</comp>
<wire from="(280,150)" to="(300,150)"/>
<wire from="(300,110)" to="(370,110)"/>
<wire from="(300,130)" to="(300,150)"/>
<wire from="(300,130)" to="(370,130)"/>
<wire from="(360,80)" to="(390,80)"/>
<wire from="(390,80)" to="(390,100)"/>
<wire from="(410,120)" to="(450,120)"/>
</circuit>
<circuit name="RegBlock">
<a name="appearance" val="logisim_evolution"/>
<a name="circuit" val="RegBlock"/>
<a name="circuitnamedboxfixedsize" val="true"/>
<a name="simulationFrequency" val="1.0"/>
<appear>
<rect fill="none" height="70" stroke="#000000" width="220" x="50" y="50"/>
<polyline fill="none" points="72,120 79,110 86,120" stroke="#000000"/>
<circ-anchor facing="east" x="270" y="60"/>
<circ-port dir="in" pin="1330,570" x="50" y="100"/>
<circ-port dir="in" pin="1330,610" x="50" y="110"/>
<circ-port dir="in" pin="1340,410" x="50" y="60"/>
<circ-port dir="in" pin="1340,440" x="50" y="70"/>
<circ-port dir="in" pin="1340,470" x="50" y="80"/>
<circ-port dir="in" pin="1340,510" x="80" y="120"/>
<circ-port dir="out" pin="2500,330" x="270" y="70"/>
<circ-port dir="out" pin="2500,80" x="270" y="60"/>
</appear>
<comp lib="0" loc="(1330,570)" name="Pin">
<a name="appearance" val="NewPins"/>
<a name="label" val="RegOut_0_Select"/>
<a name="width" val="3"/>
</comp>
<comp lib="0" loc="(1330,610)" name="Pin">
<a name="appearance" val="NewPins"/>
<a name="label" val="RegOut_1_Select"/>
<a name="width" val="3"/>
</comp>
<comp lib="0" loc="(1340,410)" name="Pin">
<a name="appearance" val="NewPins"/>
<a name="label" val="RegWrite"/>
<a name="radix" val="16"/>
<a name="width" val="12"/>
</comp>
<comp lib="0" loc="(1340,440)" name="Pin">
<a name="appearance" val="NewPins"/>
<a name="label" val="RegWriteSelect"/>
<a name="width" val="3"/>
</comp>
<comp lib="0" loc="(1340,470)" name="Pin">
<a name="appearance" val="NewPins"/>
<a name="label" val="RegWriteEnable"/>
</comp>
<comp lib="0" loc="(1340,510)" name="Pin">
<a name="appearance" val="NewPins"/>
<a name="label" val="Clk"/>
</comp>
<comp lib="0" loc="(1600,50)" name="Constant"/>
<comp lib="0" loc="(2500,330)" name="Pin">
<a name="appearance" val="NewPins"/>
<a name="facing" val="west"/>
<a name="label" val="RegOut_1"/>
<a name="output" val="true"/>
<a name="radix" val="16"/>
<a name="width" val="12"/>
</comp>
<comp lib="0" loc="(2500,80)" name="Pin">
<a name="appearance" val="NewPins"/>
<a name="facing" val="west"/>
<a name="label" val="RegOut_0"/>
<a name="output" val="true"/>
<a name="radix" val="16"/>
<a name="width" val="12"/>
</comp>
<comp lib="2" loc="(1470,420)" name="Decoder">
<a name="select" val="3"/>
</comp>
<comp lib="2" loc="(2420,330)" name="Multiplexer">
<a name="select" val="3"/>
<a name="width" val="12"/>
</comp>
<comp lib="2" loc="(2420,80)" name="Multiplexer">
<a name="select" val="3"/>
<a name="width" val="12"/>
</comp>
<comp lib="4" loc="(1680,140)" name="Register">
<a name="appearance" val="logisim_evolution"/>
<a name="label" val="R0"/>
<a name="labelloc" val="south"/>
<a name="width" val="12"/>
</comp>
<comp lib="4" loc="(1680,280)" name="Register">
<a name="appearance" val="logisim_evolution"/>
<a name="label" val="R4"/>
<a name="labelloc" val="south"/>
<a name="width" val="12"/>
</comp>
<comp lib="4" loc="(1790,140)" name="Register">
<a name="appearance" val="logisim_evolution"/>
<a name="label" val="R1"/>
<a name="labelloc" val="south"/>
<a name="width" val="12"/>
</comp>
<comp lib="4" loc="(1790,280)" name="Register">
<a name="appearance" val="logisim_evolution"/>
<a name="label" val="R5"/>
<a name="labelloc" val="south"/>
<a name="width" val="12"/>
</comp>
<comp lib="4" loc="(1900,140)" name="Register">
<a name="appearance" val="logisim_evolution"/>
<a name="label" val="R2"/>
<a name="labelloc" val="south"/>
<a name="width" val="12"/>
</comp>
<comp lib="4" loc="(1900,280)" name="Register">
<a name="appearance" val="logisim_evolution"/>
<a name="label" val="R6"/>
<a name="labelloc" val="south"/>
<a name="width" val="12"/>
</comp>
<comp lib="4" loc="(2010,140)" name="Register">
<a name="appearance" val="logisim_evolution"/>
<a name="label" val="R3"/>
<a name="labelloc" val="south"/>
<a name="width" val="12"/>
</comp>
<comp lib="4" loc="(2010,280)" name="Register">
<a name="appearance" val="logisim_evolution"/>
<a name="label" val="R7"/>
<a name="labelloc" val="south"/>
<a name="width" val="12"/>
</comp>
<wire from="(1330,570)" to="(2340,570)"/>
<wire from="(1330,610)" to="(2400,610)"/>
<wire from="(1340,410)" to="(1400,410)"/>
<wire from="(1340,440)" to="(1470,440)"/>
<wire from="(1340,470)" to="(1460,470)"/>
<wire from="(1340,510)" to="(1630,510)"/>
<wire from="(1400,270)" to="(1400,410)"/>
<wire from="(1400,270)" to="(1620,270)"/>
<wire from="(1460,420)" to="(1460,470)"/>
<wire from="(1470,420)" to="(1470,440)"/>
<wire from="(1490,340)" to="(1500,340)"/>
<wire from="(1490,350)" to="(1510,350)"/>
<wire from="(1490,360)" to="(1520,360)"/>
<wire from="(1490,370)" to="(1530,370)"/>
<wire from="(1490,380)" to="(1540,380)"/>
<wire from="(1490,390)" to="(1680,390)"/>
<wire from="(1490,400)" to="(1670,400)"/>
<wire from="(1490,410)" to="(1660,410)"/>
<wire from="(1500,190)" to="(1500,340)"/>
<wire from="(1500,190)" to="(1680,190)"/>
<wire from="(1510,130)" to="(1510,350)"/>
<wire from="(1510,130)" to="(1770,130)"/>
<wire from="(1520,110)" to="(1520,360)"/>
<wire from="(1520,110)" to="(1880,110)"/>
<wire from="(1530,100)" to="(1530,370)"/>
<wire from="(1530,100)" to="(1900,100)"/>
<wire from="(1540,330)" to="(1540,380)"/>
<wire from="(1540,330)" to="(1680,330)"/>
<wire from="(1600,50)" to="(1640,50)"/>
<wire from="(1620,120)" to="(1620,270)"/>
<wire from="(1620,120)" to="(1670,120)"/>
<wire from="(1620,270)" to="(1670,270)"/>
<wire from="(1630,210)" to="(1630,250)"/>
<wire from="(1630,210)" to="(1680,210)"/>
<wire from="(1630,250)" to="(1630,350)"/>
<wire from="(1630,250)" to="(1780,250)"/>
<wire from="(1630,350)" to="(1630,440)"/>
<wire from="(1630,350)" to="(1680,350)"/>
<wire from="(1630,440)" to="(1630,510)"/>
<wire from="(1630,440)" to="(1780,440)"/>
<wire from="(1640,240)" to="(1710,240)"/>
<wire from="(1640,50)" to="(1640,240)"/>
<wire from="(1660,410)" to="(1660,420)"/>
<wire from="(1660,420)" to="(1990,420)"/>
<wire from="(1670,120)" to="(1670,170)"/>
<wire from="(1670,120)" to="(1780,120)"/>
<wire from="(1670,170)" to="(1680,170)"/>
<wire from="(1670,270)" to="(1670,310)"/>
<wire from="(1670,270)" to="(1780,270)"/>
<wire from="(1670,310)" to="(1680,310)"/>
<wire from="(1670,400)" to="(1670,410)"/>
<wire from="(1670,410)" to="(1880,410)"/>
<wire from="(1680,390)" to="(1680,400)"/>
<wire from="(1680,400)" to="(1770,400)"/>
<wire from="(1710,230)" to="(1710,240)"/>
<wire from="(1740,170)" to="(1750,170)"/>
<wire from="(1740,310)" to="(1760,310)"/>
<wire from="(1750,40)" to="(1750,170)"/>
<wire from="(1750,40)" to="(2190,40)"/>
<wire from="(1760,80)" to="(1760,310)"/>
<wire from="(1760,80)" to="(2150,80)"/>
<wire from="(1770,130)" to="(1770,190)"/>
<wire from="(1770,190)" to="(1790,190)"/>
<wire from="(1770,330)" to="(1770,400)"/>
<wire from="(1770,330)" to="(1790,330)"/>
<wire from="(1780,120)" to="(1780,170)"/>
<wire from="(1780,120)" to="(1890,120)"/>
<wire from="(1780,170)" to="(1790,170)"/>
<wire from="(1780,210)" to="(1780,250)"/>
<wire from="(1780,210)" to="(1790,210)"/>
<wire from="(1780,250)" to="(1890,250)"/>
<wire from="(1780,270)" to="(1780,310)"/>
<wire from="(1780,270)" to="(1890,270)"/>
<wire from="(1780,310)" to="(1790,310)"/>
<wire from="(1780,350)" to="(1780,440)"/>
<wire from="(1780,350)" to="(1790,350)"/>
<wire from="(1780,440)" to="(1890,440)"/>
<wire from="(1850,170)" to="(1860,170)"/>
<wire from="(1850,310)" to="(1870,310)"/>
<wire from="(1860,50)" to="(1860,170)"/>
<wire from="(1860,50)" to="(2180,50)"/>
<wire from="(1870,90)" to="(1870,310)"/>
<wire from="(1870,90)" to="(2140,90)"/>
<wire from="(1880,110)" to="(1880,190)"/>
<wire from="(1880,190)" to="(1900,190)"/>
<wire from="(1880,330)" to="(1880,410)"/>
<wire from="(1880,330)" to="(1900,330)"/>
<wire from="(1890,120)" to="(1890,170)"/>
<wire from="(1890,120)" to="(2000,120)"/>
<wire from="(1890,170)" to="(1900,170)"/>
<wire from="(1890,210)" to="(1890,250)"/>
<wire from="(1890,210)" to="(1900,210)"/>
<wire from="(1890,250)" to="(2000,250)"/>
<wire from="(1890,270)" to="(1890,310)"/>
<wire from="(1890,270)" to="(2000,270)"/>
<wire from="(1890,310)" to="(1900,310)"/>
<wire from="(1890,350)" to="(1890,440)"/>
<wire from="(1890,350)" to="(1900,350)"/>
<wire from="(1890,440)" to="(2000,440)"/>
<wire from="(1900,100)" to="(1900,110)"/>
<wire from="(1900,110)" to="(1990,110)"/>
<wire from="(1960,170)" to="(1970,170)"/>
<wire from="(1960,310)" to="(1980,310)"/>
<wire from="(1970,60)" to="(1970,170)"/>
<wire from="(1970,60)" to="(2170,60)"/>
<wire from="(1980,100)" to="(1980,310)"/>
<wire from="(1980,100)" to="(2130,100)"/>
<wire from="(1990,110)" to="(1990,190)"/>
<wire from="(1990,190)" to="(2010,190)"/>
<wire from="(1990,330)" to="(1990,420)"/>
<wire from="(1990,330)" to="(2010,330)"/>
<wire from="(2000,120)" to="(2000,170)"/>
<wire from="(2000,170)" to="(2010,170)"/>
<wire from="(2000,210)" to="(2000,250)"/>
<wire from="(2000,210)" to="(2010,210)"/>
<wire from="(2000,270)" to="(2000,310)"/>
<wire from="(2000,310)" to="(2010,310)"/>
<wire from="(2000,350)" to="(2000,440)"/>
<wire from="(2000,350)" to="(2010,350)"/>
<wire from="(2070,170)" to="(2080,170)"/>
<wire from="(2070,310)" to="(2090,310)"/>
<wire from="(2080,70)" to="(2080,170)"/>
<wire from="(2080,70)" to="(2160,70)"/>
<wire from="(2090,110)" to="(2090,310)"/>
<wire from="(2090,110)" to="(2120,110)"/>
<wire from="(2120,110)" to="(2120,360)"/>
<wire from="(2120,110)" to="(2380,110)"/>
<wire from="(2120,360)" to="(2380,360)"/>
<wire from="(2130,100)" to="(2130,350)"/>
<wire from="(2130,100)" to="(2380,100)"/>
<wire from="(2130,350)" to="(2380,350)"/>
<wire from="(2140,340)" to="(2380,340)"/>
<wire from="(2140,90)" to="(2140,340)"/>
<wire from="(2140,90)" to="(2380,90)"/>
<wire from="(2150,330)" to="(2380,330)"/>
<wire from="(2150,80)" to="(2150,330)"/>
<wire from="(2150,80)" to="(2380,80)"/>
<wire from="(2160,320)" to="(2380,320)"/>
<wire from="(2160,70)" to="(2160,320)"/>
<wire from="(2160,70)" to="(2380,70)"/>
<wire from="(2170,310)" to="(2380,310)"/>
<wire from="(2170,60)" to="(2170,310)"/>
<wire from="(2170,60)" to="(2380,60)"/>
<wire from="(2180,300)" to="(2380,300)"/>
<wire from="(2180,50)" to="(2180,300)"/>
<wire from="(2180,50)" to="(2380,50)"/>
<wire from="(2190,290)" to="(2380,290)"/>
<wire from="(2190,40)" to="(2190,290)"/>
<wire from="(2190,40)" to="(2380,40)"/>
<wire from="(2340,140)" to="(2340,570)"/>
<wire from="(2340,140)" to="(2400,140)"/>
<wire from="(2400,120)" to="(2400,140)"/>
<wire from="(2400,370)" to="(2400,610)"/>
<wire from="(2420,330)" to="(2500,330)"/>
<wire from="(2420,80)" to="(2500,80)"/>
</circuit>
<circuit name="increment_one_12_bit">
<a name="appearance" val="custom"/>
<a name="circuit" val="increment_one_12_bit"/>
<a name="circuitnamedboxfixedsize" val="true"/>
<a name="simulationFrequency" val="1.0"/>
<appear>
<text dominant-baseline="central" font-family="SansSerif" font-size="10" text-anchor="middle" x="253" y="59">+1</text>
<polyline fill="none" points="250,50 271,60" stroke="#000000"/>
<polyline fill="none" points="250,70 270,60" stroke="#000000"/>
<polyline fill="none" points="240,50 240,70" stroke="#000000"/>
<polyline fill="none" points="240,50 250,50" stroke="#000000"/>
<polyline fill="none" points="240,70 250,70" stroke="#000000"/>
<circ-anchor facing="east" x="270" y="60"/>
<circ-port dir="in" pin="300,110" x="240" y="60"/>
<circ-port dir="out" pin="450,120" x="270" y="60"/>
</appear>
<comp lib="0" loc="(280,150)" name="Constant">
<a name="width" val="12"/>
</comp>
<comp lib="0" loc="(300,110)" name="Pin">
<a name="appearance" val="NewPins"/>
<a name="label" val="A"/>
<a name="radix" val="16"/>
<a name="width" val="12"/>
</comp>
<comp lib="0" loc="(360,80)" name="Constant">
<a name="value" val="0x0"/>
</comp>
<comp lib="0" loc="(450,120)" name="Pin">
<a name="appearance" val="NewPins"/>
<a name="facing" val="west"/>
<a name="label" val="Result"/>
<a name="output" val="true"/>
<a name="radix" val="16"/>
<a name="width" val="12"/>
</comp>
<comp lib="3" loc="(410,120)" name="Adder">
<a name="width" val="12"/>
</comp>
<wire from="(280,150)" to="(300,150)"/>
<wire from="(300,110)" to="(370,110)"/>
<wire from="(300,130)" to="(300,150)"/>
<wire from="(300,130)" to="(370,130)"/>
<wire from="(360,80)" to="(390,80)"/>
<wire from="(390,80)" to="(390,100)"/>
<wire from="(410,120)" to="(450,120)"/>
</circuit>
<circuit name="CompareBlock">
<a name="appearance" val="logisim_evolution"/>
<a name="circuit" val="CompareBlock"/>
<a name="circuitnamedboxfixedsize" val="true"/>
<a name="simulationFrequency" val="1.0"/>
<comp lib="0" loc="(1120,550)" name="Pin">
<a name="appearance" val="NewPins"/>
<a name="facing" val="west"/>
<a name="label" val="Equal"/>
<a name="output" val="true"/>
</comp>
<comp lib="0" loc="(1120,580)" name="Pin">
<a name="appearance" val="NewPins"/>
<a name="facing" val="west"/>
<a name="label" val="Less"/>
<a name="output" val="true"/>
</comp>
<comp lib="0" loc="(1120,610)" name="Pin">
<a name="appearance" val="NewPins"/>
<a name="facing" val="west"/>
<a name="label" val="LessOrEqual"/>
<a name="output" val="true"/>
</comp>
<comp lib="0" loc="(560,500)" name="Pin">
<a name="appearance" val="classic"/>
<a name="label" val="A"/>
<a name="radix" val="16"/>
<a name="width" val="12"/>
</comp>
<comp lib="0" loc="(560,520)" name="Pin">
<a name="appearance" val="classic"/>
<a name="label" val="B"/>
<a name="radix" val="16"/>
<a name="width" val="12"/>
</comp>
<comp lib="0" loc="(560,570)" name="Pin">
<a name="appearance" val="classic"/>
<a name="label" val="compSigned"/>
</comp>
<comp lib="0" loc="(760,500)" name="Splitter">
<a name="facing" val="west"/>
</comp>
<comp lib="0" loc="(760,570)" name="Splitter">
<a name="facing" val="west"/>
</comp>
<comp lib="0" loc="(930,560)" name="Splitter"/>
<comp lib="1" loc="(1080,610)" name="OR Gate">
<a name="size" val="30"/>
</comp>
<comp lib="2" loc="(920,560)" name="Multiplexer">
<a name="width" val="2"/>
</comp>
<comp lib="3" loc="(740,510)" name="Comparator">
<a name="mode" val="unsigned"/>
<a name="width" val="12"/>
</comp>
<comp lib="3" loc="(740,580)" name="Comparator">
<a name="width" val="12"/>
</comp>
<wire from="(1000,550)" to="(1000,570)"/>
<wire from="(1000,570)" to="(1000,620)"/>
<wire from="(1000,570)" to="(1090,570)"/>
<wire from="(1000,620)" to="(1050,620)"/>
<wire from="(1020,540)" to="(1020,560)"/>
<wire from="(1020,560)" to="(1020,600)"/>
<wire from="(1020,560)" to="(1080,560)"/>
<wire from="(1020,600)" to="(1050,600)"/>
<wire from="(1080,550)" to="(1080,560)"/>
<wire from="(1080,550)" to="(1120,550)"/>
<wire from="(1080,610)" to="(1120,610)"/>
<wire from="(1090,570)" to="(1090,580)"/>
<wire from="(1090,580)" to="(1120,580)"/>
<wire from="(560,500)" to="(660,500)"/>
<wire from="(560,520)" to="(630,520)"/>
<wire from="(560,570)" to="(610,570)"/>
<wire from="(610,570)" to="(610,640)"/>
<wire from="(610,640)" to="(900,640)"/>
<wire from="(630,520)" to="(630,590)"/>
<wire from="(630,520)" to="(700,520)"/>
<wire from="(630,590)" to="(700,590)"/>
<wire from="(660,500)" to="(660,570)"/>
<wire from="(660,500)" to="(700,500)"/>
<wire from="(660,570)" to="(700,570)"/>
<wire from="(760,500)" to="(830,500)"/>
<wire from="(760,570)" to="(890,570)"/>
<wire from="(830,500)" to="(830,550)"/>
<wire from="(830,550)" to="(890,550)"/>
<wire from="(900,580)" to="(900,640)"/>
<wire from="(920,560)" to="(930,560)"/>
<wire from="(950,540)" to="(1020,540)"/>
<wire from="(950,550)" to="(1000,550)"/>
</circuit>
</project>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment