This is a course offered by the Department of Computer Science at Columbia University.
Students are urged to let the instructor know about any problems they are having with the course, criticisms, suggestions for improvement, etc. They can do so by such means as talking to the instructor, sending him email, or using the class newsgroup. Those who, for whatever reason, wish to communicate some thoughts anonymously, can do so by communicating privately (in person or by any other means) with one of the class ombudspeople.
These are members of the class who have volunteered to pass on to the instructor any suggestions or complaints that you convey to them, and they will do so without identifying the source. They are:
Course Instructor: Professor Stephen
H. Unger
Supplementary Reading. NOT Required
Maurice V. Wilkes, Computing Perspectives, Morgan Kaufmann, San Mateo, CA (1995)
M. Morris Mano, Computer System Architecture, Third Edition, Prentice-Hall, 1993.
Computer Organization is about how computers work in terms of functional blocks such as the arithmetic unit, registers, pipelines, caches, RAMS, etc. Machine language programming is a feature of the course. The emphasis is on RISC architecture.
Teamwork and cooperation among engineers and scientists is very important. Students should get into the habit by helping one another master the subjects they are learning. For example, studying in pairs or groups can be very helpful. Answering one another's questions, sharing information about resources, such as books or reprints, are all good things to do. In some courses (not this one) there are projects in which students work in teams.
BUT there are other situations in which collaboration is NOTproper. While it is all right to help a classmate understand the meaning of a homework question, it is NOT all right to help a classmate generate a solution (or of course for you to obtain help in solving a homework problem). Copying work on an exam from another is also of course improper (as would be the surreptitious use of disallowed information sources during an exam).
Improper collaboration or other forms of cheating will result in unpleasant interviews with a dean, followed by punishment that can go as far as expulsion from the university.
Reading the relevant parts of the text and doing the homework is essential in order to understand the subject matter of the course. But everything will be much harder if you skip lectures. Asking questions at lectures, making comments, and hearing the questions and comments of classmates, along with the responses, deepens your understanding and gets you past difficult points much more easily. Students who skip lectures soon start to fall behind and then have difficulty in catching up, because of the connections between the topics. Examples used in the lectures are generally different from those in the text, and often explanations given in class are more detailed. Material not in the text is sometimes introduced in lectures (but also note that not everything in the text is included in lectures.)
CORRECT VERSION OF PROGRAM ILLUSTRATING USE OF INDEXING (4/29/99 class)
sll $r4, $r4, 2 #set $r4 to 4k addi $t4, $0, 0 #initialize $t4 at 0 LOOP: lwr $t2, $r2, $t4 lwr $t3, $r3, $t4 add $t1, $t2, $t3 swr $t1, $r1, $t4 addi $t4, $t4, 4 bne $t4, $r4, LOOP
EXAMPLE 1: Procedure for counting the characters in a string terminated by the null character. $a0 is pointer to the start of the string. Answer to be put in $v0 make $t0 a moving pointer accumulate the count in $v0
#This version assumes the string MAY be empty COUNT: addi $t0, $a0, -1 #set pointer to point to left of start addi $v0, $0, -1 #initialize count at -1 LOOP: addi $t0, $t0, 1 #increment pointer addi $v0, $v0, 1 #increment count lbu $t1, 0($v0) #put character in $t1 bne $t1, $0, LOOP #test for null jr $ra #return, with answer in $v0
DIVISION: The MIPS instruction div $x, $y puts the quotient $x/$y in special register lo and the remainder in special register hi. These are accessible via instructions mflo $d, mfhi $d (also mtlo and mthi).
EXAMPLE 2: Procedure for converting a number to a string of ASCII numerals. Given a number in $a0, BINDEC is to put, in a block of memory terminated by the address in $a1, a sequence of ASCII numerals corresponding to that number. e.g., if contents of $a0 is 15, then BINDIC produces a string of ASCII characters: 1,5,NULL, pointed to by $v0. Assume that $a1 initially points to the last address of a block of bytes big enough to store the result.
BINDEC: addi $t0, $0, 10 #put a 10 in $t0 addi $t1, $0, 48 #put prefix of ASCII numeral in $t1 addi $v0, $a1, 0 #copy string pointer to $v0 sb $0, 0($v0) #put the null character at the end. bne $a0, $0, NZ #check if number is 0 addi $v0, $v0, -1 #move pointer to left sb $t1, 0($v0) #put ascii 0 at front of string jr $ra #return NZ: addi $t2, $a0, 0 #put the number in $t2 LOOP: addi $v0, $v0, -1 #move pointer to left div $t2, $t0 #divide by 10, remainder is in hi mfhi $t3 #put remainder in $t3 add $t3, $t3, $t1 #make remainder an ASCII numeral sb $t3, 0($v0) #put this numeral at front of string mflo $t2 #put quotient in $t2 bne $t2, $0, LOOP #check if nothing left jr $ra #return with pointer to string in $v0Return to Top