summaryrefslogtreecommitdiff
path: root/761/CH9/EX9.6
diff options
context:
space:
mode:
authorpriyanka2015-06-24 15:03:17 +0530
committerpriyanka2015-06-24 15:03:17 +0530
commitb1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b (patch)
treeab291cffc65280e58ac82470ba63fbcca7805165 /761/CH9/EX9.6
downloadScilab-TBC-Uploads-b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b.tar.gz
Scilab-TBC-Uploads-b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b.tar.bz2
Scilab-TBC-Uploads-b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b.zip
initial commit / add all books
Diffstat (limited to '761/CH9/EX9.6')
-rwxr-xr-x761/CH9/EX9.6/9_6.sce13
1 files changed, 13 insertions, 0 deletions
diff --git a/761/CH9/EX9.6/9_6.sce b/761/CH9/EX9.6/9_6.sce
new file mode 100755
index 000000000..90ee7ed7d
--- /dev/null
+++ b/761/CH9/EX9.6/9_6.sce
@@ -0,0 +1,13 @@
+clc;
+// page no 358
+// prob no 9.6
+m=21;
+// The correct number of check bits is the smallest number that satisfy the equation 2^n >= m+n+1;
+for n=1:1:10 // we choose range of 1 to 10
+ a=m+n+1;
+ b=2^n;
+ if(b>=a)
+ disp(n,'hammming bits are required')
+ break;
+ end
+end \ No newline at end of file