01+01 is 10 ... should I get into the details?FaX wrote:1+1 = 01 not 10 in binarykritikon wrote:KVR: questioning the undeniable truth of 1+1=2
But 1+1=10 (in the binary world).
Let A1, A2, B1 and B2 be the inputs to the adder, C, S1 and S2 are the outputs.
Code: Select all
A1 B1 S1 S1c
0 0 0 0
0 1 1 0
1 0 1 0
1 1 0 1
S1 = A1 xor B1
S1c = A1 and B1
A2 B2 S1c S2s S2 C
0 0 0 0 0 0
0 1 0 1 1 0
1 0 0 1 1 0
1 1 0 0 0 1
0 0 1 0 1 0
0 1 1 1 0 0
1 0 1 1 0 0
1 1 1 0 1 1
S2 = (A2 xor B2) xor S1c
C = (A2 and B2)
So, A1 = B1 = 1, A2 = B2 = 0
S1 = A1 xor B1 = 1 xor 1 = 0
S2 = (A2 xor B2) xor (A1 and B1)
= (0 xor 0) xor (1 and 1)
= 0 xor 1
= 1
Thus, the result is 10.