Low-overhead fault-tolerant logic for field-programmable gate arrays