We're on course two module four endianness.
Endianness refers to how we interpret the byte order.
Big endian is interpreted from left to right.
The way we would normally read something little Endian is interpreted
from right to left, which is not how we're used to reading data but
we must be careful to make sure that we're interpreting the bites correctly
because if we interpret a value that's supposed to be little endian and
we interpreted big Endian or vice versa, we're going to get vastly different
numeric values as we can see here in our slide we have a hexi decimal value
down there which is four bytes lung which would be a double word 32 bits.
And if we interpret it big Endian
we get a value of 723004625.
Now to convert that big Endian value two little
Endian in big Endian it's 2B 18 2C D1 read left to right.
If we read it right to left It is D1 2C 18 2B.
This is important because right now big Endian 2B would be
the most significant value.
And we know if we that were assigned integer and
we were looking at it and we were interpreting it big Endian.
That farthest left nipple of two would mean that it was not a negative value.
But if we're interpreting that value little Endian and
it's assigned integer D1 now becomes our most significant byte and
our most significant nibble becomes D.
Which is greater than eight which would mean that we would have a negative value
and it would be a vastly different number, interpreted little Endian.
If it were assigned integer it would be a negative number but
even not being assigned integer.
When we interpret it as little Endian, the most significant byte becomes D1.
And the next byte would be to 2C 18 2B.
And we can see the difference in our values between the value of
interpreting that big Endian versus interpreting that little Endian.
This is something we really want to be careful of.
When we're reading data from disk, whether it's supposed to be interpreted big
Endian or a little Endian to talk properly interpret this data, we gotta know
how the operating system or the file system is going to interpret the data.
Intel processors process little Endian intel
processors tend to read a little Endian.
For the most part,
there are some exceptions which we will talk about throughout the path.
Motorola processors interpret things in big Endian again with some exceptions.
And our next course we're going to start talking about more of the data on disk.
We're going to start talking about how we would interpret our
dis structure itself and disk partition scheme is