title: translate virtual address to physical address
body: <p>The following page table is for a system with 16-bit virtual and physical addresses and with 4,096-byte pages. The reference bit is set to 1 when the page has been referenced. Periodically, a thread zeroes out all values of the reference bit.All numbers are provided in decimal.
  <a href="https://i.stack.imgur.com/tjsjU.png" rel="noreferrer"><img src="https://i.stack.imgur.com/tjsjU.png" alt="enter image description here"></a></p>
  
  <p>I want to convert the following virtual addresses (in hexadecimal) to the equivalent physical addresses. Also I want to set the reference bit for the appropriate entry in the page table.</p>
  
  <p>• <code>0xE12C</code></p>
  
  <p>• <code>0x3A9D</code></p>
  
  <p>• <code>0xA9D9</code></p>
  
  <p>• <code>0x7001</code></p>
  
  <p>• <code>0xACA1</code></p>
  
  <p>I know the answers are but I want to know how can I achieve these answers:</p>
  
  <pre><code>0xE12C → 0x312C
  0x3A9D → 0xAA9D
  0xA9D9 → 0x59D9
  0x7001 → 0xF001
  0xACA1 → 0x5CA1
  </code></pre>
  
  <p>I found and tried <a href="https://www.physicsforums.com/threads/translate-virtual-address-to-physical-address.456284/" rel="noreferrer">This</a> but it did not help me much.</p>