OK this is a quick video on Heming coats and we're going to just take an example 0 1 1 0 1 0 1 is just
an example and random number is 1 2 3 4 5 6 7 8.
These are our positions what we're going to do is we're going to put this into something else.
What I mean to say is we're going to every 2 to the end position.
So that's two to zero is 1 2 2 2 Sorry 2 to 1 is 2 2 2 3 8 and 2 to 4 and you can keep going is 16 and
you get the idea.
So we're going to knock in this.
We're going to pretend that's missing.
We're going with him.
This is missing the four position the eight.
Is this an exception.
We'll fill in the details except those excepting those.
So that's going to be zero.
And then we're going to have 1 1 1 because I'm using this over here 0 1 0 1 0 1 that's the details with
the axes in there we have to figure out what those Xs are because if we can figure it out then we can
and this is our code instead and this is going to ensure that we can detect errors.
OK so we're taking this message right here and we are converting it to this.
Now we have to figure out what's in the 8 because Ishan the four position two position in one position.
That's our job right now.
So let's do it.
And the way we're going to do it is we're going to do a little counting on the side over here.
OK.
So now that we set this up and these are X's Let's go and figure out what he want is some people do.
I'm calling it p 1 2 3 1 2 4 8 but we start at position 1 and this one and we go and call that X. Then
we do 1 skip 1 so we go to 3 0.
Then we do 1 skip 1.
So skip this and go to one that's from there and then do one skip one and go to seven which is a 1 9
0.
11 is a zero.
We figure out the parity of this which is 2.
So that's going to be a zero.
That means that X is going to be a zero and we'll do that in a second.
Now for two we do two skip to position two and three is x 0 skip to do 2 6 7 that's 1 1 skip to do 2
1 0.
The parody of this is 1.
And so that X is going to be a 1.
So for four we do x 1 1 1 x 1 1 1 then we skip 4 1 2 3 4 and then we put what's next right.
We did four we skipped four then we get to 12.
And that's a one in the parody over there is zero.
And now we do the eighth.
So we started eight position eight and then we do up until we can't go anymore.
In this case.
So that would be x 0 1 0 1 which is zero.
So we now know once again we started each position we started 1 2 4 8.
And then we go and we figure it out this way do 1 skip 1 due to skip to do force 4 to 8 skip 8.
Now what we're going to do is we're going to replace these Xs with the numbers that they should be.
So the numbers that we found that they should be are 0 1 0 0 0.
Now if we wanted to if we sent a message this would be the message we send we send it with three extra
bits just quite good.
We sent three extra bits and those extra bits will protect that.
Now you say what if there's an error.
Well let's see.
Let's check.
He won p to p for MP A.
Let's see what happens.
Now if we were to do the same procedure to undo it we should get the same.
Everything should work out.
So let me just show you for instance P1 would be zero.
And I go to the 3 0 going to go to the 5 1 7 1 9 0 11 0 that all together is zero that matches this
bit.
OK.
OK so now let's change this around.
Just a drop and I will erase this evening and I will make a mistake right here.
That was a zero.
That was a 1.
I'm going to put a zero there and I'm going to do the same thing.
OK.
So what I'm going to do now is just calculate if it were correct if it were correct.
You do exactly what it's supposed to be.
You do know for the P1 you do a 1 to 3 5 7 9 11.
You add those up and you take the parity and that should give you zero.
It should be that these will all be zero if you got the message correct.
So if the message is correct then you do the parity the same way you did it before.
You'll get that for the 2 for the two of course you do two three.
Any of those six seven eight nine 10 11 for the four you do four through seven.
Then you skipped four.
And they do that in the eight you do from there.
So that's probably entirely unclear.
But we're going to do an example now showing what happens when we make mistakes.
OK so if we make a mistake you'll get a prompt you'll have a problem.
I'm going to change the seven and I'm going to put in there a 0 instead.
So let's calculate what's going to happen.
OK.
So the one I add that I get at 0 0 5 is 1 7 is now 0 9 0 11 0.
I get a one problem one should be getting zeroes P2.
I do two three then four or five skips six seven to that eight nine skipped 10 11 and there I get a
one again problem for I do four five six seven.
I get that's 0 1 1 0.
And then I go and I skip four then I do the 12.
And again I get a 1 problem that eats I do 8 9 10 11 12 and I get a 0 so that one's OK.
Now since I messed up the one the two and the four I can add the 1 2 and 4 together and I get seven.
That means that's where my error is.
So you can see that that's where the error was because that's the bit we changed so that would give
you the ability to fix that and change it.