In order to understand computer architecture, you need to understand the components that comprise a computer and their interconnections. Sets of instructions, called programs, describe the computations that computers carry out. The instructions are strings of binary digits. When symbols are used for the binary strings, the instructions are called assembly language instructions. Components interpret the instructions and send signals to other components that cause the instruction to be carried out.
In this unit, you will build on your knowledge of programming from CS102: Introduction to Computer Science II to learn how to program with an assembly language. You will use the instructions of a real processor, MIPS, to understand the basics of hardware language. We will also discuss the different classes of instructions typically found in computers and compare the MIPS instructions to those found in other popular processors made by Intel and ARM.
Completing this unit should take you approximately 9 hours.
Read this article to see how a program is edited, compiled (or assembled), linked, and executed in the computer.
Read this article, which discusses how a MIPS assembly language statement is assembled into machine code. Carefully study the example in the article.
Read this article about how a computer actually executes the machine code produced by the compiler (assembler). Registers are simply small memory units that are usually 8, 16, 32, or more bits long. The program counter and instruction register are used in the machine cycle.
Read this article on how numbers can be represented in 1's and 0's that the computer can understand. Study the way numbers can be converted into other representations, like binary, 2's complement, and so on. Also be sure to watch the videos, including the one on floating point representation. Study the examples of binary addition to make sure you understand how it works.
Read this article on the representation of real numbers. Read up to the section labeled "Addition and subtraction."
Study this article if you need more practice at understanding number systems.
This article demonstrates one method for converting from decimal to binary. This conversion is often used as a first step in converting from decimal to any other representation.
This article illustrates a second method for converting from decimal to binary. Use whichever method you prefer.
This page contains an interactive decimal to binary conversion when there are fractions involved. Click on the 0's to change them into 1's. You can also see the 2's complement representation for negative numbers.
Read this article for an introduction to the three different instruction formats for the MIPS processor: the R-Format, the I-Format, and the J-Format instructions. MIPS is an acronym that stands for Microprocessor Instructions without Interlocked Pipeline Stages. MIPS is a RISC (Reduced Instruction Set Computer) introduced by MIPS technologies. Also, ISA, if you encounter it, stands for Instruction Set Architecture.
Read this article to learn about arithmetic and logical instructions for the MIPS processor.
Read this article to learn about the control flow instructions for the MIPS processor, including the basic ones: jump and branch instructions.
Read this article to learn about memory instructions for the MIPS processor.
MIPS assembly is an assembly language, which is a mnemonic or meaningful code for the machine language format in computer programming. Read this section to get a sense of how the addresses to memory are coded in a MIPS microprocessor.
Read this article, which gives two examples of instructions set architectures (ISAs). Look over how the different microprocessors address memory. Take note of similarities and differences of format, instructions and type of instructions, and addressing modes between these two as well as between these and the MIPS instructions of the previous sections.
Take this assessment to see how well you understood this unit.