How to add two numbers without using ++ or + or another arithmetic operator

后端 未结 21 2117
南笙
南笙 2020-11-27 10:48

How do I add two numbers without using ++ or + or any other arithmetic operator?

It was a question asked a long time ago in some campus interview. Anyway, today some

21条回答
  •  鱼传尺愫
    2020-11-27 11:31

    You could transform an adder circuit into an algorithm. They only do bitwise operations =)

提交回复
热议问题