Can someone help me with this problem
I need program in c++ ,that can sum number DIGIC COMPLEMENT and RADICAL COMPLEMENT
IF the input is in
my output should be
Those links didn't work (at least not for me) please input them in a code block (just hit the "Code" button on the top of the editor). Also I have a feeling that your description of your problem will be insufficient. Try to clearly describe exactly what you are trying to do.
In his first post he did say that it was about the different compliment systems (he misspelled them but he meant Digit and Radix complements) Digit complement in binary is 1s complement, whereas radix complement in binary is 2s complement. Here is -3 stored in a 3-bit number in both:
Digit complement (1s complement):
original is 011 (3), invert all bits to get 100 (-3)
Radix complement (2s complement):
original is 011 (3), most significant bit is negative so 111 is -1, so 101 would be -3 (by subtracting the 2 bit)
The issue is that I can't access his code. If you can could you post it directly here rather than using pastebin?
Some descriptive comments (in english) would be very helpful. Your variable names are hard to decode. Rename your variables so that they explain what they are, and use comments to describe your code. Also I would strongly recommend splitting your code into functions, for more legibility.