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