Introduction To MIPS Assembly Language Programming
Not rated yetRate this bookCharles W. Kann’s Introduction to MIPS Assembly Language Programming connects binary representation with instructions, machine encoding, memory, control flow, subprograms, recursion, and arrays. This guide follows the nine chapters in the LibreTexts export and emphasizes tracing what the processor model actually does.
Free reading is available at the official source. Opens in a new tab.
FreeAbout this book
Charles W. Kann’s Introduction to MIPS Assembly Language Programming connects binary representation with instructions, machine encoding, memory, control flow, subprograms, recursion, and arrays. This guide follows the nine chapters in the LibreTexts export and emphasizes tracing what the processor model actually does.
How to study this book
Use the MARS environment described by the source or a clearly identified compatible simulator. Keep a register-and-memory trace beside each small program. State word size, signedness, address units, and calling conventions before interpreting a result. Predict behavior before running code, then explain any difference rather than changing instructions at random.
Chapter-wise explanations and study tasks
Chapter 1 — Representation and Arithmetic
Binary, decimal, hexadecimal, character representation, two’s complement, arithmetic, and bitwise operations establish the meaning of stored patterns. The same bits can represent different values depending on the interpretation.
Study task: Convert a small value between bases and compare signed and unsigned interpretations of one fixed-width pattern.
Chapter 2 — First MIPS Programs
The MARS introduction connects source text, memory, registers, input, and output. Identify which behavior belongs to the simulated machine and which is supplied by the simulator’s service conventions.
Study task: Trace a short read-and-print program, recording register changes and the purpose of each service request.
Chapter 3 — Arithmetic and Logical Operators
Three-address operations break expressions into explicit steps. Integer division, shifts, and bitwise operations require attention to precision, signedness, and intermediate results rather than only the final arithmetic expression.
Study task: Translate an arithmetic expression into a sequence of instructions and test a case that exposes integer-division truncation.
Chapter 4 — Machine Code
Instruction formats connect readable assembly with encoded fields. Register identifiers, operation fields, immediates, and shift amounts must be placed according to the relevant format.
Study task: Encode a simple instruction by hand and decode it back to verify every field.
Chapter 5 — Simple Subprograms
Calls, return addresses, parameters, and returned values make reusable routines possible. Follow the program counter and return-address behavior as carefully as the routine’s calculation.
Study task: Write a small reusable routine and trace its call, parameter use, return value, and return location.
Chapter 6 — Data-Segment Memory
The flat memory model, static data, addresses, and access methods connect labels with stored values. An address and the value at that address are different quantities.
Study task: Draw a small data layout and show the addresses and loaded values for two accesses.
Chapter 7 — Control Structures
Conditionals, branches, loops, and nested blocks express high-level decisions through explicit jumps. Branch encoding and control-flow traces help explain off-by-one or wrong-target errors.
Study task: Translate a loop with a conditional into assembly and verify its behavior for zero, one, and several iterations.
Chapter 8 — Reentrant Subprograms
Stacks and stack frames preserve information across calls and recursion. A routine’s correctness includes restoring the state expected by its caller, not merely computing the right local result.
Study task: Trace a small recursive call tree and show the saved values in each active stack frame.
Chapter 9 — Arrays
Array construction, dynamic memory, traversal, and bubble sort connect indexing with address arithmetic. Element size and bounds must be reflected in each memory access.
Study task: Trace an array traversal and a short sorting pass, showing how each index becomes an address.
Applied assignment
Create a small simulated MIPS program that reads or initializes an integer array, calls a separate processing routine, and prints a result. Include a memory diagram, register convention, hand trace, and tests for a minimal input and an ordinary input. Explain one bug discovered by comparing prediction with simulator behavior.
Suggested reading plan
Study Chapters 1–3 for representation and execution, 4 for encoding, 5–6 for routines and memory, and 7–9 for structured programs and data. Revisit a working program after each block and improve the explanation of its machine-level behavior.
Questions for reflection
- Does this instruction use an address or the value stored there?
- Which state must survive a subprogram call?
- What interpretation gives the bit pattern its numerical meaning?
Edition and source notes
This guide follows Kann’s nine-chapter MIPS text and its MARS-based teaching examples. Simulator services and instruction conventions should be matched to the selected environment. The exercises are supplementary programs and traces, not official solutions to the book’s exercises.
This page provides book information and study material. Full-text access is provided by the original publisher or authorised source; a listing does not grant permission to republish the book.
Read our Library Access & Copyright policyExplore the contents
Check the chapters covered in this edition.
Visit the official source
See reading, preview or purchase options.
Save for later
Keep this textbook in your saved collection.
Reader ratings & reviews
Share your thoughts
Your review helps other students choose the right resources.







