in reply to Re: Converting negative number to binary with specific width
in thread Converting negative number to binary with specific width

Yup I will definitely use pack unpack next time. I saw that before but I thought I should not have any problem with sprintf. I did manage to work my way through using substr but I do think pack unpack would work nicer. Thanks

  • Comment on Re^2: Converting negative number to binary with specific width

Replies are listed 'Best First'.
Re^3: Converting negative number to binary with specific width
by BrowserUk (Patriarch) on Nov 05, 2015 at 18:18 UTC

    Make sure you look at AnomalousMonk's version of the code.


    With the rise and rise of 'Social' network sites: 'Computers are making people easier to use everyday'
    Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
    "Science is about questioning the status quo. Questioning authority". I knew I was on the right track :)
    In the absence of evidence, opinion is indistinguishable from prejudice.