Search ...
Results
Subscribe
Step-by-Step Solutions
University Majors
Support Hub
Legal & Support Articles
Contact Us
Login
Share
Search ...
Results
Subscribe
Step-by-Step Solutions
University Majors
Support Hub
Legal & Support Articles
Contact Us
Login
Share
Information Technology
Computer Organization and Design: The Hardware/Software Interface
80 SOLVED PROBLEMS
Question: 3.5.4
Binary Floating-Point Multiplication Let’s try multiplying the numbers 0.5ten and -0.4375ten, using the steps in Figure 3.16. ...
Verified Answer:
In binary, the task is multiplying
1.000_{_...
Question: 3.5.3
Binary Floating-Point Addition Try adding the numbers 0.5ten and -0.4375ten in binary using the algorithm in Figure 3.14. ...
Verified Answer:
Let’s first look at the binary version of the two ...
Question: 2.10.4
Decoding Machine Code What is the assembly language statement corresponding to this machine instruction? 00af8020hex ...
Verified Answer:
The first step in converting hexadecimal to binary...
Question: 2.3.3
Compiling Using Load and Store Assume variable h is associated with register $s2 and the base address of the array A is in $s3. What is the MIPS assembly code for the C assignment statement below? A[12] = h + A[8]; ...
Verified Answer:
Although there is a single operation in the C stat...
Question: 2.10.3
Branching Far Away Given a branch on register $s0 being equal to register $s1, beq $s0, $s1, L1 replace it by a pair of instructions that off ers a much greater branching distance. ...
Verified Answer:
Th ese instructions replace the short-address cond...
Question: 2.10.2
Showing Branch Offset in Machine Language The while loop on pages 92-93 was compiled into this MIPS assembler code: Loop: s11 $t1, $s3, 2 #Temp reg $t1 = 4 * i add $t1, $t1, $s6 #$t1 = address of save[i] 1w $t0, 0($t1) #Temp reg $to = save[i] bne $to, $s5, Exit #go to Exit if save[i] ≠ k addi $s3, ...
Verified Answer:
The assembled instructions and their addresses are...
Question: 2.10.1
Loading a 32-Bit Constant What is the MIPS assembly code to load this 32-bit constant into register $s0? 0000 0000 0011 1101 0000 1001 0000 0000 ...
Verified Answer:
First, we would load the upper 16 bits, which is 6...
Question: 2.9.2
Compiling a String Copy Procedure, Showing How to Use C Strings The procedure strcpy copies string y to string x using the null byte termination convention of C: void strcpy (char x[ ], char y[ ]) { int i; i = 0; while ((x[i] = y[i]) != ‘\0’) /* copy & test byte */i += 1; } What is the MIPS ...
Verified Answer:
Below is the basic MIPS assembly code segment. Ass...
Question: 2.9.1
ASCII versus Binary Numbers We could represent numbers as strings of ASCII digits instead of as integers. How much does storage increase if the number 1 billion is represented in ASCII versus a 32-bit integer? ...
Verified Answer:
One billion is 1,000,000,000, so it would take 10 ...
Question: 2.8.2
Compiling a Recursive C Procedure, Showing Nested Procedure Linking Let’s tackle a recursive procedure that calculates factorial: int fact (int n) { if (n < 1) return (1); else return (n * fact(n – 1));} What is the MIPS assembly code? ...
Verified Answer:
Th e parameter variable n corresponds to the argum...
Loading...
Load More Questions