

Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
Community
Ask the community for help and clear up your study doubts
Discover the best universities in your country according to Docsity users
Free resources
Download our free guides on studying techniques, anxiety management strategies, and thesis advice from Docsity tutors
Material Type: Assignment; Class: 0306 - Computer Organization; Subject: Computer Engineering; University: Rochester Institute of Technology; Term: Unknown 2009;
Typology: Assignments
1 / 2
This page cannot be seen from the preview
Don't miss anything!
31 j i^0
31 – j bits i – j bits i+1 bits
31 0
32 – ( i – j ) bits
i – j bits
sll $a2, $a2, 2 sll $a3, $a3, 2 add $v0, $zero, $zero add $t0, $zero, $zero outer: add $t4, $a0, $t lw $t4, 0($t4) add $t1, $zero, $zero inner: add $t3, $a1, $t lw $t3, 0($t3) bne $t3, $t4, skip addi $v0, $v0, 1 skip: addi $t1, $t1, 4 bne $t1, $a3, inner addi $t0, $t0, 4 bne $t0, $a2, outer
addi $v0, $zero, 0 # Initialize count loop: lw $v1, 0($a0) # Read next word from source sw $v1, 0($a1) # Write to destination addi $a0, $a0, 4 # Advance pointer to next source addi $a1, $a1, 4 # Advance pointer to next destination beq $v1, $zero, loop # Loop if word copied != zero