summaryrefslogtreecommitdiff
path: root/45/CH10/EX10.2/example_10_2.sce
diff options
context:
space:
mode:
Diffstat (limited to '45/CH10/EX10.2/example_10_2.sce')
-rwxr-xr-x45/CH10/EX10.2/example_10_2.sce17
1 files changed, 17 insertions, 0 deletions
diff --git a/45/CH10/EX10.2/example_10_2.sce b/45/CH10/EX10.2/example_10_2.sce
new file mode 100755
index 000000000..6994f5600
--- /dev/null
+++ b/45/CH10/EX10.2/example_10_2.sce
@@ -0,0 +1,17 @@
+//example 10.2
+clc;
+clc
+c=128; // given counters
+d=32;
+e=64;
+fc=log2(c);//making necessar calculations
+fd=log2(d);
+printf('A mod-128 conter should have %d flipflops\n', fc);
+printf(' A mod-32 conter should have %d flipflops\n', fd); //displaying the results
+fe=log2(e);
+n=2^fe - 1 ;
+printf(' The largest decimal no that can be stored in a mod-64 counter is %d',n);
+
+
+
+