Concept explainers
(Asterisked problems are associated with optional sections.)
3. Rework Problem 2 assuming column major order rather than row major order 2 Suppose an array with six rows and eight columns is stored in row major order starting at address 20 (base ten). If each entry in the array requires only one memory cell, what is the address of the entry in the third row and fourth column? What it each entry requires two memory cells?
Want to see the full answer?
Check out a sample textbook solutionChapter 8 Solutions
Computer Science: An Overview (12th Edition)
Additional Engineering Textbook Solutions
C Programming Language
Introduction To Programming Using Visual Basic (11th Edition)
Concepts of Programming Languages (11th Edition)
Java: An Introduction to Problem Solving and Programming (8th Edition)
Web Development and Design Foundations with HTML5 (8th Edition)
Starting Out with Java: Early Objects (6th Edition)
- How is an array stored in main memory? How is a linked list stored in main memory? What are their comparative advantages and disadvantages? Give examples of data that would be best stored as an array and as a linked list.arrow_forwardExplain the meaning of a pointer variable. For what reason is it being done? If you could explain what a dynamic array is and how it operates, would you? So, how do pointers relate to a dynamic array?arrow_forwardLet's assume that we have an array with 6 members. The members are 10H,20,17H,77H,30H,77 in sequantial order.The offset address of the array is loaded into BX register.In sequencial order, MOV AL,[BX+3], MOV AH,23H , ADD AL,AH commands are executed. What are numbers in AL and AH registers? Select one: a. AL=100h, AH=33H b. AL=100, AH=23H c. AL=9AH, AH=23 d. AL=9AH, AH=23H e. AL=A9H, AH=23arrow_forward
- Consider the following list: L = 387, 690, 234, 435, 567, 123, 441. The number of components n = 7, the number of numbers l = 3, and the radix r = 10 are used here. This indicates that radix sort would require 10 bins and would arrange in three passes. demonstrates the radix sort passes over the array. It is believed that each key is tossed face down into the bin. When the keys are gathered in order from each bin at the conclusion of each run, the list of keys in each bin is flipped upside down and added to the output list.arrow_forwardAssume that a two-dimensional array of doublewords has three logical rows and four logical columns. If ESI is used as the row index, what value is added to ESI to go from one row to the next?arrow_forwardThis is a brief summary of the concept of dynamic memory allocation.arrow_forward
- What are the inherent benefits and drawbacks of this (array-based) backing representation? Discuss with respect to implementation, efficiency, and memory usage. (PI 1.2/ABET[1], PI 6.1/ABET[6])arrow_forwardFor the following loop, assume the array arr2[][] has never been referenced before in the code. Also assume that a cache line is 32 Bytes, and an int is 4 Bytes. 1. How many memory references are there?2. How many cache misses are there?arrow_forwardAnswer the following as completely as possible in your own words:1. Explain how an array is sent to a function as a parameter.2. State which parameters should almost always be sent to any function which modifies an array. Explain why.3. Explain the similarity between index notation and pointer arithmetic.arrow_forward
- Since transistors are the primary component of the structure of both cache memory and RAM (Random Access Memory), the question naturally arises as to why we need cache memory when we already have RAM (Random Access Memory) as a volatile memory. This is because cache memory and RAM both use transistors as their primary structural component. This is as a result of the fact that both cache memory and RAM make use of transistors as their major component for constructing their respective structures. Is it feasible to use a single sort of memory for all of the many diverse functions that the computer serves, or is it necessary to make use of a variety of distinct memories?arrow_forward1. Write an ALGORITHM to calculate the address of any element A [I, J] of a two-dimensional array A [1: M, 1: N]. Assume the array is stored in column-major order, B is the base address of the array and w is the size of each element in the array. 2. A two-dimensional array A with n rows time and m columns can be represented in either row-major or column-major form. Establish the address translation functions to locate any element from the one-dimensional array. The element is specified by two-dimensional parameters along with the data type. 3. Write an ALGORITHM to find the transpose of a sparse matrix.arrow_forwardTo start, create your own set of 10 numbers in an array that are not sorted. Using your array, do the following exercises: Show how the Mergesort algorithm sorts your array by: 1) Showing which sub parts of the array are being examined with each recursive call to Mergesort 2) Showing the results of the array each time the Merge function is used Your demonstration should be similar to slides 19-33 in the Mergesort presentation. You do not have to show the details of the function calls in the stack (unless it helps you), but do explain what is happening at each step to show understanding of the algorithm. Using your same original array, show how the Quicksort algorithm sorts this array by: 3) Showing the results of the array each time the Partition function is used 4) Showing which sub parts of the array are being examined with each recursive call to Quicksort Your demonstration should be similar to slides 35-64 in the Quicksort presentation. Again, you do not have to show all the…arrow_forward
- Systems ArchitectureComputer ScienceISBN:9781305080195Author:Stephen D. BurdPublisher:Cengage LearningC++ for Engineers and ScientistsComputer ScienceISBN:9781133187844Author:Bronson, Gary J.Publisher:Course Technology Ptr