183 views
A frame buffer array is addressed in row major order for a monitor with pixel locations starting from (0,0) and ending with (100,100). What is address of the pixel(6,10)? Assume one bit storage per pixel and starting pixel location is at 0. 1)1016 2)1006 3) 610 4)616

### 1 comment

Starting address(base address) for pixel location = 0, and given that pixel size = 1 bit.

Number of rows (r) = 100 – 0 + 1 = 101, Number of columns (c) = 100 – 0 + 1 = 101

In row-major-order fashion, address of element (i, j) = B + [(i – lr)*c + (j – lc)]*S

c = number of columns,

lr = row start index of 2D matrix,

lc = column start index of 2D matrix,

S = size of each element,

So, in row-major-order fashion, address of pixel (6, 10) = 0 + [(6-0)*101 + (10-0)]*1 = 616

Starting address(base address) for pixel location = 0, and given that pixel size = 1 bit.

Number of rows (r) = 100 – 0 + 1 = 101, Number of columns (c) = 100 – 0 + 1 = 101

In row-major-order fashion, address of element (i, j) = B + [(i – lr)*c + (j – lc)]*S

c = number of columns,

lr = row start index of 2D matrix,

lc = column start index of 2D matrix,

S = size of each element,

So, in row-major-order fashion, address of pixel (6, 10) = 0 + [(6-0)*101 + (10-0)]*1 = 616

by