Git Product home page Git Product logo

scrapmechaniccpu's Introduction

ScrapMechanicCPU

ScrapMechanic 4hz 8bit programmable CPU made from over 6000 logic-gates.
Comes with pre-programmed fibonacci and a 7-segment display hooked up to it.

Usage

  1. press the button closest to the display to reset the program counter.
  2. enable every switch, the last one being the closest to the display.
  3. watch it do it's thing until it overflows (it will keep on going, though)

Programming

The program memory is the largest component. It has 256 12-Bit rows, colored yellow and green.
Programming is done by changing logic-gates to NOR / OR, so that their default state (without inputs) changes.
To start programming, disable the switch located on the front of the program memory to enter human-readable-mode.

Binary Opcode Description
00000000 HLT Halt
00000001 LDA Load from instruction to A
00000010 LDB Load from instruction to B
00000011 STA Store from A to memory adress
00000100 STB Store from B to memory adress
00000101 STC Store from C to memory adress
00000110 MEA Load from memory to A
00000111 MEB Load from memory to B
00001000 ADD A+B=C
00001001 SUB A-B=C
00001010 CMP Compare A and B into C, if true c=00000001 else c=00000000. Adress 01 for >, adress 00 for <, adress 10 for ==
00001011 JMP Jumps to adress in program memory
00001100 JIF Jumps to adress if C = 00000001
00001101 OUT Outputs memory adress to screen
00001110
00001111

Features

256Bit ROM for programming (4bit opcode, 8bit parameter)

16Byte adressable RAM

4hz (which is actually pretty fast for Scrap Mechanic)

ALU

  • CLR adder
  • comparisons
  • multiplication

scrapmechaniccpu's People

Contributors

pleezon avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.