Interview Q&A / Operating Systems

BeginnerQuick answer1 min readUpdated 3 Oct 2026

A system has 4 KB pages. Translate logical address 20000 if page 4 is stored in frame 9.

SHORT ANSWER

20000 = 4 x 4096 + 3616, so page number 4 and offset 3616. Frame 9 starts at 9 x 4096 = 36864, so the physical address is 36864 + 3616 = 40480.

Explain it simply

Paging splits a logical address into a page number and an offset within that page. The page table maps the page number to a frame number. The offset is copied unchanged, because pages and frames are the same size.

  • Page number = address / page size (integer division)
  • Offset = address mod page size
  • Physical address = frame number x page size + offset

Example

Page size = 4 KB = 4096 bytes. Logical address = 20000.

  1. Page number = 20000 / 4096 = 4 (since 4 x 4096 = 16384 and 5 x 4096 = 20480 is too big).
  2. Offset = 20000 - 16384 = 3616.
  3. The page table says page 4 is in frame 9.
  4. Frame 9 starts at 9 x 4096 = 36864.
  5. Physical address = 36864 + 3616 = 40480.

In binary terms, 4096 = 2^12, so the lowest 12 bits of the address are the offset and the remaining high bits are the page number. Hardware does not divide; it just splits the bits.

Check: 4 x 4096 + 3616 = 16384 + 3616 = 20000, which matches the original address.

What to say in the interview

"With 4 KB pages, 20000 is page 4, offset 3616. Looking up page 4 gives frame 9, so physical = 9 x 4096 + 3616 = 40480. The offset never changes; only the page number is replaced by the frame number."

Common mistakes

  • Multiplying the page number by the page size instead of the frame number.

#paging#memory#worked-example

Related questions

Practise more Operating Systems questions

Test your recall with short answers, then return to the detailed explanations when you need context.

Open Operating Systems quick answers →

Get new questions like this by email

One short email when something new and useful lands. No spam, unsubscribe in one tap.

By subscribing you agree to the Privacy Policy.