Skip to content
A 8-bit CPU Simulation with Logisim
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.gitignore
LICENSE
README.md
assembler.py
cpu.circ
instructions.py

README.md

CPUSIM

A 8-bit CPU Simulation with Logisim.

Opcode

The first bit of instruction represent if the operand is Register Identifier or Immediate Value. The next four bit represent the op-code of instruction. Next 3 bits represent identifier of First Register and next 3(8) bits represent Second Register(immediate value).

16-bit-instr

  1. ADD - 00001 / 10001
  2. SUB - 00010 / 10010
  3. JMP - 00011 / 10011
  4. AND - 00100 / 10100
  5. OR - 00101 / 10101
  6. NOT - 00110 / 10110
  7. XOR - 00111 / 10111
  8. MOV - 01000 / 11000
  9. LOD - 01001 / 11001
  10. STR - 01010 / 11010
  11. HLT - 11111

How to run

Open Assembler and write the program in the shell and save the output file.

python3 assembler.py

Open cpu.circ module in Logisim simulator, click on RAM and Load Image file generated by assembler. Enable the ticks and program will start execution.

Author

Aman Pratap Singh Mohnish Reddy

LICENSE

LICENSE

You can’t perform that action at this time.