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.
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.