Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/mysql/65.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Binary 如何将十六进制值转换为32位MIPS指令?_Binary_Hex_Mips - Fatal编程技术网

Binary 如何将十六进制值转换为32位MIPS指令?

Binary 如何将十六进制值转换为32位MIPS指令?,binary,hex,mips,Binary,Hex,Mips,我需要将这些十六进制值转换为MIPS指令: 我首先将它们转换为二进制,但不确定是否有必要 Hex: 0x0000 0000 - Binary: 0000 0000 0000 0000 0000 0000 0000 0000 Hex: 0xAFBF 0000 - Binary: 1010 1111 1011 1111 0000 0000 0000 0000 Hex: 0x3424 001E - Binary: 0011 0100 0010 0100 0000 0000 0000 0000 请解释

我需要将这些十六进制值转换为MIPS指令:

我首先将它们转换为二进制,但不确定是否有必要

Hex: 0x0000 0000 - Binary: 0000 0000 0000 0000 0000 0000 0000 0000
Hex: 0xAFBF 0000 - Binary: 1010 1111 1011 1111 0000 0000 0000 0000
Hex: 0x3424 001E - Binary: 0011 0100 0010 0100 0000 0000 0000 0000
请解释一下这个过程,以便我以后可以做


我有这个

你在找MIPS解除成员吗?这里有一个:


MIPS指令编码非常简单,每个MIPS文档(包括您上面阅读的表单)都对其进行了解释。只需获取操作码字段并确定这是R、I还是J型指令,即可正确获取其余参数。如果操作码为0,则始终为R类型,在这种情况下,请查找函数字段

对于第一条指令
0x00000000

6-bit opcodes = 000000: R type
6-bit funct: 000000 ==> sll
rs, rd, rt = 0
==> sll $0, $0, $0 or nop
opcode: 101011 = 0x2B => sw
第二条指令
0xAFBF0000

6-bit opcodes = 000000: R type
6-bit funct: 000000 ==> sll
rs, rd, rt = 0
==> sll $0, $0, $0 or nop
opcode: 101011 = 0x2B => sw
最后一个
0x3424001E

opcode: 001101 = 0x0D => ori
如果你使用像这样的反汇编程序,你会看到这样的结果

.data:0x00000000    00000000    nop   
.data:0x00000004    afbf0000    sw ra,0(sp)   
.data:0x00000008    3424001e    ori a0,at,0x1e

Stack Overflow设计用于未来需要帮助解决您遇到的相同问题的人,因此为了将来的参考,请在您的问题中至少包含一个半永久性链接,并尽可能描述该链接的重要内容。也仅包括与问题相关的链接。MIPS参考数据表: