Researchers have designed and built a prism-like device that can split a beam of light into different colours and bend the light at right angles.
The development could eventually lead to computers that use optics, rather than electricity, to carry data.
Researchers used optical link - a tiny slice of silicon etched with a pattern that resembles a bar code.
When a beam of light is shined at the link, two different wavelengths (colours) of light split off at right angles to the input, forming a T shape.
This is a big step toward creating a complete system for connecting computer components with light rather than wires.
"Light can carry more data than a wire, and it takes less energy to transmit photons than electrons," said electrical engineering Professor Jelena Vuckovic, who led the research.
In previous work her team developed an algorithm that did two things: It automated the process of designing optical structures and it enabled them to create previously unimaginable, nanoscale structures to control light.
Now, she and lead author Alexander Piggott, a doctoral candidate in electrical engineering, have employed that algorithm to design, build and test a link compatible with current fibre optic networks.

The Stanford structure was made by etching a tiny bar code pattern into silicon that split waves of light like a small-scale prism.
The team engineered the effect using a subtle understanding of how the speed of light changes as it moves through different materials.
The Stanford algorithm designed a structure that alternated strips of silicon and gaps of air in a specific way.
The device takes advantage of the fact that as light passes from one medium to the next, some light is reflected and some is transmitted. When light travelled through the silicon bar code, the reflected light interfered with the transmitted light in complicated ways.
The algorithm designed the bar code to use this subtle interference to direct one wavelength to go left and a different wavelength to go right, all within a tiny silicon chip eight microns long.
Both 1300-nanometre light and 1550-nanometre light, corresponding to C-band and O-band wavelengths widely used in fibre optic networks, were beamed at the device from above.
The bar code-like structure redirected C-band light one way and O-band light the other, right on the chip.