All-optical nanoscale logic components are highly desired for various applications because light may enable logic functions to be performed extremely quickly without the generation of heat and cross-talk. All-optical computing at nanoscale is therefore a promising alternative but requires the development of a complete toolbox capable of various logic functionalities. We demonstrate nanoscale all-optical switches by exploiting the polarization-dependent light emission property of crossbar InP and AlGaAs nanowire networks. These networks can perform various logic operations, such as AND, OR, NAND, and NOR binary logic functions. Furthermore, on the basis of these logic operations, our networks successfully enable all-optical arithmetic binary calculations, such as n-bit addition, to be conducted. Our results underscore the promise of assembled semiconductor nanowire networks as a building block of on-chip all-optical logic components for future nanophotonics.