At 04:31 PM 2/13/02 +0200, you wrote: >hello everybody , i want to learn how can i solve quadratic equations >by using 16f84. i have 4 equations with 4 unknowns . Which is it? A "quadratic" equation is one in the form a*x^2 + b*x + c = 0, there are two solutions which may be real or complex. You can get the solution from any book x = (- b +/- sqrt( b^2 - 4*a*c))/(2*a) But it sounds like you just have 4 linear equations in 4 unknowns, in which case you can simply use Gaussian elimination or some other textbook method of solving a system of linear equations. Implementing it can be done in C or in assembly with math routines, there's nothing here that isn't straightforward except for the details which will get you every time. ;-) In particular poorly conditioned linear systems can require much more precision in the calculations than what you need in the result. See any textbook on Numerical Analysis for the details, which take a chapter or two. You can imagine the matrix defining your linear system to describe a 4-dimensional elliptical form, the closer to a sphere it looks, (matrix condition number of 1) the better your results will be for a give precision of calculations and coefficients, the more elliptical it looks, the more trouble you are in. The condition number is just the ratio of the largest to smallest eigenvalues. Some useful algorithms are available in the book "Numerical Recipes in C", which you can find on the web. Best regards, Spehro Pefhany --"it's the network..." "The Journey is the reward" speff@interlog.com Info for manufacturers: http://www.trexon.com Embedded software/hardware/analog Info for designers: http://www.speff.com 9/11 United we Stand -- http://www.piclist.com hint: The PICList is archived three different ways. See http://www.piclist.com/#archives for details.