Digital out from one cortex to digital in of another

I want to transmit a signal from 1 cortex to another using a digital port. (I know I can do a serial link, but for the application I am using it for, a simple bit is needed so I would prefer a digital wire.) Would I connect ground to ground and white to white but not connect +5v (red) together?

[ATTACH]8523[/ATTACH]

This is what I think I should do, am I correct?
1.jpg

Yes that would work fine. You are correct in not connecting the 5V rails together.

Thanks (10 char)