Computers have CPU, memory and IO (input output)
Some CPUs, like Intel family, Z80 etc have different address space for IO devices. Others like Motorola CPUs, 6502 family etc have what is called memory mapped IO, where IO ports appear in the same address space as normal memory.