Skip to content

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

License

Notifications You must be signed in to change notification settings

Wadaboa/computer-architectures-project

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.

About

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

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published