We present designs of all-optical ultrafast YES/NOT, XOR/XNOR logic gates, binary counter, and double-bit comparator based on all-optical switching by two-photon absorption induced free-carrier injection in silicon 2 × 2 add-drop microring resonators. The proposed circuits have been theoretically analyzed using time-domain coupled-mode theory based on reported experimental values to realize low power (∼ 28 mW) ultrafast (∼ 22 ps) operation with high modulation (80%) and bit rate (45 Gb/s). The designs are complementary metal-oxide semiconductor compatible and provide advantages of high Q-factor, tunability, compactness, cascadibility, scalability, reconfigurability, simplicity, and minimal number of switches and inputs for realization of the desired logic. Although a two-bit counter has been shown, the scheme can easily be extended to N-bit counter through cascading.