Code Monkey home page Code Monkey logo

iasmachine's Introduction

Welcome to IASmachine 👋

Version Twitter: SriHarshaG6

The implementation has the following structure:

IASMachine
    -ALU
    -Memory
    -ProgramControlUnit

where the bits are handled by "BitsArray" (Uses strings to implement)\ It also has various methods to get certain range of bits, get the bits representaion padded with zeros in front etc.
Other than the above mentioned 4 files, I have a main file, which takes in the input of assembly code from a text file("input.txt" is given as an example).
"Colors" file is used to implement the colors on the bash. (during the execution).
A few screenshots have also been included in the "screenshots" repository

ALU
  -Containes few registers (MBR, AC, MQ)
  -Containes various bit manipulations and arithematic operations. It has methods to compute
    -Negative number(in binary) form of a given binary
    -Mod of a binary
    -addition
    -subtraction
    -multiplication
    -division
    -Left shift
    -Right shift
  -This class is used to handle all the arithematic operations.

Memory
  -Has method to create a main Memory
  -Each word is fixed as 40bits and is implemented using "BitsArray" data structure.(implemented seperately)
  -Creates a 2D matrix of bits (or array of "BitsArray")

ProgramControlUnit
  -It takes in ALU and Memory
  -It has two sub classes
    -registers (PC,MAR,IR,IBR)
    -ISA (Has a hashmap of opcodes and their definitions) (Which are used to decode instructions)
     (HALT is assigned with "000000000000" as its opcode)
  -Has methods to fetch and decode the instructions from the main Memory

IASMachine
  -Unites all the above classes to constitue an IAS computer
  -Has method to execute it. (Fetch and decode till halt (or any error occurs))

Usage

javac *.java
java IMT2019030_MAIN

Author

👤 Sri Harsha G

Show your support

Give a ⭐️ if this project helped you!

iasmachine's People

Contributors

gsri30 avatar

Watchers

 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.