I guess, that I am messing up the idea of the overflow and the carry. What would an overflow be considered? I mean if I carry beyond the actual size does not generate an overflow, then what does? I am seeing some of the picture here, but not all of it.=20 P.S. I do appreciate you help and clearity in this matter. Regards, James -----Original Message----- From: Bob Ammerman [mailto:RAMMERMAN@PRODIGY.NET] Sent: Monday, April 02, 2001 10:02 AM To: PICLIST@MITVMA.MIT.EDU Subject: Re: [PIC]:How to do 24bit Signed Addition/Substration Fixed point. >Ah, you say that as long as I don't overflow the values, Well this could >easily happen on the second math opertion. You indicated the following: 5 - 10 =3D -5 B'00000101' - B'00001010' =3D B'11111011' >Now if I have to take this result and add it to say 20, then this would >immediately overflow and everything would go wako, am I correct? No, it would not overflow. Take a look: -5 + 20 =3D 15 B'11111011' + B'00010100' =3D B'00001111' Again, we get the right answer (note that we _ignore_ the carry out of the MSBit). >You are familiar with Bresenham. Would this make any difference to the results? Nope, will work fine with Bresenham. Bob Ammerman RAm Systems (contract development of high performance, high function, low-level software) -- http://www.piclist.com hint: PICList Posts must start with ONE topic: [PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads -- http://www.piclist.com hint: PICList Posts must start with ONE topic: [PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads