Two‐dimensional torus network nodes are typically interconnected using XY routing algorithm for transmitting a packet from a source node to a destination node. In XY routing, if all the paths are used efficiently, the throughput and latency can be improved. In this paper, to utilize all the paths efficiently, we propose a novel binary optical routing algorithm (BORA) to improve the throughput and latency. The throughput is calculated according to the injection rate and number of packets received at the destination. The XY routing algorithm and proposed BORA are implemented using objective modular network testbed in C++ simulation software and the results are analyzed and compared. In this paper, the simulation results show that the network latency reduces to 50% while using the proposed algorithm; moreover, the throughput is also improved.