We may earn an affiliate commission when you visit our partners.
Dr. Shahram Taheri

Welcome to the Computer Architectures and MIPS Assembly Programming Course.

* Updated in Feb 2024*  Several Detailed Explanation Lecture Videos are Uploaded(more than 5 hours)

Read more

Welcome to the Computer Architectures and MIPS Assembly Programming Course.

* Updated in Feb 2024*  Several Detailed Explanation Lecture Videos are Uploaded(more than 5 hours)

This course's major purpose is to outline the architectural aspect of computers. In other words, it is concerned with how computers, as machines, execute instructions at many levels, including the hardware and assembly language levels. Students learn about the fundamental technological structure and evolution of computers, fundamental hardware components, MIPS instructions set architectures and its assembly language, and processor microarchitecture including the control unit (MIPS is used as an example).

This course can be divided into 2 chapters: Software and Hardware. In the software chapter (Sections 1-3) you will learn how to write an assembly language program for MIPS architecture and in the hardware chapter (Sections 4-7), I will show you how the internal components of the MIPS processor work together to execute your program. Finally, I prepared several tutorials and assignments with their solutions to help you better understand this topic.

The emphasis of the course is on understanding how computers work. This will provide a basis for further study of computer architecture and computer software. The MIPS processor, the subject of this course, has a well designed architecture and is particularly fruitful to study. However, the goal of the course is not to turn you into a MIPS programmer, but to give you an understanding of all computer systems.

Course Outline

1. Introduction to MIPS Assembly Programming

  • Memory Operand: Load Word & Store Word in MIPS Assembly Language

  • Immediate Addressing Mode & Signed/ Unsigned data in MIPS Assembly Language

  • align, .byte .half and .word Assembler's directive

  • How Data will be Stored in Memory in the MIPS Architecture?

  • MIPS System Call

  • Simple I/O and MIPS System Calls: Hello World.

  • Simple I/O and MIPS System Calls: Read 2 Numbers and Display their Summation

  • Simple I/O and MIPS System Calls: an Example of IF-ELSE Structure in MIPS

  • Simple I/O and MIPS System Calls: an Example of IF-ELSE-IF Structure in MIPS

  • MIPS Divide Instruction + Determine whether the input number is odd or even

  • MIPS Example: Read 5 Numbers and Print Their Average

  • MIPS Multiplication Instruction

  • MIPS Example: Display the Multiplication of 2 numbers + Factorial Example

  • MIPS Example: Add Two Integer Numbers

2. Learn MIPS Programming with Examples

  • MIPS Example: Read a char and determine whether it is an uppercase, lowercase or etc. in MIPS

  • MIPS Example: Determine the number of zeros in the binary notation of a number

  • MIPS Example: Read two numbers A and B and  compute  and print (A+2*B)/5

  • MIPS Example: Convert C code to MIPS Assembly

  • MIPS Examples: Learn How to Divide and Multiplication

  • MIPS Example: Find the Maximum Element of an Array in MIPS Assembly Language

  • MIPS Example: Find Both Maximum and Minimum of an Input Integer Array

  • MIPS Example: Nested IF-ELSE IF Structure

  • MIPS Example: Convert a capital letter  to lowercase and vice versa

  • MIPS Example: Check the input character and determine is it alphabet, digit or .

  • MIPS Example: Read 2 operands and  an operator and print the result

  • MIPS Example: Compute the sum of N integers: (1 + 2 + ... + N),  While Structure

3.Functions in MIPS Assembly Language with Several Examples

  • Functions in MIPS - Jump and Link (jal) & jump Register(jr) Instructions

  • Functions in MIPS - How to Pass Arguments to the Functions?

  • Functions in MIPS - Who saves the register? Spilling Registers

  • Functions in MIPS - MIPS's conventions to split register spilling chores

  • Functions in MIPS - MIPS Stack and Push and Pop Implementations

  • Functions in MIPS - Factorial Function

  • MIPS Example: Write a function to read N numbers and store them in an array

  • MIPS Example: Write a function to reverse an input array

  • MIPS Example: Write a function to count the number of divisors of an argument

4.MIPS Instruction Encoding

  • MIPS Instruction Encoding: R-Type Instructions

  • MIPS Instruction Encoding: I-Type Instructions

  • MIPS Instruction Encoding : J-Type Instruction

5. Computer Architecture: Processor Datapath, ALU and Register File Design

  • Generic Datapath and Register Files Part 1

  • Generic Datapath and Register Files Part 2

  • ALU Design Part 1

  • ALU Design Part 2

6. Single-Cycle Datapath for MIPS Architecture

  • MIPS Datapath Overview

  • Datapath for Fetching an Instruction and increment PC  in MIPS Architecture

  • Datapath for R-type Instruction in MIPS Architecture

  • MIPS Datapath for Load Word (LW) and Store Word (SW) Instructions

  • Datapath for Branch Instructions in MIPS Architecture

  • Combining the Datapaths of R-type Instructions and LW/SW Instructions

  • Integrating  the datapaths of R-Type, Memory and Branch Instructions in MIPS Arc

  • R-Type  + Memory Instructions Data Path

  • Control Unit for the Single-cycle  MIPS Processor

  • ALU Control Unit Design for MIPS Architecture

7. Multi-Cycle Datapath for MIPS Architecture

  • Multi-Cycle Datapath for MIPS Architecture Part 1

  • Multi-Cycle Datapath for MIPS Architecture Part 2

  • Multi-Cycle Datapath for MIPS Architecture Part 3

  • Multi-Cycle Datapath for MIPS Architecture Part 4

8. Tutorials + Assignments

  • Tutorial + Assignment: Introduction to MARS

  • Tutorial + Assignment: Introduction to MIPS Assembly Programming

  • Tutorial + Assignment: Integer Arithmetic

  • Tutorial + Assignment: Flow Control

  • Tutorial + Assignment: Arrays and Files

  • Tutorial + Assignment: Integer Multiplication and Division

  • Tutorial + Assignment: MIPS Functions and the Stack Segment

  • Fibonacci sequence

  • Compute the summation of even numbers between 2 input numbers

  • Simple I/O in MIPS Assembly Language

  • IF-ELSE-IF Structure in MIPS Assembly Language

  • Single-Cycle Datapath Quiz with Video Solution

  • Multi-cycle Datapth

The course is Example-based. Almost every lecture and component of the course directly leads to a hands-on laboratory assignment with a solution. The more you practice with MIPS hardware and software, the more proficient you will become.

I use lots and lots of examples. I take you step-by-step through the lessons – each time providing sample code and documentation to make sure you are supported through the course.

The course does not waste your time. From the very beginning, we jump right into your first project – Let's Get Started.

I am here to help. I am an educator with a singular focus on providing a meaningful experience for my students. And, while I cannot do the work for you, I am willing to work WITH you to help you succeed.

The goal of this course is to shed light on the obscure interface layer between hardware and software. In this context, we will go over instruction set architectures, assembly programming, computer/memory organization, machine language conversion, data bus, and sub-routines, which are all important topics in computer architecture. This course teaches students about the core hardware components of a computer and how they interact with one another. It educates students about the computer's many layers, such as the application level, operating system level, assembly language level, and machine language level.

Computer architectures, which I recommend to anyone working on electronic system design or computer programming and who is interested in processor design, have opened many doors for me in my own career. I hope you find this tutorial useful as well.

Enroll now

What's inside

Learning objectives

  • Mips instruction set architecture
  • Mips assembly programming - theory and practice with tens of examples
  • Risc isa architectures
  • Single cycle and multi-cycle processor design
  • Arithmetic and logic unit (alu) design
  • Design the control unit of a real processor
  • Convert mips assembly instructions into machine codes
  • Understand computer internal parts such as alu, datapath and control unit
  • Understand cpu (central process unit) and how it works

Syllabus

Sample MIPS Videos

Write a program that asks the user to enter an alphabetic character (either lower or upper case) and change the case of the character from lower to upper and from upper to lower and display it.

Read more

Write a program that asks the user to enter an unsigned number and read it. Then swap the bits

at odd positions with those at even positions and display the resulting number. For example, if the

user enters the number 9, which has a binary representation of 1001, then bit 0 is swapped with

bit 1, and bit 2 is swapped with bit 3, resulting in the binary number 0110. Thus, the program

should display 6.

Write a program that asks the user to enter and integer number and read it. Then ask him to

enter a bit position (between 0 and 31) and display the value of that bit.

Traffic lights

Read about what's good
what should give you pause
and possible dealbreakers
Provides a solid understanding of MIPS assembly language, which is foundational for understanding how software interacts with hardware at a low level
Covers both software (assembly programming) and hardware (processor design), offering a comprehensive view of computer architecture
Includes numerous examples and hands-on assignments with solutions, facilitating practical learning and skill development
Focuses on the MIPS processor, which, while not as widely used today, provides a clear and well-designed architecture for learning computer systems concepts
Explores the design of the control unit, ALU, and datapath, which are essential components in understanding how a CPU operates
Uses the MARS IDE, which is specific to MIPS assembly, so learners may need to invest time in learning this IDE if they are not already familiar with it

Save this course

Create your own learning path. Save this course to your list so you can find it easily later.
Save

Reviews summary

Computer architecture with mips

According to learners, this course provides a solid foundation in computer architecture, particularly focusing on MIPS assembly language and how processors execute instructions. Students highlight the abundance of practical MIPS programming examples as a major strength, making the software aspects relatively accessible. While some find the later sections on hardware concepts like datapaths and control units to be challenging, the included tutorials and assignments are often praised for helping to solidify understanding. Recent updates in early 2024 appear to have added further clarity to certain topics. Overall, it is considered a valuable learning experience for those seeking a deep understanding of computer internals.
Instructor is responsive and supportive.
"The instructor was responsive to questions and seemed genuinely focused on student success."
"I appreciated the instructor's stated willingness to work with students to help them succeed."
Feb 2024 updates improved content.
"The detailed explanation videos uploaded in Feb 2024 significantly improved the clarity of complex topics."
"Noticed the updated content, which seemed to fill in gaps and provide better explanations."
"It's great that the instructor continues to update the course based on feedback, the recent additions are helpful."
Gives a good base for computer architecture.
"This course gives a very solid foundation for understanding how computers work at a fundamental level."
"It provides an excellent starting point for further study in computer architecture or low-level programming."
"I feel like I now have a much better grasp of the interface between hardware and software."
"The course effectively covered the core components and concepts of processor design."
Assignments and tutorials solidify learning.
"The tutorials and assignments, especially those using MARS, were invaluable for practicing the concepts."
"Having assignments with solutions available was very beneficial for checking my understanding."
"The hands-on labs and tutorials listed in section 8 are great for reinforcing the material."
"Working through the provided assignments helped solidify the theoretical knowledge from the lectures."
Numerous examples aid assembly learning.
"The course is rich with MIPS assembly programming examples which are extremely helpful for understanding."
"I really appreciated the step-by-step examples provided throughout the assembly language sections."
"Learning MIPS through the many practical examples made this part of the course very clear and applicable."
"The examples in sections 1-3 were crucial for grasping the MIPS instruction set and programming logic."
Datapath and control unit sections are difficult.
"Sections on single-cycle and multi-cycle datapaths were the most challenging parts, requiring significant effort."
"Understanding the control unit design in detail was quite difficult and needed rewatching lectures."
"While the MIPS programming was clear, the hardware architecture parts were complex and harder to follow."
"I struggled with the later parts covering processor internals; it assumes some prior digital logic knowledge."

Activities

Be better prepared before your course. Deepen your understanding during and after it. Supplement your coursework and achieve mastery of the topics covered in Computer Architecture and MIPS Assembly Language Programming with these activities:
Review Digital Logic Fundamentals
Reinforce your understanding of digital logic concepts, which are foundational to computer architecture and understanding how MIPS instructions are executed at the hardware level.
Browse courses on Digital Logic
Show steps
  • Review truth tables for AND, OR, NOT, XOR gates.
  • Practice simplifying Boolean expressions using Karnaugh maps.
  • Study the operation of flip-flops and registers.
Read 'See MIPS Run'
Gain a practical understanding of MIPS assembly language programming through a hands-on approach with real-world examples.
Show steps
  • Work through the code examples in the book.
  • Experiment with different MIPS instructions and programming techniques.
  • Apply the concepts learned to solve programming problems.
Read 'Computer Organization and Design'
Supplement the course material with a comprehensive textbook on computer architecture, providing a broader and deeper understanding of the concepts.
Show steps
  • Read chapters related to MIPS architecture and datapath design.
  • Work through the examples and exercises in the book.
  • Compare the book's explanations with the course lectures.
Four other activities
Expand to see all activities and additional details
Show all seven activities
MIPS Assembly Programming Exercises
Solidify your understanding of MIPS assembly language by completing a series of programming exercises that cover various concepts.
Show steps
  • Write MIPS programs to perform arithmetic operations.
  • Implement control flow structures like loops and conditional statements.
  • Create functions and use the stack to pass arguments.
  • Work with arrays and memory addressing.
Create a MIPS Assembly Cheat Sheet
Compile a cheat sheet of commonly used MIPS instructions, system calls, and syntax rules for quick reference during programming exercises and projects.
Show steps
  • Gather information on MIPS instructions and system calls.
  • Organize the information in a clear and concise format.
  • Include examples of how to use each instruction and system call.
  • Distribute the cheat sheet to other students.
Create a MIPS Assembly Language Guide
Reinforce your knowledge by creating a comprehensive guide to MIPS assembly language, explaining key concepts and providing examples.
Show steps
  • Outline the topics to be covered in the guide.
  • Write clear and concise explanations of MIPS instructions and syntax.
  • Include code examples to illustrate each concept.
  • Organize the guide in a logical and easy-to-follow manner.
  • Share the guide with other students and solicit feedback.
Design a Simple MIPS Processor
Apply your knowledge of computer architecture and MIPS assembly language by designing a simplified MIPS processor in a hardware description language (HDL) like Verilog or VHDL.
Show steps
  • Define the instruction set and datapath of the processor.
  • Implement the control unit to fetch, decode, and execute instructions.
  • Simulate the processor to verify its functionality.
  • Document the design and implementation details.

Career center

Learners who complete Computer Architecture and MIPS Assembly Language Programming will develop knowledge and skills that may be useful to these careers:
Computer Architect
A Computer Architect researches and designs computer hardware, focusing on improving performance, efficiency, and reliability. This course can help a prospective Computer Architect by providing a thorough explanation of fundamental hardware and software concepts. The course covers MIPS instruction set architectures, assembly language, and processor microarchitecture. The material presented would be helpful for anyone interested in processor design. Someone looking to become a Computer Architect may benefit from this course.
Hardware Engineer
A Hardware Engineer designs, develops, and tests physical components of computer systems. Understanding MIPS instruction encoding and processor datapath design helps significantly in hardware design and optimization. The course's division that focuses on the internal components of the MIPS processor and how they work together helps you get started. Hardware Engineers who wish to increase their breadth of knowledge might consider taking this course. This can enable them to work more effectively with software engineers.
Firmware Engineer
A Firmware Engineer develops low-level software that controls hardware devices. This course on Computer Architecture and MIPS Assembly Language Programming is directly applicable to this role because it covers MIPS assembly language and the internal workings of a processor. Learning how internal components of the MIPS processor work together to execute your program is key. It helps build a deep understanding of how to interface with hardware at a fundamental level. A Firmware Engineer seeking to improve their skills may find this course to be quite practical.
Reverse Engineer
A Reverse Engineer analyzes software and hardware to understand its design and functionality, often without access to original source code or documentation. The examination of MIPS assembly language and processor design helps a Reverse Engineer understand how software interacts with hardware at a low level. Understanding the technological structure and evolution of computers can also prove valuable in identifying vulnerabilities or understanding undocumented features. Reverse Engineers will appreciate the focus on instruction execution at both the hardware and assembly language levels.
Embedded Systems Engineer
An Embedded Systems Engineer designs, develops, and tests software and hardware for embedded systems, which are specialized computer systems within larger devices. This course on Computer Architecture and MIPS Assembly Language Programming is helpful because it explains processor microarchitecture, fundamental hardware components, and the MIPS instruction set. Understanding how computers work at this level builds a strong foundation for designing efficient and effective embedded systems. This course may be useful due to its focus on the technological structure and evolution of computers.
Research Scientist
A Research Scientist conducts research and development in computer science or related fields, often requiring a master's degree or PhD. The detailed study of computer architecture, MIPS assembly language, and processor design contained in this course can be highly valuable. Computer architecture has opened many doors for me in my own career. I hope you find this tutorial useful as well. The goal is to shed light on the obscure interface layer between hardware and software.
Compiler Developer
A Compiler Developer creates the software that translates high-level programming languages into machine code that computers can execute. The course helps build a grasp of how assembly language instructions are generated and executed by the processor. Additionally, the course's coverage of instruction set architectures and machine language conversion will assist in understanding the backend processes of the translation. Compiler Developers should consider it.
Security Analyst
A Security Analyst protects computer systems and networks from threats and cyberattacks. Understanding computer architecture and assembly code empowers Security Analysts to analyze malicious software, identify vulnerabilities, and develop effective security measures. Knowledge of how computers work provides a strong foundation for understanding exploitation techniques. Therefore, Security Analysts would find the information taught here extremely useful.
Performance Engineer
A Performance Engineer analyzes and optimizes the performance of software and hardware systems. The analysis of computer architecture and MIPS assembly code helps in identifying bottlenecks and areas for improvement. The course's emphasis on understanding how computers work is essential for anyone looking to optimize system performance. A Performance Engineer who wishes to understand processor design should study this course.
Computer Science Professor
A Computer Science Professor teaches computer science courses at the college or university level. This course will assist a Professor by enhancing their own understanding of computer architecture and assembly language. Having a deep understanding of MIPS assembly programming, RISC ISA architectures, and single cycle processor design would be helpful when teaching similar topics to students. Aspiring professors may wish to take this course.
Operating Systems Developer
An Operating Systems Developer designs and implements the core software that manages computer hardware and provides services for applications. This course is relevant due to its coverage of computer architecture. The course's detailed look at computer hardware components and how they interact with software provides foundational knowledge for OS development. The section on MIPS assembly programming may familiarize students with low level programming. Operating Systems Developers should consider this course.
Computer Systems Analyst
A Computer Systems Analyst studies an organization's computer systems and procedures and designs improvements. This course may help by providing a solid foundation in computer architecture and assembly language programming. The course provides insight into how software and hardware interact. Computer Systems Analysts should consider this course as a way of enhancing their understanding how computer systems function.
Technical Writer
A Technical Writer creates documentation for software, hardware, and other technical products. The thorough comprehension of computer architecture and MIPS assembly language garnered from the course will enable a Technical Writer to explain complex concepts clearly and accurately. The course's division into software and hardware chapters may be particularly useful for organizing documentation. Technical Writers may consider this course.
Software Developer
A Software Developer designs, develops, and tests software applications. The course could be helpful to Software Developers seeking a deeper level of knowledge. This course provides a foundation for understanding how software interacts with hardware at a low level, which can inform better software design and optimization. While not directly applicable to all software development tasks, the knowledge gained can be invaluable for system-level programming. Software Developers may want to take this course.
Data Scientist
A Data Scientist analyzes large datasets to extract insights and develop data-driven solutions. Knowledge of computer architecture may provide Data Scientists insights into hardware considerations that affect the performance of data processing algorithms. Although not a direct requirement, it may aid in optimizing code for specific hardware architectures. Some Data Scientists might find this course interesting.

Reading list

We've selected two books that we think will supplement your learning. Use these to develop background knowledge, enrich your coursework, and gain a deeper understanding of the topics covered in Computer Architecture and MIPS Assembly Language Programming.
Standard textbook for computer architecture courses. It provides a comprehensive overview of computer organization and design principles, including instruction set architectures like MIPS. It offers in-depth coverage of datapath and control unit design, memory hierarchies, and pipelining. This book is highly recommended as a reference text to deepen your understanding of the course material.
Provides a practical introduction to MIPS assembly language programming. It focuses on hands-on examples and real-world applications. It is particularly useful for beginners who want to learn MIPS assembly language quickly. This book serves as a good supplementary resource for understanding the software aspects of the course.

Share

Help others find this course page by sharing it with your friends and followers:

Similar courses

Similar courses are unavailable at this time. Please try again later.
Our mission

OpenCourser helps millions of learners each year. People visit us to learn workspace skills, ace their exams, and nurture their curiosity.

Our extensive catalog contains over 50,000 courses and twice as many books. Browse by search, by topic, or even by career interests. We'll match you to the right resources quickly.

Find this site helpful? Tell a friend about us.

Affiliate disclosure

We're supported by our community of learners. When you purchase or subscribe to courses and programs or purchase books, we may earn a commission from our partners.

Your purchases help us maintain our catalog and keep our servers humming without ads.

Thank you for supporting OpenCourser.

© 2016 - 2025 OpenCourser