Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Binary division

Status
Not open for further replies.

Drone38

Programmer
Apr 12, 2000
29
0
0
BE
Can anybody give me a way to divide 2 numbers without using the DIV function,<b> but just by shifting</b>???
 
Right shifting will divide a binary # by 2.<br>You can also do division with multiple subtractions:<br>13 / 3 can be done by:<br><br>13 - 3 = 10<br>10 - 3 = 7<br>7 - 3 = 4<br>4 - 3 = 1<br><br>Since you had to subtract 4 times before you got a number less than the 3, the answer is 4 with 1 remainder. Basic math. <p> <br><a href=mailto:Kim_Christensen@telus.net>Kim_Christensen@telus.net</a><br><a href= Page</a><br>
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top