in reply to How to convert binary to hexadecimal
Another snippet for your perusal:
#!/usr/bin/perl use warnings; use strict; my $binary = '11101010101010101010101010101010'; my $int = unpack("N", pack("B32", substr("0" x 32 . $binary, -32))); my $hex = sprintf("%x", $int ); print $hex,"\n";
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: How to convert binary to hexadecimal
by vaas_m (Initiate) on Oct 12, 2007 at 11:00 UTC | |
by Anonymous Monk on Jun 04, 2009 at 16:10 UTC | |
|
Re^2: How to convert binary to hexadecimal
by Anonymous Monk on Jun 14, 2009 at 09:04 UTC | |
by toolic (Bishop) on Oct 04, 2012 at 13:56 UTC | |
by Lotus1 (Vicar) on Oct 02, 2014 at 17:46 UTC | |
by Anonymous Monk on Jan 11, 2019 at 16:56 UTC | |
by Anonymous Monk on Mar 03, 2020 at 20:13 UTC | |
by Anonymous Monk on Mar 21, 2013 at 07:09 UTC | |
by roboticus (Chancellor) on Mar 22, 2013 at 01:14 UTC |