blob: b2b472b473bdfd18d73c4dd7595bee3268687341 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
|
//example 1.14.b//
clc
//clears the screen//
clear
//clears all existing variables//
a=110010100011.01110101
//for integral part//
//put decimal equivalents of 1100(12), 1010(10) and 0011(3)//
//subtract 3 for excess 3 so, 9(12-3), 7(10-3) and 0(3-3)//
i=970
//for fractional part//
//put decimal equivalents of 0111(7) and 0101(5)//
//subtract 3 for excess 3 so, 4(7-3), 2(5-3)//
f=42
disp('970.42','decimal equivalent of excess 3 number 110010100011.01110101 =')
|