Why the heck are you using DIV to divide by two? Why not shift the number one place to the right instead: http://en.wikibooks.org/wiki/X86_Assembly/Shift_and_Rotate
] - and that's ignoring that you don't need to divide by two in the first place...
A single bit shift right is a divide by 2, and single shift left is a multiply by two.
But the description of your homework and the code you show us do not match in any way that I can see!
If you are converting from a string to a binary number, then the most obvious way is to loop through the ASCII digits from the most significant (left-most) to the least significant (right-most), converting each to a number (by subtracting 30h), multiply the current total by ten, and adding the digit number.
Since this is your homework, I'll give you no code.