使用按位取反和加法实现两个数的减法 - ba8_t 减法函数
ba8_t ba8_sub(ba8_t a, ba8_t b) { int tmp[8] = { 0, 0, 0, 0, 0, 0, 0, 1 }; ba8_t ba_one = init_ba8(tmp); ba8_t ba_b_not = ba_not(b); ba8_t ba_temp = ba_add(a, ba_b_not); ba8_t res = ba_add(ba_temp, ba_one); return res; }
原文地址: https://www.cveoy.top/t/topic/nzHd 著作权归作者所有。请勿转载和采集!