mIRC Homepage
Posted By: pouncer multiplying/modulating hexadecimal/decimal - 12/10/09 08:54 PM
(0x0E79A9C1 * temp) % 0x7FFFFFFF;

where temp is a decimal number (example 706169324)

How could I possibly do that in mirc and get a hexadecimal result?
convert using $base
Code:
//echo -a $base($calc((0x0E79A9C1 * temp) % 0x7FFFFFFF),10,16)
Posted By: argv0 Re: multiplying/modulating hexadecimal/decimal - 12/10/09 11:44 PM
you need to $base the hex into base-10 before using $calc.

//echo -a $base($calc(($base(0E79A9C1,16,10) * temp) % $base(7FFFFFFF,16,10)),10,16)
had the right idea.
Posted By: s00p Re: multiplying/modulating hexadecimal/decimal - 13/10/09 05:24 AM
The answers should all be in his head by now. He either doesn't want to learn, or he's not thinking/reading as much as accurately as he needs to be. If you're willing to practically write an entire MSNP11 implementation in mIRC, go for it, but I'd advise letting him do it himself, because otherwise he's not learning.

pouncer: convert base 16 to base 10 the same way that you convert base 10 to base 16.
thanks guys
© mIRC Discussion Forums