How about repetitive subtraction. The code will very simple and short because you only need to subtract from a single byte. Rgds, Reggie ---------- > From: Amey Deosthali > To: PICLIST@MITVMA.MIT.EDU > Subject: 8-bit/8-bit divide > Date: Thursday, March 19, 1998 6:27 AM > > Hi, > > I was wondering whether there is any efficient way of implementing an > 8-bit by 8-bit divide. My dividend is smaller than the divisor (always). > Both are positive numbers. The dividend is in the range 0-128 and the > divisor is in the range 0-256. The only way I know of is to implement it > as a 16-bit by 8-bit divide. But that takes 192 instructions which is a > lot for my application. > > Does anyone have any better idea how to do it? > > Thanks in advance, > Amey > > ---------------------------------------------------------------------------- --- > AMEY A. DEOSTHALI > ---------------------------------------------------------------------------- --- > Lab Address: Home Address: > ESPL, ENS526E 3110 Red River, Apt # 208 > Dept. of ECE Austin, TX 78705 > University of Texas at Austin, Tel:(512)-499-8957 > Austin, TX 78712 - 1084. > Tel:(512)-232-2769 > Email:amey@vision.ece.utexas.edu > Web :http://anchovy.ece.utexas.edu/~amey > ---------------------------------------------------------------------------- ---