Did I form this logic expression correctly?

27 Views Asked by At

enter image description here

From this I have read the following function which was easy to do:

$$C_{out}=(\bar{X}\wedge Y\wedge C_{in}) \vee (X\wedge \bar{Y}\wedge C_{in}) \vee (X\wedge Y\wedge \bar{C_{in}}) \vee (X\wedge Y\wedge C_{in})$$

I have tried to simplify it by using XOR (exclusive or):

$$C_{out} = \left(\left( (\bar{X} \wedge Y) \vee (X \wedge \bar{Y}) \right) \wedge C_{in}\right) \vee (X \wedge Y)$$

$$C_{out} = \left((X \veebar Y) \wedge C_{in}\right) \vee (X \wedge Y)$$


Is everything alright? I really hope so because need to master this for exam...

1

There are 1 best solutions below

0
On BEST ANSWER

You have done it correctly. This is clear if you 'read the expression': $C_{out}$ = 1 whenever one of {$X$, $Y$} = 1 and $C_{in}$ = 1, OR BOTH of $X$, $Y$ = 1 [which is right for a full-adder].

Note: Since for all $A$, $A$ = $A$ ^ $A$, you can 'double' the fourth subexpression '($X$ ^ $Y$ ^ $C_{in}$)' and combine one copy with the first two and the other with the third; that way you can use OR instead of XOR in the transformed expression. I mention this only because OR can be a single 'gate' while XOR needs several 'gates', i.e the OR circuit would be simpler (and simplicity may be rewarded on your test).