Is there any quick way to do Multiplication and Division,
in Hexadecimal, just like in Decimal,
only with my hands and brain, without the calculator ?
Posted on 2005-11-08 23:04:36 by iNeedSpeed
Maybe it is difficult.

Does anyone know, how to deal with the multiplication or division without convert the operands to Decimal.

There are so many numbers in the computer expressed in Hex.
So i think there must be some easy way to do the calculation without converting them to Decimal.
Posted on 2005-11-09 02:35:37 by iNeedSpeed
Why not use a calculator?

But on the other side... You can use all of your numbers inside your source in decimal. And do the math according to that. The fact that the computer changes them into Hex should be a non issue.
Posted on 2005-11-09 06:16:48 by JimmyClif
Well actually you CAN multiply and divide hex numbers just like decimal numbers. It may seem strange on first few tries, but it's possible.

I believe there are more sophisticated 'algorithms', though. Try googling for them.
Posted on 2005-11-09 07:31:03 by ti_mo_n
Rubbish, maybe if you're the Rainman you can. Show me a page where dividing or multiplying of hex numbers happens without converting them to another number base.
Posted on 2005-11-09 07:59:44 by JimmyClif
Many math forums, for example. Review the way you're doing multiplication in decimal format. Then treat hex numbers just like decimal numbers with few more digits.

As i've said: it takes time to get used to it. My maths doctor has showed once how he does add/sub/mul/div in decimal/hex/binary on the fly.
Posted on 2005-11-09 08:16:35 by ti_mo_n
If you don't want to convert you need to know your Hex times tables
Well decimal times tables for numbers up to 15 X 15 and their hex representation
IE A*A is 64 (10dec * 10dec is 100dec)

Example
F * AA
ĀAA
X ĀF
F * A = 150dec or 96hex
ĀA-
X ĀF
= Ā96
F * A again = 150dec or 96hex
Ā AA
X Ā ĀF
= Ā96
+ 960 Ā Ā Ā0+6 = 6 Ā 9+6 = 15dec or F hex 9+nothing = 9
= 9F6

One more example
16 * CD Ā (in dec 22 * 205)

Ā ĀCD
X Ā16 Ā Ā Ā Ā Ā6*D = 4E Ā6*C = 48 Ā 480 + 4E = 4CE

Ā Ā CD
X Ā 1- Ā Ā Ā Ā Ā1*D = D Ā 1*C = C ĀC00 + D0 = CD0
= Ā 4CE
+ Ā CD0 Ā Ā Ā 0+E = E ĀC0 + D0 = 190 400+C00 = 1000

final answer is Ā119E Ā Ā Ā Ā Ā Ā E + 190 + 1000 = 119E

Hope that helps you

Posted on 2005-11-09 10:29:30 by r22
Right , it is just out of the common???