I am doing a project in C++ and I'm having hard time with substraction of binary numbers. It's easy doing it on paper but in code it's a bit hard for me. Can someone please give me the algorithm for the subtraction of two binary numbers? It's supposed to be done WITHOUT conversion to the decimal system. Thanks!
-
Do you have an algorithm for doing addition? If they are signed numbers, what representation are you using?Scott Hunter– Scott Hunter2014-04-25 16:00:52 +00:00Commented Apr 25, 2014 at 16:00
-
Do it in your code as you do it on paper.Sufian Latif– Sufian Latif2014-04-25 16:21:41 +00:00Commented Apr 25, 2014 at 16:21
Add a comment
|