Take your 16-bit segment and offset addresses and break them into pairs. For example, if the two addresses you are dealing with are "0000:0100," you can translate them into 20-bit segment and offset addresses by breaking them in half at the colon so they become "0000" for the 20-bit segment address and "0100" for the 20-bit offset address.
A computer memory address is a hexadecimal or binary address that a computer uses when storing data. Whenever a piece of information is stored, the computer has to calculate where to store the data in memory based off of a segment and offset address from the hard drive. Calculating the memory address from these segment and offset addresses can be tricky and requires advanced computing and mathematical knowledge, but is crucial for a programmer to know how to do so.
Things You'll Need
- 16-bit segment and offset addresses
Add the two 20-bit addresses together in binary form to get the hexadecimal address of the memory. For the "0000" and "0100" addresses, the addition result would be "00100" in hexadecimal. This address is the physical hexadecimal address of the memory.
Convert the hexadecimal 20-bit physical address into binary format by breaking each of the hexadecimal digits into its own binary form. In the "00100" example, you break them down into "0000," "0000," "0001," "0000," and "0000" to get the string "0000 0000 0001 0000 0000" as the final binary memory address.
- Photo Credit Siri Stafford/Digital Vision/Getty Images
What Is Memory Addressing in a Computer?
A memory address typically takes the form of a binary number, ... The following is an example of the format typically found...
What Is Memory Address Register MAR?
Registers are part of the central processing unit (CPU) of a computer. Registers are memory locations that can be accessed quickly for...
How to Calculate MAC Address to Binary
You might see this address referred to as the "physical address" or "hardware ... Your computer's calculator will perform all the simple...
How to Calculate Offset Assembly Language
Assembly language typically uses hexadecimal numbers for memory addresses. Hexadecimal numbers are denoted by a preceding “0x.”