Top Navigational Bar

16-Bit Registers, Memory Addresses (BIN-HEX-D
DocumentID: 659221
Revision Date: 29-Feb-96 8:29:48 PM

The information in this document applies to:
WordPerfect® 5.1 for DOS

Problem

Solutions: 16-BIT REGISTERS / MEMORY ADDRESSES / BIN-HEX-DEC

The diagram below represents two 16-Bit registers in a computer. You can see that it is divided into 4-bit sections. (A bit is a switch that can be On or Off). Each 4-bit section represents 1 Hexadecimal digit.
----------------------------- -----------------------------
|------ ------ ------ ------| |------ ------ ------ ------|
||0000| |0000| |0000| |0000|| ||0000| |0000| |0000| |0000||
|------ ------ ------ ------| |------ ------ ------ ------|
----------------------------- -----------------------------
In order for the computer to represent a 20-bit address, it has to offset the registers and add them together.

------------------------------
|------ ------ ------ -------|
||0000| |0000| |0000| |0000 || = Segment
|------ ------ ------ -------|
------------------------------
Plus
-----------------------------
|------ ------ ------ ------|
||1111| |0000| |0000| |0000|| = Offset
|------ ------ ------ ------|
-----------------------------

Above is a representation of two 16-bit registers offset (Shifted Left). The above registers can be represented as a memory address in a Linear (0F000) or Segment:Offset (0000:F000) style. If the Offset numbers are added straight down, the result is a 20-bit, or 5 digit Hexadecimal number that represents a linear address.

------ ------ ------ ------ ------
= |0000| |1111| |0000| |0000| |0000|
------ ------ ------ ------ ------

This number can be represented in Binary as above, or in Hexadecimal.
------ ------ ------ ------
= |1111| |0000| |0000| |0000|
------ ------ ------ ------
| | | |
-------------------------
F 0 0 0

Below are the Binary, Hexadecimal and Decimal equivalents used to interpret all addresses. As you can see, Hexadecimal uses the Digits 0-9 and A-F to represent the 16 Binary numbers used to determine an address in memory.

0000 - 0 - 0 0100 - 4 - 4 1000 - 8 - 8 1100 - C - 12
0001 - 1 - 1 0101 - 5 - 5 1001 - 9 - 9 1101 - D - 13
0010 - 2 - 2 0110 - 6 - 6 1010 - A - 10 1110 - E - 14
0011 - 3 - 3 0111 - 7 - 7 1011 - B - 11 1111 - F - 15

Answer:

Details:


Product specifications, packaging, technical support and information (*Specifications*) refer to theUnited States retail English version only. Specifications for other versions may vary. All Specifications, claims, features, representations, and/or comparisons provided are correct to the best of our knowledge of the date of publication, but are subject to change without notice.OUR MAXIMUM AGGREGATE LIABILITY TO YOU AND THAT OF OUR DEALERS AND SUPPLIERS IS LIMITED. IT SHALL NOTEXCEED THE AMOUNT YOU PAID TO ACCESS THE INFORMATION. SEE LEGAL DISCLAIMER.