title: ARMv8: convert decimal to binary using ARMv8 assembly language
body: <p>how to convert decimal to binary using ArmV8 assembly language Example: input: 43 output: 101011</p>
  
  <p>I mainly dont know how to do the conversion part from decimal to binary</p>
  
  <p>or how to translate it from any programming language to ARMv8</p>
  
  <p>this is what I have</p>
  
  <p>ARMv8 assembly language code</p>
  
  <pre><code>.data
  
  decimal: .asciz "%s"
  
  binary: .asciz "%d"
  
     newline:       .asciz "\n"
  
     string_input_buffer: .space 256
  
     userPrompt: .asciz "Input an integer: \n"
  
  .text
  
  .global main
  
  main:
  
     # Load the input prompt and print it out
  
     ldr x0, =userPrompt
  
     bl printf
  
     # Take in the input and save it in the buffer
  
     ldr x0, =decimal
  
     ldr x1, =string_input_buffer
  
     bl scanf
  
     bl decToBin
  
  done:
  
     mov x0, #0
  
     mov x8,#93
  
     svc #0
  
  decToBin:
  
  // Convert Decimal to Binary
  </code></pre>
  
  <p>this is the code that I have in java</p>
  
  <pre><code>while(decimal != 0)
          {
              a = decimal%2;
  
              b += a* Math.pow(10, count);
  
              count++;
  
              decimal = decimal/2;
  
          }
  </code></pre>
  
  <p>I cant seem to understand how to translate it to arm</p>