The self-assembly of molecularly precise nanostructures is widely expected to form the basis of future high-speed integrated circuits, but the technologies suitable for such circuits are not well understood. In this work, DNA self-assembly is used to create molecular logic circuits that can selectively identify specific biomolecules in solution by encoding the optical response of near-field coupled arrangements of chromophores. The resulting circuits can detect label-free, femtomole quantities of multiple proteins, DNA oligomers, and small fragments of RNA in solution via ensemble optical measurements. This method, which is capable of creating multiple logic-gate-sensor pairs on a 2 x 80 x 80-nm DNA grid, is a step toward more sophisticated nanoscale logic circuits capable of interfacing computers with biological processes.