diff options
Diffstat (limited to '2825/CH19/EX19.26')
-rwxr-xr-x | 2825/CH19/EX19.26/Ex19_26.sce | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/2825/CH19/EX19.26/Ex19_26.sce b/2825/CH19/EX19.26/Ex19_26.sce new file mode 100755 index 000000000..aa507e426 --- /dev/null +++ b/2825/CH19/EX19.26/Ex19_26.sce @@ -0,0 +1,17 @@ +//Ex19_26 Pg-970
+clc
+
+
+x=200 //1st input
+y=125 //2nd input
+z=x-y //subtraction
+disp("For decimal system 200 - 125 = ")
+disp(z)
+
+a=dec2hex(z) //hexadeciaml output of 200-125
+disp("For hexadecimal system C8 - 7D is")
+disp(a)
+
+b=dec2bin(z,8) //binary output of 200-125
+disp("For binary system 11001000 - 01111101 is")
+disp(b)
|