• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 290
  • Last Modified:

how to add 101010101010101101010109988889996599979999101010 to 1010101010104000506020949403060606060?

hey guys,

i was watching the Ali G show for moral guidance and philosophical stimulation. i came across this extremely insightful video where they were discussing science and computing.

Ali G asked the question - can computers add 101010101010101101010109988889996599979999101010 to 1010101010104000506020949403060606060?

and everyone was like - YES!

but later when i thought about it and what great teacher Ali G was trying to point out, i realised that he was subtly trying to point out the problems of overflow.

so 3 questions guys,
1) how do we add 101010101010101101010109988889996599979999101010 to 1010101010104000506020949403060606060?
2) when an integer variable is assigned a value of 19284712873192873192873, it's called a variable overflow right?
3) what's the difference between a memory overflow, variable overflow and GFP?

what i think is:
a) memory overflow is a generic overflow of any type
b) an integer variable overflow is also a memory overflow cause it exceeds its allocated memory space.
c) a GFP is when an application tried to write to memory outside its allocated space - and this may affect other applications or the OS. a memory overflow in some sense. perhaps not in terms of volume but in terms of location.
  • 2
1 Solution
DatabaseMX (Joe Anderson - Microsoft Access MVP)Database ArchitectCommented:
Standby ... I'm calling my mortgage guy that just closed my new house :-)
developingprogrammerAuthor Commented:
hahahaha = PPP
Dave BaldwinFixer of ProblemsCommented:
Q1: you add them with a program that can handle 50 decimal digits.  Such programs do exist.  They handle "Arbitrary-precision arithmetic".  http://en.wikipedia.org/wiki/Arbitrary-precision_arithmetic  There is a list of programs and libraries at the bottom of the article.

Q2: It might be if you are using a program that can not handle 50 decimal digits.

Q3: You're basically right but it's GPF for General Protection Fault.  It would only affect other software if it did not generate a fault that blocked it from happening.
developingprogrammerAuthor Commented:
whao fantastic Dave!! thanks so much for your help!! = ))
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now