2's complement - you beauty

This is a short write-up two's complement, which, in my humble opinion is one of the great idea to which entire computer industry should be thankful to.

I remember, in my school days when computer science subject was taught without computer, there used to be problems to find binary equivalent of a number.

Binary equivalent of 5 is 0101. (Considering bit length of 4).

On top of this, there used to be problems to find the one's complement of it and two's complement of it.

One's complement of 0101 is 1010 (Simply inverting 1 to 0 ...

View comments.

more ...

GCOV - C/C++ Code coverage testing tool

What is GCOV

  • GCC provides GCOV, code coverage testing tool for C/C++ programs.
  • GCOV identifies the lines of code that got executed while running the program.
  • It also gives additional information like how many times particular line got executed.
  • Also provides information about how many possible branches are there in the code and which branch path got executed more.

Use cases


GCOV identifies the sections in the code that are heavy executed, using which we'll be able to focus on optimizing the parts of the code which are executed often.

Identifying dead code

Any code that got ...

View comments.

more ...