-1

9999+3578

 1 0 0 1   1 0 0 1   1 0 0 1   1 0 0 1
+0 0 1 1   0 1 0 1   0 1 1 1   1 0 0 0

I don't know how to perform addition for larger numbers.

 1 0 0 1    1 0 0 1    1 0 0 1    1 0 0 1
+0 0 1 1    0 1 0 1    0 1 1 1    1 0 0 0
-------------------------------------------
 1 1 0 0     1 1 1 0  1 0 0 0 0  1 0 0 0 1

This is what i am getting

Pygirl
  • 199

1 Answers1

1

Your problem is that you cant present each digit in binary and sum that up, you need to write down the number as whole in binary, and then sum them up regularly modulo 2.

Snufsan
  • 2,125
  • Modulo $2$ with carries. – hardmath Sep 04 '16 at 16:42
  • Yeah that's what I obviously meant.... – Snufsan Sep 04 '16 at 16:45
  • If only the Question's meaning were so obvious! It seems to have mutated into, why can't I treat BCD arithmetic as a subset of binary arithmetic, at least for purposes of addition. The issue comes down to how to perform carries. – hardmath Sep 04 '16 at 16:51
  • http://www.electrical4u.com/bcd-or-binary-coded-decimal-bcd-conversion-addition-subtraction/

    actually the read question is 9999-(-3578) i tried to solve it by using the method given in that website

    – Pygirl Sep 04 '16 at 17:05