summaryrefslogtreecommitdiff
path: root/2825/CH19/EX19.10/Ex19_10.sce
blob: 146460f624c4976754a759727ff16ed84b2eac57 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
//Ex19_10 Pg-961
clc

bin='1111'; //binary input
dec=bin2dec(bin) //decimal output
disp("(1) Binary number -> 1111")
disp("Here we have 4 bits")
disp("The decimal equivqlent is")
disp(dec)


bin='1111111'; //binary input
dec=bin2dec(bin) //decimal output
disp("(2) Binary number -> 1111111")
disp("Here we have 7 bits")
disp("The decimal equivqlent is")
disp(dec)