Searching \ for 'Addition (2 32-bit numbers) and Division' in subject line. ()
Make payments with PayPal - it's fast, free and secure! Help us get a faster server
FAQ page: www.piclist.com/techref/method/math.htm?key=division
Search entire site for: 'Addition (2 32-bit numbers) and Division'.

Truncated match.
PICList Thread
'Addition (2 32-bit numbers) and Division'
2000\03\19@040223 by Saurabh Sinha

picon face
Hi,

I need some help with adding two 32-bit numbers.

What I have in mind: 8 bytes will be needed, 4 bytes for each of the
numbers.
My problem: How, do I use Status <C> , to automatically increment the next
byte block, if there's a 1 carry?

Then, I need to divide (the 32-bit number), by 2^24. To do this, type of a
division, I will have to shift the numbers 24 times to the right, right? The
result will be 8-bits. I will need about 8-bytes in doing this. My problem,
once again, how/can I take advantage of the status flags (if they are
needed?).[Sorry, I am quite new to programming].

Thanks in advance for your assistance.

Regards,

Saurabh

2000\03\19@160316 by paulb

flavicon
face
Saurabh Sinha wrote:

> Then, I need to divide (the 32-bit number), by 2^24.

 Copy the most significant byte into the least-significant byte of your
new number, any other more-significant bytes being already cleared
(i.e., you have as you say, an 8-bit only result).
--
 Cheers,
       Paul B.

2000\03\20@033909 by Nikolai Golovchenko

flavicon
face
Check out MICROCHIP Application Note AN617 at http://www.microchip.com
It will answer your questions on mul/div, multi byte addition and
subtraction.

Nikolai

On Sunday, March 19, 2000 Saurabh Sinha wrote:
{Quote hidden}

More... (looser matching)
- Last day of these posts
- In 2000 , 2001 only
- Today
- New search...