Exemple #1
0
 static bool FullAdder_Carry(bool a, bool b, bool c)
 {
     return(BoolLogic.Or(HalfAdder_Carry(a, b), HalfAdder_Carry(HalfAdder_Sum(a, b), c)));
 }
Exemple #2
0
 public static void FullAdder(bool a, bool b, bool c, out bool sum, out bool carry)
 {
     carry = BoolLogic.Or(HalfAdder_Carry(a, b), HalfAdder_Carry(HalfAdder_Sum(a, b), c));
     sum   = HalfAdder_Sum(HalfAdder_Sum(a, b), c);
 }