We already written a program for the two’s complement using C-Programming. This program is a combination of many user defined functions. This flow chart is also drawn using functions. Many of us not so clear about drawing flow charts for the functions. So the complete solution is in these flow charts.

And another function with Compl(binary,a) can be written as