I am still learing this
Binary or Base-2 number which uses only 1 and 0 to represent different ASCII chrachters.
Like for representing "H" which corresponds to number "72" in ASCII , the Binary for it is "01001000".
Bit | 0 | 1 | 0 | 0 | 1 | 0 | 0 | 0 |
---|---|---|---|---|---|---|---|---|
Power of 2 | 2^7 | 2^6 | 2^5 | 2^4 | 2^3 | 2^2 | 2^1 | 2^0 |
Just like base-10 , in base-2 we start with taking digit in ones place as 2^0 and add the powers to 2 to get the ASCII number.
0x2^7 + 1x2^6 + 0x(2^5 + 2^4) + 1x2^3 + 0x(2^2 + 2^1 + 2^0)
Adding the above gives "72", which means "H" in ASCII.