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.
please tell me how to subtract a binary A by 3 (A-3) in the best way ( except the way that using a subtract block from FA to have the result)
thanks a lot !!!
Are you talking about programming A-3 (A being a binary number of n bits and 3 being 00....011) in a HDL?
Is the subtract block you're talking about, something like a Xilinx coregen block?
As Iouri suggested, the '-' operator in HDL (such as Verilog or VHDL) is easy to use, and usually generates well-optimized logic for your target device. The results will probably be as small and fast as anything you create yourself.
you can do A + 1's complement of B + 1 if A > B
it will give output = A-B
in ur case B is 3 (0011), so take 1's complement of it and follow the process....
that you can do using full adder.......
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.