decimal/hex convert to binary(80 bits)

Discussion in 'Perl Misc' started by Yuji, Sep 3, 2005.

  1. Yuji

    Yuji Guest

    hi,

    may i know how to do some number conversion from hex or decimal to
    resultant binary which is 80 bits?

    thanks
     
    Yuji, Sep 3, 2005
    #1
    1. Advertising

  2. Yuji

    Matija Papec Guest

    X-Ftn-To: Yuji

    "Yuji" <> wrote:
    >may i know how to do some number conversion from hex or decimal to
    >resultant binary which is 80 bits?


    use Math::BigInt;

    my $num = Math::BigInt->new("0xffffffffffffffffffff");
    print $num->as_bin, "\n";



    --
    Matija
     
    Matija Papec, Sep 3, 2005
    #2
    1. Advertising

  3. Yuji

    Yuji Guest

    thanks. so u visit CPAN to find all these library?
     
    Yuji, Sep 3, 2005
    #3
  4. Yuji

    Sisyphus Guest

    "Yuji" <> wrote in message
    news:...
    > thanks. so u visit CPAN to find all these library?
    >


    Yes - a good place to start a search is at http://search.cpan.org

    You should, however, already have Math::BigInt. It's part of the perl core.

    Cheers,
    Rob
     
    Sisyphus, Sep 4, 2005
    #4
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Replies:
    10
    Views:
    6,356
    Neredbojias
    Aug 19, 2005
  2. Bengt Richter
    Replies:
    6
    Views:
    505
    Juha Autero
    Aug 19, 2003
  3. http://vmdd.tech.mylinuxisp.com/catalog/

    VMDD Tech announces the availability of CS101 - Decimal/Hex/Binary calculator

    http://vmdd.tech.mylinuxisp.com/catalog/, Jan 8, 2005, in forum: C Programming
    Replies:
    4
    Views:
    365
    dandelion
    Jan 10, 2005
  4. gabor
    Replies:
    6
    Views:
    31,510
    mahfoudh
    Dec 30, 2013
  5. Todd Gardner
    Replies:
    2
    Views:
    159
    Todd Gardner
    Jun 21, 2004
Loading...

Share This Page