Quiz submission record for quiz2-2-1 at Tue Jun 29 17:47:00 2004: Your Answer for Question 1: It does not need them all because some statements are just specializations of others. In terms of loops, for loops and do while loops could all be written as while loops. Also, you could use if statements and gotos to accomplish any tasks that utilize loops (Using loops to replace if statements does not work out to be very nice, and gotos cannot be replaced by any other statement). Therefore, C could drop all of its loops and accomplish the same tasks with if and goto. However, I think that the designers of C chose to include the loops because the situations in which they come up are so frequent that it is useful to have an easy way to program such situations. Having a unique loop statement makes it more apparent when a loop is being used, and having for/while/do while also helps make it clear in what situation a loop is needed. Basically, they were included for ease of programming (since loops are often needed) and for ease of understanding. Your Answer for Question 2: C has if, >, <, >=, <=, ==, !=, !, &&, ||, and ?:, as well as more that I probably cannot think of. However, MIPS on the other hand only has slt (set on less than), beq (branch if equal), and bne (branch if not equal) to make decisions. Since the designers of MIPS were working to make a language that was simple so the hardware could be simple, they probably restricted the number of instructions to make the hardware simpler, especially since all of the other statements that C uses can be written with these three instructions, and the j(ump) instruction. Your Answer for Question 3: One thing that is a bit confusing is in the end of the section summary. For jump, it said that the instruction j 2500 is go to 10000. Does it mean that when using jump, the target address is actually the nth word? Because this does not seem to be the case with load/store word because in that case, in order to access things are a specific array index, we multiply the index by four. Your unique submission ID is quiz2-2-1-cs61c-el-1088556420-144.