def FA(a,b,c):
Carry=(a and b)or(b and c)or(a and c)
Sum=(a and b and c)or(a and (not b) and (not c))\
or((not a)and b and (not c))or ((not a)and (not b)and c)
return Carry,Sum
计算机导论 课本例子及习题集合 2.全加器
最新推荐文章于 2022-05-21 15:39:41 发布
def FA(a,b,c):
Carry=(a and b)or(b and c)or(a and c)
Sum=(a and b and c)or(a and (not b) and (not c))\
or((not a)and b and (not c))or ((not a)and (not b)and c)
return Carry,Sum