Cockroaches have a decentralized nervous system with ganglia (nerve clusters) distributed throughout their body segments, not just in the head. They have one large ganglion in the head acting as a brain, plus smaller ganglia in each body segment that control local functions. This allows them to survive even if they lose their head.