Giter Site home page Giter Site logo

wadaboa / computer-architectures-project Goto Github PK

View Code? Open in Web Editor NEW
0.0 2.0 0.0 856 KB

Different algorithms implemented in MIPS assembly, for Computer Architectures class at UNIFI

License: MIT License

Assembly 100.00%
mips assembly matrix-multiplication architetture-elaboratori unifi ae

computer-architectures-project's Introduction

Computer Architectures project

This repository contains the implementation of three exercises, for the lab project of Computer Architectures class at UNIFI.

Usage

In order to run the exercises, download a MIPS simulator, like MARS or QtSpim and simply load them.

Exercises

1. Strings analysis

Translates a given alphanumerical string into a sequence of '1', '2', '9' and '?' characters, by applying the following mapping:

  • The substring "uno" becomes '1'
  • The substring "due" becomes '2'
  • The substring "nove" becomes '9'
  • Everything else becomes '?'

For example, if the input string is "uno due ciao 33 tree tre uno Uno di eci" the output string will be "1 2 ? ? ? ? 1 ? ? ?".

2. Nested and recursive procedures

Let G and F be two procedures like the following:

Procedure G(n)
  begin
    b := 0
    for k := 0, 1, 2, ... , n do 
    begin
      b := b2 + u 
    end
    return b 
  end
Procedure F(n) 
  begin
    if n = 0 then return 1
    else return 2 * F(n โˆ’ 1) + n 
  end

Let n be a natural number between 1 and 8. The software should output:

  • The value returned by G(n)
  • A trace of nested procedure calls and their intermediate results, for both F and G

3. Matrix operations

The software should support 5 different commands:

  • Matrix insertion: Give the user the ability to insert a square matrix with dimensions between 1 and 4
  • Matrix sum: Sum two identically-sized matrices
  • Matrix subtraction: Subtract a matrix from another one with the same dimensions
  • Matrix product: Apply row by column product of two compatible matrices
  • Exit: Print an exit message and close the program

Assignment & report

You can have a look at both the project assignment and the written report, but beware that they have been written in the Italian language.

computer-architectures-project's People

Contributors

wadaboa 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.