Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
PerlMonks  

Re^4: How to convert binary to hexadecimal

by Lotus1 (Vicar)
on Oct 02, 2014 at 17:46 UTC ( [id://1102655]=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    use warnings;
    use strict;
    ...
    111111111111111111111111111111111 0001 FFFF FFFF width=33
    
    0101010101010101010101010101010101010101010101010101010101010101 5555 
    +5555 5555 5555 width=64
    
  2. or download this
    sub b2h {
        my $revbin = reverse shift;
        $revbin =~ s/([01]{1,4})/sprintf "%X", oct('0b' . reverse $1)/eg;
        return reverse $revbin;
    }
    

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1102655]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others contemplating the Monastery: (6)
As of 2024-04-24 04:04 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found