Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

How to divide a binary no. to another binary no. in Assembly

Status
Not open for further replies.

gopalkc

Newbie level 3
Joined
Jul 17, 2004
Messages
3
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
17
16f877

i have some problem while programming in assembly language.
can anyone tell how to divide a binary no. to another binary no. .
multiplication is also a problem too.
:D
 

Re: 16f877

If you want to divide by the base number or multiple, just make a shitf. First shitf divide or mult. by 2, second 4 and so on.

if you want to divide by 5 for example, you can make 2 shift and then substract once.


Is what i did in my proyects :p
 

Re: 16f877

Moved to microcontrollers
 

Re: 16f877

Multiplication and Division are algorithms. You can find many at www.piclist.org Sourcecode section. Note that they take up ALOT of instuction cycles on te 16F877. If you do a lot of multiplication, you may want to consider the PIC18 series which comes with built-in hardware multiplier.
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top