title: Add Two 32 bit Floating Point Numbers with AVR-Assembler
body: <p>Im trying to use AVR Studio to add two 32bit floating point numbers together. I know that I will need to store the 32bit number in 4 separate 8bit registers. I'll then need to add the registers together using the carry flag. This is what I have so far. Im adding 5.124323 and 2.2134523.</p>
  
  <pre><code>;5.124323 (01000000101000111111101001110100)
  ;Store hex value (40A3FA74)
  ldi r21,$40
  ldi r22,$A3
  ldi r23,$FA
  ldi r24,$74
  
  
  ;2.2134523 (01000000000011011010100100110100)
  ;Store hex value (400DA934)
  ldi r25,$40
  ldi r26,$0D
  ldi r27,$A9
  ldi r28,$34
  
  
  ;Add the corresponding bytes together including the carry flag
  add r21,r25
  adc r22,r26
  adc r23,r27
  adc r24,r28
  </code></pre>
  
  <p>This doesnt seem to give me the right answer... I'm pretty sure the only thing that's wrong here is the order of the registers in the last 4 lines of code. Or maybe the add / adc functions are also wrong. Can someone please help me out with this?</p>