|
|
|
![]() |
|
|||||||
|
||||||||
|
|
Thread Tools | Rate Thread | Display Modes |
|
#4
|
|||
|
|||
|
Re: How does division work?
If you need the extra places the most efficient way to do it will be to bit shift the dividend, and remember that any time you need to do a calculation, you need to bit shift the result back. using bit shift instead of multiplying by something like 10 will save you a few clock cycles.
multiplication 8-bit by 8-bit method (if you multiply by an arbitrary value such as 10) see here http://www.dcc.unicamp.br/~celio/mc4...los/mul8x8.asm Program Memory : 14 locations # of cycles : 71 RAM : 5 locations That is a really big waist bit shift method c equivalent x<<1; can be done with the single asm command lrol (load and rotate left) |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| How does it work? | Ryan O | Control System | 5 | 12-03-2006 19:15 |
| How does Nationals work? | coldfusion1279 | Championship Event | 29 | 30-03-2005 16:47 |
| How Does a Winch Work? | Aaron Lussier | Technical Discussion | 23 | 20-01-2004 21:14 |
| how does crab drive work? | Soukup | Technical Discussion | 13 | 25-04-2003 11:31 |
| How does Nationals work?? | LunchBox | Championship Event | 16 | 18-03-2003 15:55 |