00:01
In this problem, our job is to generate the crc code for the given data word using the given divisor.
00:10
So we will start by noting that the divisor has five bits.
00:17
So we want to add 5 minus 1 or 4 zeros to the end of our data word.
00:31
So the data word we're going to be working with is the given data word.
00:38
So we will have the same data word here, but we will add four zeros to the end of that data word.
00:53
So we want to work with this, and we want to take the given divisor and divide it into this data word with the four zeros appended on the end.
01:06
Now in terms of dividing, we're going to use the exclusive or operation.
01:10
So exclusive or, when applied to two zeros, produces a zero.
01:14
False, exclusive or false is false.
01:18
Exclusive or applied to two ones is also zero because exclusive or says exactly one of the two must be true but not both.
01:26
Whereas if we have zero with one or one with zero, exclusive or returns a one for true.
01:33
So using that, we will do the long division except we're actually doing exclusive or.
01:39
So let's take our divisor, our one zero, one zero one, and using exclusive one, we will divide it into the data word with the four zeros on the end.
01:54
What we're really interested in is the remainder that we get.
02:00
So we start by dividing, if you will, our 1 -1101 into 11001.
02:08
So we have a 1.
02:10
We will bring down.
02:12
We will multiply that times our 1 -0 -101.
02:15
Bring that down.
02:17
And now, instead of subtracting, let's do the exclusive or function.
02:20
So starting with the right most bits there, one exclusive or one gives zero or false.
02:30
Zero exclusive or zero gives us zero.
02:34
Zero exclusive or one is one.
02:37
And one exclusive or zero is one.
02:40
And of course we have the one exclusive or one at the leftmost bits will be zero.
02:48
So now we continue the process.
02:51
We bring down our next bit.
02:53
That's a zero.
02:53
So let's put that here.
02:56
We say 1 -0 -101 goes into this 11 -0 -0 -1 time.
03:02
So we have once again our 1 -0 -1.
03:08
We will do exclusive ore.
03:10
We will continue this process until we get a remainder.
03:16
So now exclusive ore produces 1 -0 -1.
03:23
So let's bring down the next bit.
03:26
This one comes down here.
03:28
So we have a one here at the top.
03:31
Let's see if i can squeeze that in there.
03:34
So again, we multiply 1 times 1 .101.
03:39
Do another exclusive or and get 0 -1 -1 -1.
03:47
We bring down the next bit, the 0.
03:49
We have our 1 here.
03:55
And so once again, we bring down the divisor 1 -0 -1.
04:02
Perform exclusive or...