Microcontrollers usually have more address spaces. Some is used inside only, some can be used for external memories.
Address space does not store any value. It just specifies range of addresses by start address (which is not necessarily zero) and size which the CPU can provide when it tries to access a memory location.
It is possible that some addresses are not decoded. Writing to such an address results data to be lost. Reading of a non-decoded address results random value. Pullup or pulldown resistors can be applied to data bus lines to provide a specific value for read operations.
As it shown above, it is also possible that some cells of a chip is not mapped to any address.
Because each cell of a memory chip uses same read/write control, in real world it is not possible to share individual cells of a chip between address spaces. In µCsim simulator we can define as many address decoders as we want so it is possible to map any cell to any address.
Memory banking (or bank-switching) is a method to extend amount of memory accessible by the CPU. Full amount of the memory which is available for the CPU at a time is limited by the size of the address space and can not be enlarged. But the address decoder can dynamically change the map between some part of addresses and memory chips. Dynamically mapped part of the address space becomes banked this way. Banked addresses can be mapped to different memory chips (or different part of a bigger chip) according to an extra information called bank selection. Selection is stored in a register and writable by the software. Selector register should be at an address which is non-banked. Selection is defined by a binary coded data, and size of this data determines how many banks available behind the banked addresses. Banks can store either code or data but using them need support by the compiler.
Banks in separate chips:
Banks in a single chip:
Banding...