全加器 - 减法 - 溢出指示器

时间:2015-02-14 23:09:00

标签: digital-logic

我有一个真正的全加器表。现在我想完成加法器,以便它也可以用于减法(带溢出指示器)。 (OF = XYS'+ X'Y')

x y cin --- cout s
0 0 0   ---   0  0
0 0 1   ---   0  1
0 1 0   ---   0  1
0 1 1   ---   1  0
1 0 0   ---   1  1
1 0 1   ---   1  0
1 1 0   ---   1  0
1 1 1   ---   1  1

cout = xy + xc + yc s = x'y'c + x'yc'+ xy'c'+ xyc

我原以为减法的真实表就是这样:

sub s x y --- overflow
0   0 0 0 --- 0
0   0 0 1 --- 0
0   0 1 0 --- 0
0   0 1 1 --- 1
0   1 0 0 --- 1
0   1 0 1 --- 0
0   1 1 0 --- 0
0   1 1 1 --- 0

这张桌子对吗?

或者我需要使用这个

0   0 0 0 --- 0
0   0 0 1 --- 0
0   0 1 0 --- 0
0   0 1 1 --- 1    === can any one explain why i got 1 in the overflow here?
0   1 0 0 --- 1
0   1 0 1 --- 0
0   1 1 0 --- 0
0   1 1 1 --- 0
1   0 0 0 --- 0
1   0 0 1 --- 0
1   0 1 0 --- 1                  is this the correct true table ?
1   0 1 1 --- 0
1   1 0 0 --- 0
1   1 0 1 --- 1
1   1 1 0 --- 0
1   1 1 1 --- 0

这个真正的表是否正确,函数(=溢出)OF = XYS'+ X'Y's 如何为这个制作AU? 需要帮助PLZ

0 个答案:

没有答案