During the prelab you will become familiar with integer arithmetic in MIPS. Since you have already used addition and subtraction in the previous labs, we will focus on issues related to the difference between signed and unsigned operations, and overflows. An overflow is a situation in which the result of an operation can notA FPGA Implementation of a MIPS RISC Processor for Computer Architecture Education By: Victor P. Rubio, B.S. [email protected] Advisor: Dr. Jeanine Cook [email protected] New Mexico State University Las Cruces New Mexico July 2004

A slt B = 000 … 000 if A B, i.e. if A – B 0 • Thus, each 1-bit ALU should have an additional input (called “Less”), that will provide results for slt function. This input has value 0 for all but 1-bit ALU for the least significant bit. • For the least significant bit Less value should be sign of A – B Set Less Than (slt) Function

One of the more common functions in any language is conversion of an integer to a string. This implementation, which demonstrates not only the common function activation record format but also a simple recursive function, was written in response to a recent question in which the OP posted an incomplete implementation; this should show how such a function could be written for the MIPS processor.

Firebird dtg ink