Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

Re: Implement Arithmetic Shift Right for signed number in perl

by Krambambuli (Curate)
on Apr 23, 2013 at 08:36 UTC ( [id://1030071]=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    #!/usr/bin/perl
    
    ...
    print 'Rx: ', hexdump( $Rx, { suppress_warnings => 1 } );
    
    printf "Rb = 0x%x\t Re = 0x%x\n",$Rb, $Re;
    
  2. or download this
    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......
    ...
    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
    

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others imbibing at the Monastery: (3)
As of 2024-04-26 03:47 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found