UrbanPro
true

Learn Programming Languages from the Best Tutors

  • Affordable fees
  • 1-1 or Group class
  • Flexible Timings
  • Verified Tutors

Search in

Address Calculation in Two Dimensional Arrays

Talla Veerendranath
19/09/2019 0 0

Addresses of  Two Dimensional arrays can be calculated by using

1. Row Major representation

2. Column major Representation

1. Row Major representaion: Let X be an array of M Rows and N Columns

Address Location (X [i, j]) = Base Adress of  X + S [N (i-LBofrow) + (j -LBofCol)]

i and j indicates index value of the element whose address you want to search.

Base Adress of  X  is the starting address of the given array. 

S is the memory word required to store given array’s element. 

LBofrow is Lower Boundary of Rows

LBofCol is Lower Boundary of Columns

Example : 

Rows:  2   Columns : 3

   3     4   5
  2     1   6

   0         1         2     

Let base address be 200

w be 2 bytes(int)

Address of x[1,0]=200+2[3[1-0]+[0-0]]

                         =200+2[3-0]

                         =200+6

                         =206

2 Column Major Representation

Address Location (X [i, j]) =  Base Adress of  X + S [(j- LBofrow) +M(i - LBofCol)]

 

0 Dislike
Follow 1

Please Enter a comment

Submit

Other Lessons for You

Facebook Analytics
Assume how the Facebook application will store the millions of customer's record in real-time: facebook = { 'jose': { 'name': 'jose', 'age': 33, 'hobby': , # cricket,football 'mobile': 1111111111, 'email':...

5 Key Benefits of Internship
As many of my connects are about to complete their graduation and post graduation, its been my good advice to them to find internship. Let me throw some light in this article on that area. An internship...
S

Shekhar Pawar

0 0
0

Programming Funds: Data == Information
Commonly, I used to ask this question in my classroom. Most of them will give the answers like: Data means information (or) Information means Data Which is correct? Are both same? Maybe...but not true. Here...

History Of Programming Languages
1800: Joseph Marie Jacquard teaches a loom to read punch cards, creating the first heavily multi-threaded processing unit. His invention was fiercely opposed by the silk-weavers who expected the birth...

Coding for Children: Scratch
What is coding? Coding has become a must-have skill in this 21st century. Coding, or computer programming, is how we communicate with Devices. Code mentions the machine what moves to make, and composing...
X

Looking for Programming Languages Classes?

The best tutors for Programming Languages Classes are on UrbanPro

  • Select the best Tutor
  • Book & Attend a Free Demo
  • Pay and start Learning

Learn Programming Languages with the Best Tutors

The best Tutors for Programming Languages Classes are on UrbanPro

This website uses cookies

We use cookies to improve user experience. Choose what cookies you allow us to use. You can read more about our Cookie Policy in our Privacy Policy

Accept All
Decline All

UrbanPro.com is India's largest network of most trusted tutors and institutes. Over 55 lakh students rely on UrbanPro.com, to fulfill their learning requirements across 1,000+ categories. Using UrbanPro.com, parents, and students can compare multiple Tutors and Institutes and choose the one that best suits their requirements. More than 7.5 lakh verified Tutors and Institutes are helping millions of students every day and growing their tutoring business on UrbanPro.com. Whether you are looking for a tutor to learn mathematics, a German language trainer to brush up your German language skills or an institute to upgrade your IT skills, we have got the best selection of Tutors and Training Institutes for you. Read more