title: How are numbers greater than 2^32 handled by a 32 bit machine?
body: <p>I am trying to understand how calculations involving numbers greater than 2<sup>32</sup> happen on a 32 bit machine.</p>
  
  <p>C code</p>
  
  <pre><code>$ cat size.c
  #include&lt;stdio.h&gt;
  #include&lt;math.h&gt;
  
  int main() {
  
      printf ("max unsigned long long = %llu\n",
      (unsigned long long)(pow(2, 64) - 1));
  }
  $
  </code></pre>
  
  <p>gcc output</p>
  
  <pre><code>$ gcc size.c -o size
  $ ./size
  max unsigned long long = 18446744073709551615
  $
  </code></pre>
  
  <p>Corresponding assembly code</p>
  
  <pre><code>$ gcc -S size.c -O3
  $ cat size.s
      .file   "size.c"
      .section    .rodata.str1.4,"aMS",@progbits,1
      .align 4
  .LC0:
      .string "max unsigned long long = %llu\n"
      .text
      .p2align 4,,15
  .globl main
      .type   main, @function
  main:
      pushl   %ebp
      movl    %esp, %ebp
      andl    $-16, %esp
      subl    $16, %esp
      movl    $-1, 8(%esp)   #1
      movl    $-1, 12(%esp)  #2
      movl    $.LC0, 4(%esp) #3
      movl    $1, (%esp)     #4
      call    __printf_chk
      leave
      ret
      .size   main, .-main
      .ident  "GCC: (Ubuntu 4.4.3-4ubuntu5) 4.4.3"
      .section    .note.GNU-stack,"",@progbits
  $
  </code></pre>
  
  <p><strong>What exactly happens on the lines 1 - 4?</strong></p>
  
  <p>Is this some kind of string concatenation at the assembly level?</p>