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.
unless B is a proper 2^n, where, n is a positive number, you will have to do a divison.
Division can be performed by repetitive subtraction and comparison. Very simple but very time consuming.