Help me understand bitwise operation "Complement to one"

 
Could anyone please help me understand what these guys mean by this definition

Bitwise Operations

Complement to One

Complement of the variable value up to one. The value of the expression contains 1 in all digits where the variable value contains 0, and 0 in all digits where the variable contains 1.

b = ~n;

Example:

   char a='a',b;
   b=~a;
   Print("a = ",a, "  b = ",b);  
// The result will be:
// a = 97   b = -98


I have a couple factors I find confusing. But I'll take them one question at a time

1.) How did char a turn to 97, seeing that 97 was never mentioned in the code? Also how did b turn to -98? I thought "~" was supposed to increase by one?

I know these questions must sound dumb to a lot of people, but if you could please provide a better definition Ryan what's on ground already it'd mean a lot

Thanks
 
holocast:
...
  1. 97 is the character code of 'a'.

  2. In binary (base 2) notation, a char being 8 bits : 97 (decimal)  is 01100001 (binary).

  3. In binary, complement to one of 01100001 is 10011110.

  4. And as char is a signed type binary 10011110 in decimal is -98 (first 1 means it's a negative number so was start from -128, 11110 is 30, -128+30=-98)
Windows-1252 - Wikipedia
Windows-1252 - Wikipedia
  • en.wikipedia.org
Windows-1252 MIME / IANA Language(s) Created by Standard Classification Extends Transforms / Encodes It is probably the most-used 8-bit character encoding in the world. As of October 2018[update], 0.7% of all web sites declared use of Windows-1252,[1][2] but at the same time 3.6% used ISO 8859-1,[1] which by HTML5 standards should be...
 
Alain Verleyen:
  1. 97 is the character code of 'a'.

  2. In binary (base 2) notation, a char being 8 bits : 97 (decimal)  is 01100001 (binary).

  3. In binary, complement to one of 01100001 is 10011110.

  4. And as char is a signed type binary 10011110 in decimal is -98 (first 1 means it's a negative number so was start from -128, 11110 is 30, -128+30=-98)
Thanks a lot that really cleared things up.