Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
PerlMonks  

Comment on

( #3333=superdoc: print w/ replies, xml ) Need Help??
Maybe the following helps a bit clarifying what's what:

#!/usr/bin/perl use strict; use warnings; use Data::Hexdumper qw(hexdump); use integer; my $Rm = '0xAAAAAAAA'; my $Rb = hex $Rm; my $Rc = pack 'l', $Rb; my $Rd = unpack 'l', $Rc; my $Re = $Rd >> 31; my $Rx = pack 'l', $Re; print 'Rm: ', hexdump( $Rm, { suppress_warnings => 1 } ); print 'Rb: ', hexdump( $Rb, { suppress_warnings => 1 } ); print 'Rc: ', hexdump( $Rc, { suppress_warnings => 1 } ); print 'Rd: ', hexdump( $Rd, { suppress_warnings => 1 } ); print 'Re: ', hexdump( $Re, { suppress_warnings => 1 } ); print 'Rx: ', hexdump( $Rx, { suppress_warnings => 1 } ); printf "Rb = 0x%x\t Re = 0x%x\n",$Rb, $Re;
which displays
Rm: 0x0000 : 30 78 41 41 41 41 41 41 41 41 00 00 00 00 00 00 : 0xAAA +AAAAA...... Rb: 0x0000 : 32 38 36 33 33 31 31 35 33 30 00 00 00 00 00 00 : 28633 +11530...... Rc: 0x0000 : AA AA AA AA 00 00 00 00 00 00 00 00 00 00 00 00 : ..... +........... Rd: 0x0000 : 2D 31 34 33 31 36 35 35 37 36 36 00 00 00 00 00 : -1431 +655766..... Re: 0x0000 : 2D 31 00 00 00 00 00 00 00 00 00 00 00 00 00 00 : -1... +........... Rx: 0x0000 : FF FF FF FF 00 00 00 00 00 00 00 00 00 00 00 00 : ..... +........... Rb = 0xaaaaaaaa Re = 0xffffffffffffffff

Krambambuli
---

In reply to Re: Implement Arithmetic Shift Right for signed number in perl by Krambambuli
in thread Implement Arithmetic Shift Right for signed number in perl by IamAwesom3

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • Outside of code tags, you may need to use entities for some characters:
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.
  • Log In?
    Username:
    Password:

    What's my password?
    Create A New User
    Chatterbox?
    and the web crawler heard nothing...

    How do I use this? | Other CB clients
    Other Users?
    Others musing on the Monastery: (3)
    As of 2014-09-22 00:27 GMT
    Sections?
    Information?
    Find Nodes?
    Leftovers?
      Voting Booth?

      How do you remember the number of days in each month?











      Results (176 votes), past polls