binary output

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • jaarmstr
    New Member
    • Jan 2008
    • 5

    binary output

    i know that it is not too hard to write a function to convert a num to binary and print it out but do we really have to? i see we can use %o and %x for octal and hexidecimal. so i am wondering is there any inbuilt function for binary as it seems kinda wierd that there is binary operators but not binary format. ta
  • Banfa
    Recognized Expert Expert
    • Feb 2006
    • 9067

    #2
    Sorry no, there is no standard format string for binary output, probably because binary is that useful, it takes up too much screen space when you can just output in hex and read that almost as easily.

    Comment

    • weaknessforcats
      Recognized Expert Expert
      • Mar 2007
      • 9214

      #3
      Actully, everything is already in binary or it wouldn't be in the machine. A display of 1001010101 is mostly useless, hence no standard function.

      These problems are usually only of interest to students and teachers.

      Comment

      Working...