Beispiel #1
0
 static bool HalfAdder_Carry(bool a, bool b)
 {
     return(BoolLogic.And(a, b));
 }
Beispiel #2
0
 public static void HalfAdder(bool a, bool b, out bool sum, out bool carry)
 {
     sum   = BoolLogic.Xor(a, b);
     carry = BoolLogic.And(a, b);
 }