diff options
author | priyanka | 2015-06-24 15:03:17 +0530 |
---|---|---|
committer | priyanka | 2015-06-24 15:03:17 +0530 |
commit | b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b (patch) | |
tree | ab291cffc65280e58ac82470ba63fbcca7805165 /848/CH8/EX8.7 | |
download | Scilab-TBC-Uploads-b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b.tar.gz Scilab-TBC-Uploads-b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b.tar.bz2 Scilab-TBC-Uploads-b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b.zip |
initial commit / add all books
Diffstat (limited to '848/CH8/EX8.7')
-rwxr-xr-x | 848/CH8/EX8.7/Example8_7.sce | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/848/CH8/EX8.7/Example8_7.sce b/848/CH8/EX8.7/Example8_7.sce new file mode 100755 index 000000000..c54b4199a --- /dev/null +++ b/848/CH8/EX8.7/Example8_7.sce @@ -0,0 +1,26 @@ +//clear//
+//Caption: Program to find CRC(Cyclic Redundancy Check)
+//Example8.7
+//page 308
+clear;
+clc;
+close;
+x = poly(0,'x');
+m = [1,1,1,1,0];
+G = x^7+x^6+x^5+x^4+0+0+0+0;
+D = x^3+0+x+1;
+[R,Q] = pdiv(G,D)
+R = coeff(R);
+Q = coeff(Q);
+R = abs(modulo(R,2));
+Q = abs(modulo(Q,2));
+disp(R,'Remainder R =')
+disp(Q,'Quotient Q =')
+disp([m R],'CRC for the given information CRC =')
+//Result
+//Remainder R =
+// 1. 0. 1.
+//Quotient Q =
+// 1. 1. 0. 1. 1.
+//CRC for the given information CRC =
+// 1. 1. 1. 1. 0. 1. 0. 1.
|