GithubHelp home page GithubHelp logo

siathalysedi / logic Goto Github PK

View Code? Open in Web Editor NEW

This project forked from rzscheck/logic

0.0 2.0 0.0 42 KB

A digital logic simulation written in C

License: GNU General Public License v3.0

Makefile 0.57% C 85.85% Objective-C 13.57%

logic's Introduction

logic

A digital logic simulation written in C

This is an attempt to simulate an eight bit computer, starting from the bare logic gates. It's based off of the NandGame, which in turn is based off of Nand2Tetris. I've gotten all of the basic components created. The code, while barely commented, should be pretty self explanatory if you know about digital logic and components like multiplexors.

Help Wanted: ALU/instruction set design

I want to do something pretty simple but that has enough functionality to actually do stuff (run a simple OS???). Coding the logic gates and components was the easy part. Any help would be greatly appreciated with this as I don't have a good idea what's necessary in an instruction set to make it theoretically Turing Complete or computationally universal or whatever (ignoring stuff like memory limits).

Warning: THIS IS A WORK IN PROGRESS. IT DOESN'T DO ANYTHING COOL RIGHT NOW.

It's set to run the test() function from test.c, which in turn runs test functions for each component (most are commented out right now).

It's also not working correctly. I'm having some issues with the combined memory (RAM and registers) component.

Extra Warning: I mean tests in the loosest sense. I'm just visually checking for correct output. I know this isn't best practice, but I'm just an ignorant teenager who hasn't had the time/motivation to learn/teach myself about good testing

To compile just run make. I use gcc so you can change the Makefile if you use clang or something else. Then just run ./logic

Yet Another Warning: This has only been tested on a Raspberry Pi 3B running the latest 32-bit Rasberry Pi OS. There's nothing that should prevent it from working on other Linux installations as far as I know. As for Mac and Windows, who knows?

logic's People

Contributors

rzscheck avatar svajoklis-1 avatar

Watchers

James Cloos avatar  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.