blob: aa507e42630b33fe8656148eaa74affbbca2e358 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
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)
|