How to use the Page Table Size and Address Bits Calculator
- 1. Enter the sizesType the virtual address bits, page size and either the page table entry size or the physical memory size.
- 2. Choose levelsLeave it on auto so each table fits in one page, or fix the number of levels.
- 3. Check the extrasAdd a process size to see the memory its tables need, or a hex address to split into fields.
The formulas
- Offset bits = log2(page size).
- Page number bits = virtual address bits − offset bits. Pages = 2page number bits.
- Frames = physical memory ÷ page size; frame bits = log2(frames).
- Single-level page table = pages × entry size.
- For multi-level paging, one page holds page size ÷ entry size entries, so each level indexes log2 of that many bits. Levels = ⌈page number bits ÷ bits per level⌉.
Worked example
32-bit logical addresses, 4 KB pages, 4-byte entries.
- Offset = log2 4096 = 12 bits, page number = 32 − 12 = 20 bits.
- Single-level table = 220 × 4 B = 4 MB for every process.
- One page holds 4096 ÷ 4 = 1024 entries, so each level takes 10 bits: the format is 10 | 10 | 12.
An 8 MB process uses 2048 pages, so it needs 2 inner tables and 1 outer table: 3 × 4 KB = 12 KB instead of 4 MB. With 48-bit addresses and 8-byte entries, a page holds 512 entries (9 bits), giving the familiar 4-level 9 | 9 | 9 | 9 | 12 format.
When the entry size is not given
Work it out from the frame number plus any extra bits (valid, dirty, protection), rounded up to whole bytes. With 1 GB of memory and 4 KB pages there are 218 frames, so 18 bits + 2 extra bits = 20 bits, stored in 3 bytes. Check whether your question wants it rounded to bytes or to a power of 2.
Frequently asked questions
What is an inverted page table?
One table for the whole system with one entry per physical frame, holding the process ID and page number. It is small, but lookups need hashing.
Why use multi-level paging?
A single table must cover the whole virtual space even if the process uses little of it. Multi-level tables only create the inner tables that are in use.
Is memory byte-addressable here?
Yes. For word-addressable questions, enter sizes in words and treat each byte as one word.