1. Limited time only! Sign up for a free 30min personal tutor trial with Chegg Tutors
    Dismiss Notice
Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Homework Help: Adding binary numbers (overflow)

  1. Oct 5, 2011 #1
    1. The problem statement, all variables and given/known data
    Hey, i don't really understand what they mean when its overflow when u add or subtract binary numbers like

    2. Relevant equations

    3. The attempt at a solution
    I thought the answer is 10111 but they get +7 I know the+ is cause of the 1 in front but dont know why the answer is 7 and not 10111

    I was thinking that the answer has more digits than the original but it seems not true from other examples
  2. jcsd
  3. Oct 5, 2011 #2


    User Avatar
    Science Advisor
    Homework Helper

    The assumption here is that you only have four digits to contain the answer, like in a register on a computer. It can't hold 10111. Something has to go. The adder you are talking about will apparently just drop the leftmost fifth digit 1. That's called overflow. So the register will contain the incorrect answer 0111=7. Overflow isn't a good thing.
  4. Oct 6, 2011 #3
    hey um i kind of thought of that, but why is 1110+1010 =11000 not overflow? or is it? In the book example for adding it shows this but says nothing about overflow and why is 0101+0110=1011 a overflow? Is it because there is a 0 in the beginning so you would only count 3 digits?
Share this great discussion with others via Reddit, Google+, Twitter, or Facebook