summaryrefslogtreecommitdiff
path: root/911/CH2/EX2.8.b/ex_2_8_b.sce
blob: d9b29fadd297684ead0691ea031da15b9586dace (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
//example 2.8//
//multiplication in hexadecimal form//
clc
//clears the screen //
clear
//clears all the existing variables //
x=hex2dec('2B')
//first number to be multiplied is x //
//hexadecimal to decima l conversion //
y=hex2dec ('3' )
//second number to be multiplied is y //
z=x*y
//multiplication//
a= dec2hex(z)
//decimal to hexadecimal conversion //
disp (a,'the multiplication of given numbers results in hexadecimal form = : ' )
disp (z, 'the multiplication of given numbers results in decimal form =: ' )
// answer in binary number //