From b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b Mon Sep 17 00:00:00 2001 From: priyanka Date: Wed, 24 Jun 2015 15:03:17 +0530 Subject: initial commit / add all books --- 752/CH9/EX9.2/9_2.sce | 7 +++++++ 752/CH9/EX9.6/9_6.sce | 13 +++++++++++++ 2 files changed, 20 insertions(+) create mode 100755 752/CH9/EX9.2/9_2.sce create mode 100755 752/CH9/EX9.6/9_6.sce (limited to '752/CH9') diff --git a/752/CH9/EX9.2/9_2.sce b/752/CH9/EX9.2/9_2.sce new file mode 100755 index 000000000..cd4e4a1c0 --- /dev/null +++ b/752/CH9/EX9.2/9_2.sce @@ -0,0 +1,7 @@ +clc; +// page no 349 +// prob no 9.2 +Nd=7; N_start=1; N_stop=1; N_parity=1; +Nt= Nd + N_start+ N_stop + N_parity; +efficiency=Nd/Nt *100; +disp('%',efficiency,'The efficiency is'); \ No newline at end of file diff --git a/752/CH9/EX9.6/9_6.sce b/752/CH9/EX9.6/9_6.sce new file mode 100755 index 000000000..90ee7ed7d --- /dev/null +++ b/752/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 -- cgit