Ad
  • Custom User Avatar

    this is the code that they want to see you write

    Erm, no? The only reasonable approach is to use the features provided by the language. Unless, of course, you're specifically asked to do the conversion manually, but even in that case, this is an unclear, convoluted, and inefficient solution.

  • Custom User Avatar

    If you're in a viewer and the interviewer asks you to write a program that prints the result of an addition in binary, this is the code that they want to see you write, not the python one that uses a ready made function

  • Custom User Avatar

    For me, this solutin means that the coder realy understands the rationale of binay, although probably it isn't the best way to do binary.

  • Custom User Avatar

    It's just a different way of solving the problem. I believe that a good balance between being aware of the correct syntax and being able to re-derive basic functions is essential for any good coder.

  • Custom User Avatar

    i worry about having to pull something like this off during an interview just for not knowing how to format a number to binary -.-