Answers for "full adder in prolog"

0

full adder in prolog

halfadd(X, Y, Z, C) :-
   Z is X xor Y,
   C is X /\ Y.

fulladd(X, Y, C, Z, D) :-
   halfadd(X, Y, H, J),
   halfadd(H, C, Z, K),
   D is J \/ K.
Posted by: Guest on January-13-2021

Browse Popular Code Answers by Language