Adding two unsigned 128 bit values

Please support our Assembly advertiser: Programming Forums - DaniWeb Sister Site
Thread Solved

Join Date: Jun 2008
Posts: 19
Reputation: Epic Tissue is an unknown quantity at this point 
Solved Threads: 1
Epic Tissue's Avatar
Epic Tissue Epic Tissue is offline Offline
Newbie Poster

Adding two unsigned 128 bit values

 
0
  #1
Jul 21st, 2008
Ok, so this might seem stupid.. but I am just trying to get my head around it.

I have 32bit registers (longword size).

Unsigned values are values from 0 to 255.

Adding two unsigned 128 bit values...

So do I need to use 4 registers per value and add the lower parts first, then the next lowest until the highest part?
Reply With Quote Quick reply to this message  
Join Date: Dec 2005
Posts: 5,850
Reputation: Salem has a reputation beyond repute Salem has a reputation beyond repute Salem has a reputation beyond repute Salem has a reputation beyond repute Salem has a reputation beyond repute Salem has a reputation beyond repute Salem has a reputation beyond repute Salem has a reputation beyond repute Salem has a reputation beyond repute Salem has a reputation beyond repute Salem has a reputation beyond repute 
Solved Threads: 751
Team Colleague
Salem's Avatar
Salem Salem is offline Offline
Void main'ers are DOOMed

Re: Adding two unsigned 128 bit values

 
0
  #2
Jul 22nd, 2008
Sure, just use the "add with carry" instruction, and you can add as many as you like.
Reply With Quote Quick reply to this message  
Reply

This thread has been marked solved.
Perhaps start a new thread instead?
Message:



Other Threads in the Assembly Forum


Views: 924 | Replies: 1
Thread Tools Search this Thread



Tag cloud for Assembly
About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC