so in this video I want to show you an
example of exactly how information is
encoded on a real network link so this
is a setup that I put together have my
my computer here connected to an
Ethernet network and I've stripped away
the Ethernet cable like this and so if
we look inside the cable we can see
there's like four pairs of wires there's
an orange pair a blue pair a brown pair
and a green pair and now in this setup
the other end of this cable is connected
to a 10 base T and base T Network which
is a particular standard that's
developed by the high triple e the I
Triple E is the Institute for Electrical
and Electronics Engineers and 10 base T
is kind of an older standard that allows
you to transmit data at 10 megabits per
second 10 megabits per second which is
how we write this which is 10 million
bits per second which may sound like a
lot but the same Ethernet port on my
computer also supports a couple other
standards 2 ports 100 base
100 bass TX which allows you to send
data at 100 megabits per second and it
also supports 1000 base T which lets you
transmit data ad at one gigabit per
second or 1 billion bits per second but
for this experiment I'm going to use 10
base T because it's a relatively basic
uses of belt relatively basic line
coding mechanism which is Manchester
encoding which we which we saw in the
last video these other two standards are
a bit more complex so for this video and
for this demonstration I just want to
use this this sort of relatively simpler
standard so of these of these three
standards I guess the 1000 base T the
one gigabit or Gigabit Ethernet standard
is the only one that actually uses all
four pairs of wires in here the other
two standards only use two pairs so from
the computers perspective the orange
pair in this case is used for
transmitting data in this direction and
the green pair is used for receiving
data and then the blue and the and the
brown pairs are unused so what I've done
here is stripped away a little bit of
the insulation on the orange pair and
from the I guess the two different wires
here on the orange pair and connected an
oscilloscope which is this thing here
I've connected this oscilloscope to to
the to the orange pair to see exactly
what's going on and what the
oscilloscope does is it measures the
voltage across the two wires and orange
pairs and it plots that voltage over
time on this graph and so here we can
see the voltage seems to be going up and
down a lot over time so if I scroll down
here what I've done is taken a
screenshot from the oscilloscope so we
can look at this in a bit more detail
okay so to orient you with what's going
on here the center line here across the
middle is zero volts and this key here
is telling us that each division is 500
millivolts
so this is 500 millivolts this is 500
millivolts per division which means two
divisions is going to be one volt and
then down here this is going to be
negative one volt and so what we can see
is that the signal is fluctuating
between positive one volt and negative
one volt positive 1 volt negative one
volt and so on now in the horizontal
direction this is telling us that each
division represents 100 nanoseconds so
from you know here to here for example
is 100 nanoseconds and just to remind
ourselves 1 nanosecond is equal to 10 to
the minus 9 seconds and if we I guess we
can multiply both sides of this by 100
to see that 100 nanoseconds is equal to
10 to the minus 7 seconds or another way
to look at this is to say that 100
nanoseconds is equal to 1 over 10 to the
7 seconds or you could also write that
as 1 over 10 million seconds or one
ten-millionth of a second there another
way to think of this is that basically
each of these divisions is is one ten
millionth of a second or in other words
you're going to have ten million of
these divisions per second and if you
remember the speed of this Ethernet link
is ten megabits per second and so 10
megabits per second is 10 million bits
per second and so we're basically going
to expect to see 10 million you know one
bit every hundred nanoseconds so this is
a very convenient division here we
should be able to find one bit per per
division and so what's going on here is
we're using the the same Manchester
encoding that we saw the last time and
so the the signal looks a little bit
different but really what's going on is
we have the same symbols where the
symbol for a zero is a voltage
transition from a positive voltage to a
negative voltage and then the symbol for
one is a transition from a negative
voltage
to a positive voltage and so these these
symbols are happening at this at this
Center time here where that voltage
transition is taking place and so if we
want to we can just start looking at the
at this signal and see if we can see
some of these patterns here so right
here for example we see a voltage
transitioning from a negative voltage to
a positive voltage right here and so
that would indicate that that is a 1 and
then if we go another hundred nano
seconds we see that same transition from
a negative voltage to a positive voltage
and that means that's another one so
we're going from negative to positive
and so here in the middle we have this
transition going back down from positive
to negative but because that's not
happening 100 nano seconds apart we we
know to ignore that because we know that
the link speed is 100 megabits per
second which means we should expect a
symbol per 100 nanoseconds so even if
our clock is a little bit off we should
be able to tell the difference between
50 nanoseconds 100 nanoseconds and so if
we keep going now we get to a transition
where we're going from a positive
voltage to a negative voltage and that's
a zero and here we're going from
negative to positive so that's a 1
positive to negative is a 0 positive to
negative again is a 0 negative to
positive is a 1 and positive to negative
is a 0 and so here we've weaving we've
decoded 8 bits and 8 bits makes a byte
and so we've we've decoded a byte of
information from from this Ethernet but
if we want to want to we can keep going
I've taken another screenshot and just
kind of appended it here and lined it up
so so it all lines up perfectly and so
if we keep going we see that we get
another looks like a 1 actually right
here followed by a 0 another 0 another 0
another 0 we're going to positive 2
negatives that's a 0 another positive 2
negative which is a 0 and then a
negative 2 positive so this is a 1 and
then a positive 2 negative which is a 0
and so this is another 8 bits or another
bite and so we could keep going but
we've decoded 2 bytes here from from
this Ethernet and one thing that's sort
of
a little bit different about Ethernet is
that the way that it puts these bits
onto the wire in this format it reverses
the order of the bits so in other words
the sort of 128's place is set is that
last and the ones place is sent first so
if we want to convert this to a real
binary number we actually have to flip
all these bits around so the zero goes
first then the 1 then this 0 then this 0
then this one then this 0 and then the 1
and the 1 so we've just flipped these
bits from from first to last and then
the same thing for for this so we start
over here and just go backward 0 1 0 0 0
0 so that's 5 zeros and then finally
this one and if we look at these two
these two bytes here and convert these
to decimal this one if we convert to
decimal we get 75 and this one we get a
65 and this is actually the information
that I was trying to send on on my
Ethernet interface that I that I
captured here and actually if you were
to use that ASCII table that we looked
at a couple videos ago 75 is stands for
the letter K and 65 stands for the
letter A and this is exactly the data I
was trying to send so this gives you
just kind of a sense of how information
is is actually encoded on real Ethernet
link