Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
PerlMonks  

Re: Implement Arithmetic Shift Right for signed number in perl

by Krambambuli (Deacon)
on Apr 23, 2013 at 08:36 UTC ( #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
Node Status?
node history
Node Type: note [id://1030071]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others browsing the Monastery: (5)
As of 2014-08-02 04:53 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Who would be the most fun to work for?















    Results (54 votes), past polls