I'm just learning about binary and bytes. I understand that 8 bits make up a byte and that a byte can have 256 possibilities. The thing I am confused about is this:
byte[] b = new byte[] { 85, 85, 67, 75 };
What does 85 or any of the numbers above have to do with binary. There is simply something not fully clicking in my mind.
Binary is how things are stored inside the computer. Ones and zeros, on and off, true and false, the presence or absence of an electric current. This Wikipedia article gives it a fairly thorough treatment.
A representation like "85" in your example is how a byte is formatted for our convenience as human readers. It could be formatted in hexadecimal (base 16) as "55", in octal (base 8) as "125" in binary as "1010101", or even "11" in base-84 if you were so inclined. All mean the same thing.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With