Re: [理工] [計組] 指令

看板Grad-ProbAsk作者 (KenJcFar)時間14年前 (2011/03/13 17:42), 編輯推噓1(101)
留言2則, 2人參與, 最新討論串3/3 (看更多)
※ 引述《mqazz1 (無法顯示)》之銘言: : $t0 = 0x55555555 : sll $t2, $t0, 4 : andi $t2, $t2, -1 : 請問這題要怎麼算呀? : 答案是0x00005550 : 謝謝 sll $t2,$t0,4 # $t2 = 0101 0101 0101 0101 0101 0101 0101 0000 (B) andi $t2,$t2,-1 # 0101 0101 0101 0101 0101 0101 0101 0000 & 0000 0000 0000 0000 1111 1111 1111 1111 ------------------------------------------ $t2 = 0000 0000 0000 0000 0101 0101 0101 0000 (B) = 0x 0 0 0 0 5 5 5 0 (H) ps. 注意andi的定址格式分別為 6(op) 5(rs) 5(rt) 16(常數) 有錯請指證~ -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 59.126.228.143

03/13 17:47, , 1F
addi是I type記得這個就好
03/13 17:47, 1F

03/13 18:43, , 2F
謝謝!
03/13 18:43, 2F
文章代碼(AID): #1DV969Xl (Grad-ProbAsk)
文章代碼(AID): #1DV969Xl (Grad-ProbAsk)