下面MIPS指令中,错误的是( )
A: addu $t0, $t1, $t2
B: addu $8, $9, $10
C: add $t0, $t1, 12($t3)
D: addi $t0, $t1, 10
A: addu $t0, $t1, $t2
B: addu $8, $9, $10
C: add $t0, $t1, 12($t3)
D: addi $t0, $t1, 10
C
举一反三
- 14. 将如下MIPS R4000汇编语言翻译成机器语言指令。 lw $t0,1200($t1) add $t0,$s2,$t0 sw $t0,1200($t1)
- Assume $t1=0x12345678,$t0=87654321, after executing instruction "add $t2, $t1, $t0" and "addu $t3,$t1,$t0",the values of $t2 and $t3 are same.
- 已知向量=(2,t),=(1,2),若t=t1时,∥;t=t2时,⊥,则( ) A: t1=-4,t2=-1 B: t1=-4,t2=1 C: t1=4,t2=-1 D: t1=4,t2=1
- 下列程序段 A 与 B 功能等价,请填写程序段 B 中相应语句。 程序段A: int f( int n ) { if(n<=1) return n; else return f(n-1)+f(n-2); } 程序B: int f( int n )______; t0=0; t1=1; t=n; while ( n>1 ) { t = t0+t1 ; t0 = t1; t1 = t; n - -; } return t ; }
- TranslatethefollowingMIPScodetoC.Assumethatthevariablesf,g,h,i,andjareassignedtoregisters$s0,$s1,$s2,$s3,and$s4,respectively.AssumethatthebaseaddressofthearraysAandBareinregisters$s6and$s7,respectively.addi$t0,$s6,4add$t1,$s6,$0sw$t1,0($t0)lw$t0,0($t0)add$s0,$t1,$t0
内容
- 0
已知T(1)=9,T(2)=8,T(0)=5,Total=T(1)+T(2)+T(0),则Total=()。
- 1
已知T(1)=9,T(2)=8,T(0)=5,Total=T(1)+T(2)+T(0),则Total=()。 A: 9 B: 22 C: 8 D: 5
- 2
元素交换是冒泡排序的基本操作,对a数组int a[10]={3,5,7,9,8,4,21,10,6,15},t;要求将数组的首尾元素交换,以下正确的交换方式是________。 A: a[0]=a[9],a[9]=a[0]; B: t=a[1],a[1]=a[10],a[10]=t; C: t=a[10],a[10]=a[1],a[1]=t; D: t=a[0],a[0]=a[9],a[9]=t;
- 3
若元组T=(2,4,6,8),下列表达式运算结果不为10的是________。 A: T[0]+T[3] B: T[-1]+T[-4] C: T[1]+T[2] D: T[-1]+T[-3]
- 4
经过以下代码,t的结果是 t1=(1, 'a')[br][/br] t2=(2, 'b') t = t1 + t2 A: (3,'ab') B: ((1,'a'),(2,'b')) C: (1,'a',2,'b') D: (3,'a','b')