I've been reading about external peripheral mapping to microcontrollers.
I understand that memory-mapped IO means that the same address space in the microcontroller can be used for internal memory and also to map external peripherals. Therefore the same instructions we normally use can be used to communicate with external devices.
Port-mapped IO means that there is a certain address space especially used for mapping external peripherals. Sometimes specific instructions need to be used to accesss the peripherals via this address space.
Obviously we can see the advantages of memory-mapped IO here. However, I read from the link below that
"The disadvantage of memory-mapped IO method is that the entire address bus must be fully decoded for every device. For example, a machine with a 32-bit address bus would require logic gates to resolve the state of all 32 address lines to properly decode the specific address of any device. This increases the cost of adding hardware to the machine."
Can someone please explain this as I can't understand this. Why does the microcontroller need to decode the 32-bit address bus like this?