Skip to content

This project implements a simple calculator using MIPS assembly language.

Notifications You must be signed in to change notification settings

ABNmmd/Simple-MIPS-Calculator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 

Repository files navigation

FSA - Mini Projet - Simple MIPS Calculator

Project Overview

This project implements a simple calculator using MIPS assembly language. It supports basic arithmetic operations including addition, subtraction, multiplication, division, modulo, and negation. Users can enter numbers via the keyboard, choose an operation from a menu, and see the result displayed on the screen.

Features

  • Input two integers via the keyboard.
  • Menu with options for addition, subtraction, multiplication, division, modulo, and negation.
  • Handle special cases such as division by zero.
  • Display the calculation result on the screen.
  • Option to exit the program.

Handling Special Cases

  • If the user tries to divide by zero, an error message is displayed and the program returns to the main menu.
  • For negation, only the first number is used.

Requirements

  • A MIPS simulator like SPIM or QtSpim.
  • A text editor for modifying the source code, if needed.

What I Learned

Throughout this project, I gained valuable experience in several areas:

  • MIPS Assembly Programming: Understanding MIPS assembly language, including the use of registers, basic arithmetic and logic instructions, and syscall operations for input/output.
  • Error Handling: Learning how to manage edge cases like division by zero and ensuring the program continues to function smoothly.
  • User Interaction: Designing a simple user interface with a menu system, including reading input from the keyboard and displaying results on the screen.
  • Problem-Solving: Developing the logic for a simple calculator, addressing challenges, and debugging issues along the way.

These experiences have helped me become more proficient in MIPS assembly programming and improved my problem-solving skills.

Author

About

This project implements a simple calculator using MIPS assembly language.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published