I'm supposed to get a 4-digit number from the user, convert it to binary (and hex), then print it out.

I have absolutely no idea where to start. I know the algorithm; taking the number, diving it by 2, repeat until the number reaches 0 and the remainders of everything from bottom up is the number in binary (same with diving by 16 for hex).

I have a little pseudo-code for the binary conversion part:

```
while number > 0
mov number, eax
mov ebx, 2
divide ebx
mov binary, edx ;Remainder
mov number, eax ;Quotient
```

(Courtesy of help from another forum)

Despite knowing what I want to do , I have no idea how to implement it into assembly (intel 80186). Can anyone please help? I'm urgently needing a solution. I've googled this beforehand too but could not find an appropriate solution.

Thanks in advance!