
Database System Concepts
7th Edition
ISBN: 9780078022159
Author: Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher: McGraw-Hill Education
expand_more
expand_more
format_list_bulleted
Topic Video
Question

Transcribed Image Text:Problem 1. This problem is about operand modes, in particular about memory addressing using
the operand modes described in lecture and the textbook. The following shows the contents of a
portion of the program memory (locations Ox10000 through 0x10040), and certain registers. All
contents are 64-bit quantities.
Address Memory Contents
0x10040
0x10038
0x10030
0x10028
0x10020
0x10018
0x10010
0x10008
0x10000
a. movq (%rdi), %rax
b. movq (%rdi,%rsi), %rax
100
0x10040
200
25
0x10028
0x10020
c. movq 8(%rdi, %rcx, 4) %r8
d. movq -8(%rdi,%rsi), rbx
500
0x10018
2
Register Contents
%rdi
0x10008
%rsi
%rdx
%rcx
For each of the following instructions, say what value ends up in the destination register. Each
instruction starts with the state shown above, i.e., the effects do not accumulate.
0x20
8
4
Expert Solution

This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
This is a popular solution
Trending nowThis is a popular solution!
Step by stepSolved in 4 steps

Knowledge Booster
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.Similar questions
- Consider memory storage of a 32-bit word stored at memory word 34 in a byte addressable memory. (a) What is the byte address of memory word 34? (b) What are the byte addresses that memory word 34 spans? (c) Draw the number 0x3F526372 stored at word 342 in both big-endian and little-endian machines. Clearly label the byte address corresponding to each data byte value.arrow_forward1. Consider memory storage of a 32-bit word stored at memory word 42 in a byte- addressable memory. (a) What is the byte address of memory word 42? (b) What are the byte addresses that memory word 42 spans? (c) Draw the number 0XFF223344 stored at word 42 in both big-endian and little- endian machines. Clearly label the byte address corresponding to each data byte value.arrow_forward1. Consider memory storage of a 32-bit word stored at memory word 34 in a byte- addressable memory. (a) What is the byte address of memory word 34? (b) What are the byte addresses that memory word 34 spans? (c) Draw the number 0×3F526372 stored at word 342 in both big-endian and little-endian machines. Clearly label the byte address corresponding to each data byte value.arrow_forward
- 4. By assuming that 35 is a two digit number, consider memory storage of a 64- bit word stored at memory word 35 in a byte-addressable memory (a) What is the byte address of memory word 35? (b) What are the byte addresses that memory word 35 spans? (c) Draw the number 0XF1234567890ABCDE stored at word 35 in both big-endian and little-endian machines. Clearly label the byte address corresponding to each data byte value.arrow_forwardTranslate the following C code to MIPS assembly, assuming that the variables f, g, h, i, and j correspond to registers $50, $s1, $s2, $s3, and $54 respectively. Also, assume that the base addresses of arrays A and B are contained in $56 and $s7 respectively, and that each element of arrays A and B are 4-byte words: B[8] =A[i] + A[j]; Which of the following MIPS assembly code snippets correctly performs the above operation? sll $t1, $s3, 2; add $t1, $56, $t1; lw $12, 0($t1); sll $t1, $s4, 2; add $11, $s6, St1; lw $13, 0($t1); add $12, $12, $t3; sw $12, 32($s7) sll $t1, $s3, 2; add $11, $s6, $t1; lw $12, 0($t1); sll $t1, $s4, 2; add $11, $s6, $t1; lw $13, 0($t1); add $t4, $12, $t3; sll $15, $t0, 2; add $15, $s7, $15; sw $t4, 32($15) Iw $11,0($s3); Iw $12, 0($s4); add $13, $11, $12; sw $13, 32($s7) sll $t1, $s3, 2; lw $12, 0($t1); sll $t1, $s4, 2; lw $13, 0($t1); add $t4, $t2, $t3; sw $t4, 32($s7)arrow_forwardConsider memory storage of a 64-bit word stored at memory word 32 ina byte-addressable memory(a) What is the byte address of memory word 32?(b) What are the byte addresses that memory word 32 spans?(c) Draw the number 0xF1234567890ABCDE stored at word 32 in both big-endianand little-endian machines. Clearly label the byte address corresponding to eachdata byte value.arrow_forward
- Q2. For the following assume that values A, B, C, D, E, and F reside in memory. Also assume that instruction operation codes are represented in 6 bits, memory addresses are 64 bits, data size is 32 bits and register addresses are 5 bits. a. For each instruction set architecture shown in Figure A.1, how many addresses or names (including both memory and register), appear in each instruction for the code to compute C = A+ B, and what is the total code size? passor TOS Memory (A) Accumulator (C) Registry (D) Re loed oore Figure A.1 Operand locations for four instruction set architecture classes. The arrows indicate whether the oper and is an input or the result of the orithmetic-logical unit ALU operation, or both an input and result Lighter shoes indicate inputs, and the dark shode indicates the result in a top of stack (TOS) register points to the top input operand, which is combined with the operand below. The first operand is removed from the stack, the result takes the place of the…arrow_forwardQ.8. are missing. The assembler generates a relocatable code. All references use direct addressing. Write the values of the location counter (LC) and the contents of the symbol table, and also fill in the missing references in the machine code. (Assume that 3 bytes are allocated for each instruction and WORD pseudo-operation allocates 3 bytes and stores the given number at that byte.) Given the following assembly language program and its equivalent machine language code where some references START LC Machine code INST1 ЗА 00 00 Symbol Table L1: INST2 D1 D5 ?? ?? JZR L1 7B ?? ?? HLT 4C 00 00 D1: WORD 5 00 00 05 ENDarrow_forwardQ.1. A computer uses a memory unit with 1024 K words of 32 bits each (as shown in the figure below). A binary instruction code is stored in one word of memory. The instruction has four parts: an indirect bit, an operation code, a register code part to specify one of 64 registers, and an address part (15). How many bits are there in the operation code, the register code part, and the address part? Draw the instruction word format and indicate the number of bits in each part? How many bits are there in the data and address inputs of the memory?arrow_forward
- By assuming 32 is a two digitnumber, consider memory storage of a 64-bit word stored at memory word 32 ina byte-addressable memory.(a) What is the byte address of memory word 32?(b) What are the byte addresses that memory word 32 spans?(c) Draw the number 0xF1234567890ABCDE stored at word 32 in both big-endianand little-endian machines. Clearly label the byte address corresponding to eachdata byte value.arrow_forwardPlease solve and show all work. For the following C statement, what is the corresponding MIPS assembly code? Assume that the variables f, g, h, i, and j are assigned to registers $s0, $s1, $s2, $s3, and $s4, respectively. Assume that the base address of the arrays A and B are in registers $s6 and $s7, respectively. Assume that the elements of the arrays A and B are 8-byte words: f = (g+i+2) + (h − 8); B[8] = A[i-9] + A[j+8] + 7;arrow_forwardIf random access memory (RAM) and cache memory (both of which are comprised of transistors), then what is the function of cache memory? Do we need several different forms of memory, or can we get by with only one?arrow_forward
arrow_back_ios
SEE MORE QUESTIONS
arrow_forward_ios
Recommended textbooks for you
- Database System ConceptsComputer ScienceISBN:9780078022159Author:Abraham Silberschatz Professor, Henry F. Korth, S. SudarshanPublisher:McGraw-Hill EducationStarting Out with Python (4th Edition)Computer ScienceISBN:9780134444321Author:Tony GaddisPublisher:PEARSONDigital Fundamentals (11th Edition)Computer ScienceISBN:9780132737968Author:Thomas L. FloydPublisher:PEARSON
- C How to Program (8th Edition)Computer ScienceISBN:9780133976892Author:Paul J. Deitel, Harvey DeitelPublisher:PEARSONDatabase Systems: Design, Implementation, & Manag...Computer ScienceISBN:9781337627900Author:Carlos Coronel, Steven MorrisPublisher:Cengage LearningProgrammable Logic ControllersComputer ScienceISBN:9780073373843Author:Frank D. PetruzellaPublisher:McGraw-Hill Education

Database System Concepts
Computer Science
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:McGraw-Hill Education

Starting Out with Python (4th Edition)
Computer Science
ISBN:9780134444321
Author:Tony Gaddis
Publisher:PEARSON

Digital Fundamentals (11th Edition)
Computer Science
ISBN:9780132737968
Author:Thomas L. Floyd
Publisher:PEARSON

C How to Program (8th Edition)
Computer Science
ISBN:9780133976892
Author:Paul J. Deitel, Harvey Deitel
Publisher:PEARSON

Database Systems: Design, Implementation, & Manag...
Computer Science
ISBN:9781337627900
Author:Carlos Coronel, Steven Morris
Publisher:Cengage Learning

Programmable Logic Controllers
Computer Science
ISBN:9780073373843
Author:Frank D. Petruzella
Publisher:McGraw-Hill Education