Public paste
jawoiegjawe
By: awiejga | Date: Nov 25 2007 00:57 | Format: None | Expires: never | Size: 852 B | Hits: 1150

  1. main()
  2. -->convert()
  3. ----->dectobin()
  4. -------->dectobin()
  5. ------------>dectobin()
  6. ---------------->dectobin()
  7.                     find the LSB;
  8.                     return LSB as a string; (1 in this case)
  9. ------------>    find the next bit (0 in this case)
  10.                  add the string from the dectobin call to the new bit we found
  11.                  (0 + 1) -> 01
  12.                  return this new string;
  13. -------->    find the next bit (1 in this case)
  14.              add the string from the dectobin call to the new bit we found
  15.              (1 + 01) -> 101
  16.              return this new string;
  17. ---->    find the next bit (0 in this case)
  18.          add the string from the dectobin call to the new bit we found
  19.          (0 + 101) -> 0101
  20.          return this new string;
  21. <back to convert>
  22.    convert now sees dectobin return "0101"