Principle of Microcomputer(Huazhong University of Science and Technology)1458224164 中国大学MOOC答案100分完整版

础欢柔赴拣赐起翰桶邢浪澎仆

Chapter 1 Computer Basics

quiz for chapter 1

1、单选题:
‍What is the name of a set of signal lines in a computer system responsible for transmitting data storage locations?‏

A: Data bus
B: Address bus
C: Control bus
D: Status bus
答案:  Address bus

2、单选题:
‎What is the name of a set of signal lines that play a management and control role in the transmission and exchange of data in computer systems?​

A: Data bus
B: Address bus
C: Control bus
D: Status bus
答案:  Control bus

3、单选题:
‌What does computer instructions refer to?‎

A: A sequence of commands to achieve a given task
B: Collection of all commands of a computer
C: Commands that the computer can recognize and execute
D: High-level programming language statements
答案:  Commands that the computer can recognize and execute

4、单选题:
‏What does computer program mean?​

A: Command sequence to achieve a given task
B: Collection of all commands of a computer
C: Commands that the computer can recognize and execute
D: High-level programming language statements
答案:  Command sequence to achieve a given task

5、单选题:
‏What is the code of instructions in the computer?‌

A: ASCII code
B: binary code
C: Hexadecimal code
D: Decimal code
答案:  binary code

6、单选题:
‎Which component in the computer is used to pre-store instruction and data in order to make the program run automatically?‍

A: CPU
B: Memory
C: IO interface
D: IO device
答案:  Memory

7、单选题:
‏The process of computer instructions’ execution generally includes the following steps 1: instruction decoding 2: performing operations 3: accessing data memory 4: storing results 5: reading instructions, which of the following is the correct order of the process?​

A: 1-2-3-4-5
B: 2-3-4-5-1
C: 5-1-2-3-4
D: 5-2-1-3-4
答案:  5-1-2-3-4

8、单选题:
‌Which of the following is the binary number of the decimal number 3.25?‎

A: 11.01
B: 10.11
C: 11.001
D: 10.101
答案:  11.01

9、单选题:
‎Which of the following is the hexadecimal number of the decimal number 105.25?‍

A: Principle of Microcomputer(Huazhong University of Science and Technology)1458224164 中国大学MOOC答案100分完整版第1张
B: Principle of Microcomputer(Huazhong University of Science and Technology)1458224164 中国大学MOOC答案100分完整版第2张
C: Principle of Microcomputer(Huazhong University of Science and Technology)1458224164 中国大学MOOC答案100分完整版第3张
D: Principle of Microcomputer(Huazhong University of Science and Technology)1458224164 中国大学MOOC答案100分完整版第4张
答案:  Principle of Microcomputer(Huazhong University of Science and Technology)1458224164 中国大学MOOC答案100分完整版第1张

10、单选题:
​What is the bit width of a byte in a computer?‌

A: 4
B: 8
C: 12
D: 16
答案:  8

11、单选题:
​How many bits of a halfword are defined in a 32-bit MIPS computer system?‎

A: 16
B: 32
C: 64
D: 8
答案:  16

12、单选题:
‍What code is used for signed integer numbers’ representation in modern computers?‏

A: original code
B: 1’s complement
C: 2’s complement
D: BCD code
答案:  2’s complement

13、单选题:

It is known that a computer system stores data in memory in little endianness. If half word data Principle of Microcomputer(Huazhong University of Science and Technology)1458224164 中国大学MOOC答案100分完整版第6张 is stored in the memory at address Principle of Microcomputer(Huazhong University of Science and Technology)1458224164 中国大学MOOC答案100分完整版第7张, what is the data stored in the storage unit at address Principle of Microcomputer(Huazhong University of Science and Technology)1458224164 中国大学MOOC答案100分完整版第8张?


A: Principle of Microcomputer(Huazhong University of Science and Technology)1458224164 中国大学MOOC答案100分完整版第9张
B: Principle of Microcomputer(Huazhong University of Science and Technology)1458224164 中国大学MOOC答案100分完整版第10张
C: Principle of Microcomputer(Huazhong University of Science and Technology)1458224164 中国大学MOOC答案100分完整版第11张
D: Principle of Microcomputer(Huazhong University of Science and Technology)1458224164 中国大学MOOC答案100分完整版第12张
答案:  Principle of Microcomputer(Huazhong University of Science and Technology)1458224164 中国大学MOOC答案100分完整版第9张

14、单选题:

It is known that a computer system stores data in memory in little-endian order. If word data Principle of Microcomputer(Huazhong University of Science and Technology)1458224164 中国大学MOOC答案100分完整版第14张 is stored in the memory at address Principle of Microcomputer(Huazhong University of Science and Technology)1458224164 中国大学MOOC答案100分完整版第15张, what is the data stored in the memory unit at address Principle of Microcomputer(Huazhong University of Science and Technology)1458224164 中国大学MOOC答案100分完整版第16张 is


A: Principle of Microcomputer(Huazhong University of Science and Technology)1458224164 中国大学MOOC答案100分完整版第17张
B: Principle of Microcomputer(Huazhong University of Science and Technology)1458224164 中国大学MOOC答案100分完整版第18张
C: Principle of Microcomputer(Huazhong University of Science and Technology)1458224164 中国大学MOOC答案100分完整版第19张
D: Principle of Microcomputer(Huazhong University of Science and Technology)1458224164 中国大学MOOC答案100分完整版第20张
答案:  Principle of Microcomputer(Huazhong University of Science and Technology)1458224164 中国大学MOOC答案100分完整版第20张

15、单选题:

It is known that a computer system stores data in memory in big endianess. If the word data Principle of Microcomputer(Huazhong University of Science and Technology)1458224164 中国大学MOOC答案100分完整版第22张 is stored in the memory with the addressPrinciple of Microcomputer(Huazhong University of Science and Technology)1458224164 中国大学MOOC答案100分完整版第23张 , what is the data stored in the memory unit with the addressPrinciple of Microcomputer(Huazhong University of Science and Technology)1458224164 中国大学MOOC答案100分完整版第23张?


A: Principle of Microcomputer(Huazhong University of Science and Technology)1458224164 中国大学MOOC答案100分完整版第25张
B: Principle of Microcomputer(Huazhong University of Science and Technology)1458224164 中国大学MOOC答案100分完整版第26张
C: Principle of Microcomputer(Huazhong University of Science and Technology)1458224164 中国大学MOOC答案100分完整版第27张
D: Principle of Microcomputer(Huazhong University of Science and Technology)1458224164 中国大学MOOC答案100分完整版第28张
答案:  Principle of Microcomputer(Huazhong University of Science and Technology)1458224164 中国大学MOOC答案100分完整版第28张

16、单选题:
‍What is the range of values that can be represented by n bits 2’s complement numbers?‌

A: Principle of Microcomputer(Huazhong University of Science and Technology)1458224164 中国大学MOOC答案100分完整版第30张~Principle of Microcomputer(Huazhong University of Science and Technology)1458224164 中国大学MOOC答案100分完整版第31张
B: Principle of Microcomputer(Huazhong University of Science and Technology)1458224164 中国大学MOOC答案100分完整版第31张~Principle of Microcomputer(Huazhong University of Science and Technology)1458224164 中国大学MOOC答案100分完整版第31张-1
C: Principle of Microcomputer(Huazhong University of Science and Technology)1458224164 中国大学MOOC答案100分完整版第30张~Principle of Microcomputer(Huazhong University of Science and Technology)1458224164 中国大学MOOC答案100分完整版第31张-1
D: Principle of Microcomputer(Huazhong University of Science and Technology)1458224164 中国大学MOOC答案100分完整版第30张-1~Principle of Microcomputer(Huazhong University of Science and Technology)1458224164 中国大学MOOC答案100分完整版第31张
答案:  Principle of Microcomputer(Huazhong University of Science and Technology)1458224164 中国大学MOOC答案100分完整版第31张~Principle of Microcomputer(Huazhong University of Science and Technology)1458224164 中国大学MOOC答案100分完整版第31张-1

17、单选题:
‎Which of the following byte type data calculation does not overflow?‍

A: Principle of Microcomputer(Huazhong University of Science and Technology)1458224164 中国大学MOOC答案100分完整版第40张 +Principle of Microcomputer(Huazhong University of Science and Technology)1458224164 中国大学MOOC答案100分完整版第41张
B: 89+64
C: -64-89
D: Principle of Microcomputer(Huazhong University of Science and Technology)1458224164 中国大学MOOC答案100分完整版第41张Principle of Microcomputer(Huazhong University of Science and Technology)1458224164 中国大学MOOC答案100分完整版第40张
答案:  Principle of Microcomputer(Huazhong University of Science and Technology)1458224164 中国大学MOOC答案100分完整版第40张 +Principle of Microcomputer(Huazhong University of Science and Technology)1458224164 中国大学MOOC答案100分完整版第41张

18、单选题:
‎What is the bit width of char type data in C language?‏

A: 8
B: 16
C: 32
D: 64
答案:  8

19、单选题:
‌What is the bit width of short type data in C language for 32-bit computer?‍

A: 8
B: 16
C: 32
D: 64
答案:  16

20、单选题:
‎It is known that the data in address 2000 to 2003 are 2, 3, 6, 0, respectively. If a 32-bit computer system uses little-endian mode to manage this memory, what is the int type data that the CPU fetches from address 2000?‎

A: 556
B: 236
C: 632
D: 393986
答案:  393986

21、单选题:
‍It is known that the data in address 2000 to 2003 are 2, 3, 6, 0, respectively. If a 32-bit computer system uses little-endian mode to manage this memory, what is the short type data that the CPU fetches from address 2002?​

A: 556
B: 770
C: 632
D: 393986
答案:  770

22、多选题:
‍Which of the following modules are included in the computer hardware system?‍

A: Microprocessor
B: Memory
C: Input and output devices
D: Bus
答案:  Microprocessor;
Memory;
Input and output devices;
Bus

23、多选题:
​What are the basic components of the central processing unit CPU?‌

A: Arithmetic Logic Unit ALU
B: Controller
C: Registers
D: System bus
答案:  Arithmetic Logic Unit ALU;
Controller;
Registers

24、多选题:
‎Which of the following functions are implemented by the controller inside the CPU?‏

A: Arithmetic and logical operations
B: Read instruction
C: Instruction decoding
D: Send out control signals
答案:  Read instruction;
Instruction decoding;
Send out control signals

25、多选题:
‌What are the main functions of the CPU internal registers?​

A: Store operands
B: Store intermediate results
C: Store operation result flag
D: Implement logical operations
答案:  Store operands;
Store intermediate results;
Store operation result flag

26、多选题:
​Which of the following types of signals does the data bus transmit?‍

A: Data in memory
B: Instructions in memory
C: Data of IO devices
D: Status of IO devices
答案:  Data in memory;
Instructions in memory;
Data of IO devices;
Status of IO devices

27、多选题:
‎What are the main functions of IO interfaces?‌

A: buffering data
B: information format conversion
C: report the status of IO devices to CPU
D: deliver the command of CPU to IO devices
答案:  buffering data;
information format conversion;
report the status of IO devices to CPU;
deliver the command of CPU to IO devices

28、多选题:
‍What bit width data can be processed by 32-bit computer via one instruction?‍

A: 8
B: 9
C: 16
D: 32
答案:  8;
16;
32

29、多选题:
‏Which of the following different types of 2’s complement numbers represent the true value -8?‍

A: Principle of Microcomputer(Huazhong University of Science and Technology)1458224164 中国大学MOOC答案100分完整版第46张 in byte
B: Principle of Microcomputer(Huazhong University of Science and Technology)1458224164 中国大学MOOC答案100分完整版第47张 in half word
C: Principle of Microcomputer(Huazhong University of Science and Technology)1458224164 中国大学MOOC答案100分完整版第48张 in word
D: Principle of Microcomputer(Huazhong University of Science and Technology)1458224164 中国大学MOOC答案100分完整版第49张 in byte
答案:  Principle of Microcomputer(Huazhong University of Science and Technology)1458224164 中国大学MOOC答案100分完整版第46张 in byte;
Principle of Microcomputer(Huazhong University of Science and Technology)1458224164 中国大学MOOC答案100分完整版第47张 in half word;
Principle of Microcomputer(Huazhong University of Science and Technology)1458224164 中国大学MOOC答案100分完整版第48张 in word

30、多选题:
‎Which of the following different types of 2’s complement numbers represent the true value -128?‏

A: Principle of Microcomputer(Huazhong University of Science and Technology)1458224164 中国大学MOOC答案100分完整版第53张 in byte
B: Principle of Microcomputer(Huazhong University of Science and Technology)1458224164 中国大学MOOC答案100分完整版第54张 in half word
C: Principle of Microcomputer(Huazhong University of Science and Technology)1458224164 中国大学MOOC答案100分完整版第55张 in word
D: Principle of Microcomputer(Huazhong University of Science and Technology)1458224164 中国大学MOOC答案100分完整版第56张 in half word
答案:  Principle of Microcomputer(Huazhong University of Science and Technology)1458224164 中国大学MOOC答案100分完整版第53张 in byte;
Principle of Microcomputer(Huazhong University of Science and Technology)1458224164 中国大学MOOC答案100分完整版第54张 in half word;
Principle of Microcomputer(Huazhong University of Science and Technology)1458224164 中国大学MOOC答案100分完整版第55张 in word

Chapter 2 Assembly Language

quiz for chapter 2

1、单选题:
‎What is the meaning of the label before assembly instructions?‍

A: Variable address
B: Instruction address
C: the function of the instruction
D: Object of the instruction
答案:  Instruction address

2、单选题:
‌Which of the following parts of the assembly instruction indicates what operation the instruction performs​

A: label
B: opcode
C: operand
D: comments
答案:  opcode

3、单选题:
‎Which of the follow symbols is used to mark the beginning of comments in MIPS assembly language?‍

A: #
B: $
C: //
D: /*
答案:  #

4、单选题:
‍Which operand is the destination operand in the MIPS assembly language instruction“add a, b, c” ?‏

A: a
B: b
C: c
D: whatever
答案:  a

5、单选题:
​When translating the C language statement “a = (c + b)-(d + e) ;” into MIPS assembly instructions, how many assembly instructions should be used at least?‎

A: 1
B: 2
C: 3
D: 4
答案:  3

6、单选题:
‍Which of the following registers in the MIPS microprocessor has a constant value of 0?‎

A: $zero
B: $t0
C: $a0
D: $v0
答案:  $zero

7、单选题:
‍Which of the following types of MIPS assembly instructions has only  two operands?‍

A: Arithmetic instructions
B: Shift instructions
C: Data transfer instructions
D: Unconditional jump instructions
答案:  Data transfer instructions

8、单选题:
‍Which of the following registers in the MIPS microprocessor indicates the top of the stack?‌

A: $sp
B: $pc
C: $gp
D: $v0
答案:  $sp

9、单选题:
‎In a 32-bit computer system, if the starting address of “int max[10];” is A, what is the address of max[2]?‏

A: A
B: A+2
C: A+4
D: A+8
答案:  A+8

10、单选题:
​If it is known that the starting address of “short array[10]” is stored in register $s0 in 32-bit MIPS computer system,  how is the address of array[2] represented in MIPS assembly language instructions?‏

A: 0($s0)
B: 2($s0)
C: 4($s0)
D: 8($s0)
答案:  4($s0)

11、单选题:
​If it is known that a 32-bit computer stores data in little-endian order, and defines “short array[4] = {0,1,12,127};”, and the starting address of the array is A, What is the byte data stored in the address A + 5 ?‎

A: 0
B: 1
C: 2
D: 127
答案:  0

12、单选题:
​In order to improve the memory accessing efficiency, computers often adopt boundary alignment strategy to store data. When a 32-bit computer stores word type data in boundary alignment address, which of the following characteristics does the word type data’s address have?‏

A: It’s an even number
B: It’s an odd number
C: It’s a integer multiple of 4
D: It’s a integer multiple of 8
答案:  It’s a integer multiple of 4

13、单选题:
‎Assume the variables g and h in the following C language program is stored in register $s0,$s1,respectively. and  the short type array A’s starting address is stored in register $s0, which one of the following MIPS assembly instruction sequences implements the C statements “g=h+A[8];”?​

A: lw $t0, 32 ($s2)      add $s0, $s1, $t0
B: lw $t0, 8 ($s2)add $s0, $s1, $t0
C: lw $ t0, 16 ($s2)add $s1, $s0, $t0
D: lw $t0, 16 ($s2)add $s0, $s1, $t0
答案:  lw $t0, 16 ($s2)add $s0, $s1, $t0

14、单选题:
‎How many fields (domains) is the machine instruction of the MIPS R-type instruction divided into?‎

A: 2
B: 4
C: 5
D: 6
答案:  6

15、单选题:
‏Which register is the Rs register of the MIPS R type instruction “add $s0, $s1, $t0”?‏

A: $s0
B: $s1
C: $t0
D: $v0
答案:  $s1

16、单选题:
‌ How many fields (domains) is the machine instruction of the MIPS I type instruction divided into? ‌

A: 2
B: 4
C: 5
D: 6
答案:  4

17、单选题:
‌Which type of instruction does the MIPS shift instruction “sll $s1, $s2, 10”belong to? ‍

A: R type
B: I type
C: J type
D: Not sure
答案:  R type

18、单选题:
​What is the hexadecimal representation of Imm field of the machine instruction related to MIPS assembly instruction “addi $t0, $s3, -32”?‏

A: 0x8020
B: 0xff20
C: 0x0020
D: 0xffe0
答案:  0xffe0

19、单选题:
‏Which type does instruction jal belong to?​

A: R type
B: I type
C: J type
D: Not sure
答案:  J type

20、单选题:
‏If the address of the MIPS assembly instruction “ag: j ag” is 0x0000 0008, what is the hexadecimal representation of the machine code’s lower 26 bits in instruction  ”j ag ”?‌

A: 0x0000008
B: 0x0000001
C: 0x0000002
D: 0x0000004
答案:  0x0000002

21、单选题:
​Which register is coded in the Rs field in the MIPS conditional jump instruction “beq $t2, $zero, L2”?‎

A: $t2
B: $zero
C: L2
D: $PC
答案:  $t2

22、单选题:
​If the starting address of the following MIPS assembly instruction sequence is 0x80000,What is the value of the beq instruction’s Imm field represented in hexadecimal?‏​MIPS assembly instruction sequence:‏​loop: sll $s1, $s2, 3‏​addi $s1, $s2, 4‏​beq $s1, $t1, exit‏​j loop‏​exit:‏

A: 0x0000
B: 0xfffd
C: 0x0004
D: 0x0001
答案:  0x0001

23、单选题:
If the starting address of the following MIPS assembly instruction sequence is 0x00400000,What is the value of the j instruction’s lower 26 bits represented in hexadecimal?‍MIPS assembly instruction sequence:‍loop: sll $s1, $s2, 3‍addi $s1, $s2, 4‍beq $s1, $t1, exit‍j loop‍exit:‍‎‍

A: 0x0400000
B: 0x0100000
C: 0x008000
D: 0x0200000
答案:  0x0100000

24、单选题:
‏Which of the following instructions is to load unsigned byte type data from memory to register?​

A: lb
B: lhu
C: lw
D: lbu
答案:  lbu

25、单选题:
‎If it is known that the data stored in each memory unit starting from address 0x80 is 0x80, 0x81,0x82, 0x83, respectively,  the value of register $t0 is 0x80, and After executing the MIPS instruction “lbu $t1, 0 ($t0)”, What is the value of register $t1? ‌

A: 0x80
B: 0x81
C: 0xffffff80
D: 0xffffff81
答案:  0x80

26、单选题:
‎If it is known that the data stored in each memory unit starting from address 0x80 is 0x80, 0x81,0x82, 0x83, respectively,  the value of register $t0 is 0x80, and After executing the MIPS instruction “lb $t1, 0 ($t0)”, What is the value of register $t1? ​

A: 0x80
B: 0x81
C: 0xffffff80
D: 0xffffff81
答案:  0xffffff80

27、单选题:
‏If it is known that the data stored in each memory unit starting from address 0x80 is 0x80, 0x81,0x82, 0x83, respectively,  the value of register $t0 is 0x80, and After executing the MIPS instruction “lh $t1, 0 ($t0)”, What is the value of register $t1? ‎

A: 0x8180
B: 0x8081
C: 0xffff8081
D: 0xffff8180
答案:  0xffff8081

28、单选题:
‍If it is known that the data stored in each memory unit starting from address 0x80 is 0x80, 0x81,0x82, 0x83, respectively,  the value of register $t0 is 0x80, and After executing the MIPS instruction “lw $t1, 0 ($t0)”, What is the value of register $t1? ​

A: 0x80818283
B: 0x83828180
C: 0x80838281
D: 0x83828081
答案:  0x80818283

29、单选题:
​Which of the following MIPS assembly instructions is used to push the value of register $s0 onto the top of the stack?​

A: addi $ sp, $ sp, -12 sw $ s0,8 ($ sp)
B: addi $ sp, $ sp, -12 sw $ s0,4 ($ sp)
C: addi $ sp, $ sp, -12 sw $ s0,0 ($ sp)
D: addi $ sp, $ sp, -12 sw $ s0,12 ($ sp)
答案:  addi $ sp, $ sp, -12 sw $ s0,0 ($ sp)

30、单选题:
‌Which of the following MIPS assembly instructions pops the value of the top of the stack to the register $s0?‌

A: addi $ sp, $ sp, -4 lw $ s0,0 ($ sp)
B: addi $ sp, $ sp, 4 lw $ s0,0 ($ sp)
C: lw $ s0,0 ($ sp) addi $ sp, $ sp, 4
D: lw $ s0,0 ($ sp) addi $ sp, $ sp, -4
答案:  lw $ s0,0 ($ sp) addi $ sp, $ sp, 4

31、单选题:
‏How many memory unit will be allocated by MIPS assembly pseudo-instructions”b0: . byte 1,2,3,4” ?‍

A: 1
B: 2
C: 3
D: 4
答案:  4

32、单选题:
‍How many memory unit will be allocated by MIPS assembly pseudo-instructions”b0: . half 1,2,3,4” ?‎

A: 1
B: 2
C: 4
D: 8
答案:  8

33、单选题:
‍If the address of h0 in the MIPS assembly pseudo-instruction ”h0: .Half 1,2,3,4” is 0x2000, what is byte type data in the memory address 0x2003?‏

A: 0x0
B: 0x1
C: 0x2
D: 0x3
答案:  0x0

34、单选题:
‎How many memeory unit is allocated for MIPS assembly pseudo-instruction “. asciiz “abcd” “?‎

A: 1
B: 4
C: 5
D: 6
答案:  5

35、单选题:
​Which of the following MIPS assembly directives is used to define a data segment ?‌

A: .align
B: .word
C: .data
D: .text
答案:  .data

36、单选题:
‎The data segment defined by the MIPS assembly directives is as follows. What is the address indicated by the variable h0 and how many memory units are occupied by this data segment?‍‎.data 0x10010001‍‎.align 2‍‎str: .ascii “abcd”‍‎strn: .asciiz “abcdefg”‍‎b0: .byte 1,2,3,4,5‍‎h0: .half 1,2,3,4‍‎w0: .word 1,2,3,4‍

A: 0x10010016,47
B: 0x10010015,47
C: 0x10010012,44
D: 0x10010016,48
答案:  0x10010016,47

37、多选题:
‎Which of the following are the characteristics of assembly language ?‎

A: Closely related to computer hardware
B: It is not easy to be identified, but it can be directly executed by a computer.
C: Good independence, versatility and portability
D: Use mnemonics and address symbols to represent instructions
答案:  Closely related to computer hardware;
It is not easy to be identified, but it can be directly executed by a computer.;
Use mnemonics and address symbols to represent instructions

38、多选题:
‎Which of the following are the features of  a complex instruction set computer?‌

A: Instruction word length is not fixed
B: Many addressing modes
C: No instruction restrictions on memory access
D: Multiple instruction formats
答案:  Instruction word length is not fixed;
Many addressing modes;
No instruction restrictions on memory access;
Multiple instruction formats

39、多选题:
‌which of the following can the assembly instructions include?‍

A: label
B: opcode
C: operand
D: comments
答案:  label;
opcode;
operand;
comments

40、多选题:
‍What are the type of MIPS assembly instructions?​

A: R
B: I
C: J
D: A
答案:  R;
I;
J

41、多选题:
‍What are the operand addressing modes supported by the MIPS instruction?​

A: Immediate Addressing
B: Register Addressing
C: Base addressing
D: Direct Addressing
答案:  Immediate Addressing;
Register Addressing;
Base addressing

42、多选题:
‌What are the instruction addressing modes supported by the MIPS instruction?‌

A: PC Relative Addressing
B: Register Indirect Addressing
C: Base addressing
D: Pseudo-direct addressing
答案:  PC Relative Addressing;
Register Indirect Addressing;
Pseudo-direct addressing

43、多选题:
‎which of the following registers are used to store the result of the MIPS multiplication and division operation?‌

A: hi
B: lo
C: $v0
D: $v1
答案:  hi;
lo

44、多选题:
‌which of the following registers is used by the MIPS C compiler to hold the parameters passed from the main program to the subroutine?‌

A: $a0
B: $v0
C: $v1
D: $a1
答案:  $a0;
$a1

45、多选题:
‌Which MIPS assembly instruction segments implement the following C language statement functions, assuming that the variables i, j, f, g, h correspond to the registers $ s0, $ s1, $ s2, $ s3, $ s4?​if (i==j)​       f=g+h;​‌       else f=g-h;​

A: bne $s0, $s1,elseadd $s2,$s3,$s4j exit       else:       sub $s2,$s3,$s4exit
B: beq $s0, $s1,elsesub $s2,$s3,$s4j exit       else:       add $s2,$s3,$s4exit:
C: beq $s0, $s1,elsesub $s2,$s3,$s4else:       add $s2,$s3,$s4exit
D: bne $s0, $s1,elseadd $s2,$s3,$s4else:       sub $s2,$s3,$s4exit
答案:  bne $s0, $s1,elseadd $s2,$s3,$s4j exit       else:       sub $s2,$s3,$s4exit;
beq $s0, $s1,elsesub $s2,$s3,$s4j exit       else:       add $s2,$s3,$s4exit:

46、多选题:
‌It is known that the variables i and k correspond to the registers $ s0 and $ s2, and the initial value of i is 0, save is a word array, and the first address is stored in the register $ s3. Which of the following program blocks implement the following C language program blocks?‎‌while (save[i]==k)‎i+=1;‎

A: loop: sll $t1,$s0,2      add $t1,$t1,$s3      lw $t0,0($t1)      bne $t0,$s2,exit      addi $s0,$s0,1      j loop exit:
B: loop:      add $t1,$s0,$s3      lw $t0,0($t1)      bne $t0,$s2,exit      addi $s0,$s0,1      j loop exit:
C: loop:      add $t1,$s0,$s3      lw $t0,0($t1)      bne $t0,$s2,exit      addi $s0,$s0,4      j loop exit:
D: loop: sll $t1,$s0,2      add $t1,$t1,$s3      lw $t0,0($t1)      bne $t0,$s2,exit      addi $s0,$s0,1      j loop exit:
答案:  loop: sll $t1,$s0,2      add $t1,$t1,$s3      lw $t0,0($t1)      bne $t0,$s2,exit      addi $s0,$s0,1      j loop exit:;
loop:      add $t1,$s0,$s3      lw $t0,0($t1)      bne $t0,$s2,exit      addi $s0,$s0,4      j loop exit:

47、多选题:
‍If the variables i, j, f, g, and h correspond to the registers $ s0, $ s1, $ s2, $ s3, and $ s4, which of the following MIPS assembly language instructions implement the following C language statement function?‏‍if(i<j)‏‍    f=g+h;‏‍else f=g-h;‏

A: slt $t0,$s0,$s1beq $t0,$zero,elseadd $s2,$s3,$s4j exit else: sub $s2,$s3,$s4exit:
B: slt $t0,$s0,$s1bne $t0,$zero,elsesub $s2,$s3,$s4j exit else: add $s2,$s3,$s4exit:
C: slt $t0,$s1,$s0beq $t0,$zero,elsesub $s2,$s3,$s4j exit else: add $s2,$s3,$s4exit:
D: slt $t0,$s1,$s0bne $t0,$zero,elseadd $s2,$s3,$s4j exit else: sub $s2,$s3,$s4exit:
答案:  slt $t0,$s0,$s1beq $t0,$zero,elseadd $s2,$s3,$s4j exit else: sub $s2,$s3,$s4exit:;
slt $t0,$s0,$



上方为免费预览版答案,如需购买完整答案,请点击下方红字:



点击这里,购买完整版答案


为了方便下次阅读,建议在浏览器添加书签收藏本网页

添加书签方法:

1.电脑按键盘的Ctrl键+D键即可收藏本网页

2.手机浏览器可以添加书签收藏本网页

点击浏览器底部菜单-【添加书签】-收藏本网页

Principle of Microcomputer(Huazhong University of Science and Technology)1458224164 中国大学MOOC答案100分完整版第60张

点击浏览器底部菜单-【书签/历史】-可查看本网页

Principle of Microcomputer(Huazhong University of Science and Technology)1458224164 中国大学MOOC答案100分完整版第61张


获取更多慕课答案,欢迎在浏览器访问我们的网站:



http://mooc.mengmianren.com

Principle of Microcomputer(Huazhong University of Science and Technology)1458224164 中国大学MOOC答案100分完整版第62张

Principle of Microcomputer(Huazhong University of Science and Technology)1458224164 中国大学MOOC答案100分完整版第63张

注:请切换至英文输入法输入域名,如果没有成功进入网站,请输入完整域名:http://mooc.mengmianren.com/


我们的公众号

打开手机微信,扫一扫下方二维码,关注微信公众号:萌面人APP

本公众号可查看各种网课答案,还可免费查看大学教材答案

点击这里,可查看公众号功能介绍

Principle of Microcomputer(Huazhong University of Science and Technology)1458224164 中国大学MOOC答案100分完整版第64张




APP下载



点击这里下载萌面人APP,使用更方便!




APP功能说明

1.可查看各种网课答案

点击【萌面人官网】,可查看知到智慧树,超星尔雅学习通,学堂在线等网课答案

Principle of Microcomputer(Huazhong University of Science and Technology)1458224164 中国大学MOOC答案100分完整版第65张

点击【中国大学慕课答案】,可查看mooc慕课答案

Principle of Microcomputer(Huazhong University of Science and Technology)1458224164 中国大学MOOC答案100分完整版第66张

2.可一键领取淘宝/天猫/京东/拼多多无门槛优惠券

如图所示,点击对应图标即可领取淘宝/天猫/京东/拼多多无门槛优惠券

Principle of Microcomputer(Huazhong University of Science and Technology)1458224164 中国大学MOOC答案100分完整版第67张


龋收法皋日拎勿娠卑坍点夕菏