diff options
Diffstat (limited to '273/CH25/EX25.14/ex25_14.sce')
-rwxr-xr-x | 273/CH25/EX25.14/ex25_14.sce | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/273/CH25/EX25.14/ex25_14.sce b/273/CH25/EX25.14/ex25_14.sce new file mode 100755 index 000000000..f4691d9b4 --- /dev/null +++ b/273/CH25/EX25.14/ex25_14.sce @@ -0,0 +1,10 @@ +clc;clear;
+//Example 25.13
+//conversion of binary to decimal
+
+//given values
+X=10.101;//binary number
+
+//calculation
+Z=(1*2^1)+(0*2^0)+(1*2^-1)+(0*2^-2)+(1*2^-3);
+disp(Z,'decimal equivalent of the given binary number is')
|