From b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b Mon Sep 17 00:00:00 2001 From: priyanka Date: Wed, 24 Jun 2015 15:03:17 +0530 Subject: initial commit / add all books --- 273/CH25/EX25.8/ex25_8.sce | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100755 273/CH25/EX25.8/ex25_8.sce (limited to '273/CH25/EX25.8/ex25_8.sce') diff --git a/273/CH25/EX25.8/ex25_8.sce b/273/CH25/EX25.8/ex25_8.sce new file mode 100755 index 000000000..381ed11a3 --- /dev/null +++ b/273/CH25/EX25.8/ex25_8.sce @@ -0,0 +1,14 @@ +clc; +clear; +//example 25.8 +//binary multiplication + +format('v',8);//changing the default precision to 8 +a=10101.01;//first number +b=110.10;//second number +A=bin21dec(a);//converting a in to decimal number +B=bin21dec(b);//converting b in to decimal number +S=A*B; //multiply the two decimal numbers +temp=dec21bin(S);//converting the decimal product back to binary + +disp(temp,'product is');//displaying the final output \ No newline at end of file -- cgit