First, do not discard what is stored in each segment, which only confuses you. The problem is simply asking you to determine the numbering of the hexadecimal numbers, and it is not too difficult. Here are the requirements:
- 64 KB full memory
- The first 16 bytes of the address space (starting from address 0x0000) is reserved for special function registers (IE1, IE2, IFG1, IFG2, etc.).
- The next 240 bytes are reserved for 8-bit peripherals
- The next 256 bytes are reserved for 16-bit peripherals
- The amount of RAM is 2 KB and starts with the address 0x1100
- At the top of the address space is 56 KB of flash memory reserved for code and the interrupt vector table.
Since each hexadecimal digit in your memory address can handle 16 values ββ(0-F), you will need 4 digits to display 64 KB of memory (16 ^ 4 = 65536 or 64 KB).
You start with 16 bytes and cover 0x0000 - 0x000F (one full digit of your address). This means that the next segment, which begins immediately after it (8-bit devices), starts at 0x0010 (next byte) and, since it is 240 bytes, ends with byte 256 (240 + 16) or 0x00FF.
The next segment (16-bit devices) starts with the next byte, which is 0x0100 and has a length of 256 bytes, which puts an end to 0x01FF.
Then 2 KB (2048 bytes) of RAM appears, but starts with 0x1100, as the description indicates, and not immediately after the previous segment, so your starting address. Add 2048 to this and you will get 0x18FF.
The last segment covers the upper part of the memory, so you have to work in the opposite direction, you know that it ends with 0xFFFF (the end of the available memory), and it lasts 56 KB. If you convert 56KB to hex, it is 0xDFFF. If you assume that this segment starts at 0, this leaves 2,000 unused (0xE000-0xEFFF and 0xF000-0xFFFF), so you know that this segment must start at 0x2000 to end at the upper end of the memory space.
I hope this becomes clearer, although when I read it I donβt know that it will help at all :( Maybe that's why I will leave teaching this concept to someone more qualified ...