# calculate logical address and physical address by using page table with invalid and valid bit

I have an exercise which is unclear to me. The exercise is about paging(operating system).

Exercise is:

e. Translate into physical addresses the one(s) which are both legal and in memory.

f. What happens when a logical address is not legal? And when it is not in memory?

So far I have tried something this:

a and b) Page size = frame size = $2^7$

c) Numbers of frames = $2^8$

d) 9th addr. of page 0

logical address = (128*0)+9 = 9 it is in mem and valid

physical mem = (128*4)+9 = 521 it is in mem and valid


I don't know how to calculate point d, e and f.