How exactly does binary code work? - José Américo N L F de Freitas
Log in
YouTube
by
MichaelaMJsEnglish
Imagine trying to use words to describe every scene in a film,
every note in your favorite song,
or every street in your town.
Now imagine trying to do it using only the numbers 1 and 0.
Every time you use the Internet to watch a movie,
listen to music,
or check directions,
that’s exactly what your device is doing,
using the language of binary code.
Computers use binary because it's a reliable way of storing data.
For example, a computer's main memory is made of transistors
that switch between either high or low voltage levels,
such as 5 volts and 0 volts.
Voltages sometimes oscillate, but since there are only two options,
a value of 1 volt would still be read as "low."
That reading is done by the computer’s processor,
which uses the transistors’ states to control other computer devices
according to software instructions.
The genius of this system is that a given binary sequence
doesn't have a pre-determined meaning on its own.
Instead, each type of data is encoded in binary
according to a separate set of rules.
Let’s take numbers.
In normal decimal notation,
each digit is multiplied by 10 raised to the value of its position,
starting from zero on the right.
So 84 in decimal form is 4x10⁰ + 8x10¹.
Binary number notation works similarly,
but with each position based on 2 raised to some power.
So 84 would be written as follows:
Meanwhile, letters are interpreted based on standard rules like UTF-8,
which assigns each character to a specific group of 8-digit binary strings.
In this case, 01010100 corresponds to the letter T.
So, how can you know whether a given instance of this sequence
is supposed to mean T or 84?
Well, you can’t from seeing the string alone
– just as you can’t tell what the sound "da" means from hearing it in isolation.
You need context to tell whether you're hearing Russian, Spanish, or English.
And you need similar context