+4  A: 

From your description, it looks like you are doing column first addressing. In this case, you can find x by calculating (address%w). Once you have x, you can get y by calculating (address-x)/w.

No One in Particular
Fastest gun in the west, sir
willc2
`y` is just `address / w` without any further work if indexing is zero-based and division is integer.
hobbs
+1  A: 
x = address mod w<br>
y = address div w
Timothy Pratley
+1  A: 
x=Address MOD w
y=Address INT_DIV w
adatapost