Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
PerlMonks  

Re: hexadecimal division

by bart (Canon)
on Dec 17, 2017 at 16:19 UTC ( #1205741=note: print w/replies, xml ) Need Help??


in reply to hexadecimal division

Here's your error:
$result2 = int(ord($dividend)/ord($divisor)); print sprintf("%02X ", ord($result2)) . "\n";
You get the result as an integer (= 0), but you treat it as a character (="0").

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others pondering the Monastery: (3)
As of 2021-10-20 12:26 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    My first memorable Perl project was:







    Results (81 votes). Check out past polls.

    Notices?