0

Hello, how does division works in nasm assembly language?

I want to get the least important digits from a binary number.

ex: 1001b /10= 100.**1**b. The bold signed one is what i like to get.

Any suggestions?

Further explanation:

What i want to do is convert a binary number into hex.

I have a 16 bit number, and have to convert it to hex (4 digits).

1.Get each bit and convert it to decimal until it's 4 digit long. (ex: 1001=9)

2. Do <1> while the whole number is converted to dec

ex: 1010 1001 1001 1001

10 9 9 9

3.Convert dec to hex: A999

Maybe someone knows a better way of converting bin to hex? Pls do say!