http://qs321.pair.com?node_id=1205741


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").