summaryrefslogtreecommitdiff
path: root/462/CH2/EX2.35/ex_2_35.sce
blob: 74a81860645bb06eb148823deb67f87b9aef1cbb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
//example 2.35//
//addition of hexadecimal number//
clc
//clears the screen//
clear
//clears already existing variables//
x=hex2dec('7F')
//hexadecimal to decimal conversion//
y=hex2dec('BA')
z=x+y
//addition//
a=dec2hex(z)
//decimal to hexadecimal conversion//
disp('addition of given hexadecimal numbers results in :')
disp(a)
//answer in hexadecimal form//