Search⌘ K

One's Complement Operator

Explore the one's complement operator in C, which flips binary digits using the tilde symbol. Understand how this unary operator works with examples, and learn how to interpret the resulting decimal and hexadecimal values. This lesson helps you grasp fundamental bitwise operations needed for efficient programming.

What is one’s complement operator?


One’s complement operator converts 1’s in a binary to 0’s and vice versa.


One’s complement is a unary operator represented by tilde, ~, as shown ...