diff options
Diffstat (limited to '1332/CH1/EX1.10')
-rwxr-xr-x | 1332/CH1/EX1.10/1_10.pdf | bin | 0 -> 6220 bytes | |||
-rwxr-xr-x | 1332/CH1/EX1.10/1_10.sce | 21 |
2 files changed, 21 insertions, 0 deletions
diff --git a/1332/CH1/EX1.10/1_10.pdf b/1332/CH1/EX1.10/1_10.pdf Binary files differnew file mode 100755 index 000000000..6d388d1f5 --- /dev/null +++ b/1332/CH1/EX1.10/1_10.pdf diff --git a/1332/CH1/EX1.10/1_10.sce b/1332/CH1/EX1.10/1_10.sce new file mode 100755 index 000000000..8b6535023 --- /dev/null +++ b/1332/CH1/EX1.10/1_10.sce @@ -0,0 +1,21 @@ +//Example 1.10
+//Conversion to Binary System and to Base N
+//Page no. 9
+clc;close;clear;
+
+b=dec2bin(oct2dec('1753'))
+disp(b,'Binary form of 1753 is ='); //inbuilt function
+b=dec2hex(oct2dec('1753'))
+disp(b,'Hexadecimal form of 1753 is ='); //inbuilt function
+//conversion from octal to binary
+b=dec2bin(hex2dec('A478'))
+disp(b,'Binary form of A478 is ='); //inbuilt function
+b=dec2oct(hex2dec('A478'))
+disp(b,'Octal form of A478 is ='); //inbuilt function
+//conversion from octal to binary
+s=dec2bin(oct2dec('3'));
+s1=dec2bin(oct2dec('154')); //inbuilt function
+printf('\n Octal form of 3.154 is = \n\n %s.00%s',s,s1)
+s=dec2hex(oct2dec('3'));
+s1=dec2hex(oct2dec('154')); //inbuilt function
+printf('\n\n Hexadecimal form of 3.154 is = \n\n %s.%s',s,s1)
\ No newline at end of file |