diff options
Diffstat (limited to '1241/CH6')
30 files changed, 976 insertions, 0 deletions
diff --git a/1241/CH6/EX6.1/exa6_1.sce b/1241/CH6/EX6.1/exa6_1.sce new file mode 100755 index 000000000..c9919ca48 --- /dev/null +++ b/1241/CH6/EX6.1/exa6_1.sce @@ -0,0 +1,15 @@ +//Example 6-1//
+//convert A+B to minterms//
+clc
+//clears the console//
+clear
+//clears all existing variables//
+//conversion to minterms//
+disp(' Given expression- A+B ')
+disp(' on solving ')
+disp(' A(B+B'')+B(A+A'') ')
+disp('multiplying')
+disp(' AB+AB''+AB+A''B ')
+disp('we know A+A=A')
+disp(' AB+AB''+A''B ')
+//final result is displayed//
diff --git a/1241/CH6/EX6.10/exa6_10.sce b/1241/CH6/EX6.10/exa6_10.sce new file mode 100755 index 000000000..a2fa5cc14 --- /dev/null +++ b/1241/CH6/EX6.10/exa6_10.sce @@ -0,0 +1,45 @@ +//Example 6-10//
+//Map L=W''X''YZ+WX''YZ''+WX''Y''Z''+W''XYZ//
+clc
+//clears the console//
+clear
+//clears all existing variables//
+//Mapping the expression//
+disp(' C''D'' C''D CD CD'' ')
+disp('A''B'' 0 0 1 0 ')
+disp('AB'' 0 0 1 0 ')
+disp('AB 0 0 0 0 ')
+disp('AB'' 1 0 0 1 ')
+disp(' From the map, high outputs for 3,7,8,10 ')
+a=[0 0 1 1 ; 0 1 1 1 ; 1 0 0 0 ; 1 0 1 0]
+disp(a)
+for i=1: 4
+ if a(i,1)==1 then
+ b(i,1)='W'
+ else
+ b(i,1)='W'''
+ end
+ if a(i,2)==1 then
+ b(i,2)='X'
+ else
+ b(i,2)='X'''
+ end
+ if a(i,3)==1 then
+ b(i,3)='Y'
+ else
+ b(i,3)='Y'''
+ end
+ if a(i,4)==1 then
+ b(i,4)='Z'
+ else
+ b(i,4)=' Z'''
+ end
+end
+disp(' evaluating expression from truth table and map ')
+l=strcat([ b(1,1),b(1,2),b(1,3),b(1,4)])
+m=strcat([ b(2,1),b(2,2),b(2,3),b(2,4)])
+n=strcat([ b(3,1),b(3,2),b(3,3),b(3,4)])
+o=strcat([ b(4,1),b(4,2),b(4,3),b(4,4)])
+x=strcat([l"+",m"+",n"+",o ])
+disp(x)
+//Expression is displayed//
diff --git a/1241/CH6/EX6.11/exa6_11.sce b/1241/CH6/EX6.11/exa6_11.sce new file mode 100755 index 000000000..fa3975bdc --- /dev/null +++ b/1241/CH6/EX6.11/exa6_11.sce @@ -0,0 +1,53 @@ +//Example 6-11//
+//reduce expression using k-map//
+clc
+//clears the window//
+clear
+//clears all existing variables//
+//Mapping the expression//
+disp(' C''D'' C''D CD CD'' ')
+disp('A''B'' 1 1 1 1 ')
+disp('AB'' 0 0 1 1 ')
+disp('AB 0 1 1 0 ')
+disp('AB'' 0 0 0 0 ')
+disp(' From the map, high outputs for 0,1,2,3,6,7,13,15 ')
+//given logic equation//
+a=[0 0 0 0;0 0 0 1;0 0 1 0;0 0 1 1 ;0 1 1 0;0 1 1 1;1 1 0 1;1 1 1 1]
+disp(a)
+for i=1: 8
+ if a(i,1)==1 then
+ b(i,1)='A'
+ else
+ b(i,1)='A'''
+ end
+ if a(i,2)==1 then
+ b(i,2)='B'
+ else
+ b(i,2)='B'''
+ end
+ if a(i,3)==1 then
+ b(i,3)='C'
+ else
+ b(i,3)='C'''
+ end
+ if a(i,4)==1 then
+ b(i,4)='D'
+ else
+ b(i,4)=' D'''
+ end
+end
+disp(' evaluating expression from truth table and map ')
+x1=strcat([ b(1,1),b(1,2),b(1,3),b(1,4) ])
+x2=strcat([ b(2,1),b(2,2),b(2,3),b(2,4) ])
+x3=strcat([ b(3,1),b(3,2),b(3,3),b(3,4) ])
+x4=strcat([ b(4,1),b(4,2),b(4,3),b(4,4) ])
+x5=strcat([ b(5,1),b(5,2),b(5,3),b(5,4) ])
+x6=strcat([ b(6,1),b(6,2),b(6,3),b(6,4) ])
+x7=strcat([ b(7,1),b(7,2),b(7,3),b(7,4) ])
+x8=strcat([ b(8,1),b(8,2),b(8,3),b(8,4) ])
+x=([x1"+",x2"+",x3"+",x4"+",x5"+",x6"+",x7"+",x8 ])
+disp(x)
+//Expression is displayed//
+disp('now reducing expression using boolean algebra')
+disp('A''B''+A''C+ABD')
+
diff --git a/1241/CH6/EX6.12/exa6_12.sce b/1241/CH6/EX6.12/exa6_12.sce new file mode 100755 index 000000000..1672bd6bf --- /dev/null +++ b/1241/CH6/EX6.12/exa6_12.sce @@ -0,0 +1,56 @@ +//Example 6-12//
+//reduce expression using k-map//
+clc
+//clears the window//
+clear
+//clears all existing variables//
+//Mapping the expression//
+disp(' C''D'' C''D CD CD'' ')
+disp('A''B'' 0 0 1 1 ')
+disp('AB'' 0 1 1 0 ')
+disp('AB 1 1 1 1 ')
+disp('AB'' 0 1 1 0 ')
+disp(' From the map, high outputs for 2,3,5,7,9,11,12,13,14,15 ')
+//given logic equation//
+a=[0 0 1 0;0 0 1 1;0 1 0 1;0 1 1 1 ;1 0 0 1;1 0 1 1;1 1 0 0;1 1 0 1;1 1 1 0;1 1 1 1]
+disp(a)
+for i=1: 10
+ if a(i,1)==1 then
+ b(i,1)='A'
+ else
+ b(i,1)='A'''
+ end
+ if a(i,2)==1 then
+ b(i,2)='B'
+ else
+ b(i,2)='B'''
+ end
+ if a(i,3)==1 then
+ b(i,3)='C'
+ else
+ b(i,3)='C'''
+ end
+ if a(i,4)==1 then
+ b(i,4)='D'
+ else
+ b(i,4)=' D'''
+ end
+end
+disp(' evaluating expression from truth table and map ')
+x1=strcat([ b(1,1),b(1,2),b(1,3),b(1,4) ])
+x2=strcat([ b(2,1),b(2,2),b(2,3),b(2,4) ])
+x3=strcat([ b(3,1),b(3,2),b(3,3),b(3,4) ])
+x4=strcat([ b(4,1),b(4,2),b(4,3),b(4,4) ])
+x5=strcat([ b(5,1),b(5,2),b(5,3),b(5,4) ])
+x6=strcat([ b(6,1),b(6,2),b(6,3),b(6,4) ])
+x7=strcat([ b(7,1),b(7,2),b(7,3),b(7,4) ])
+x8=strcat([ b(8,1),b(8,2),b(8,3),b(8,4) ])
+x9=strcat([ b(9,1),b(9,2),b(9,3),b(9,4) ])
+x10=strcat([ b(10,1),b(10,2),b(10,3),b(10,4) ])
+x=([x1"+",x2"+",x3"+",x4"+",x5"+",x6"+",x7"+",x8"+",x9"+",x10 ])
+disp(x)
+//Expression is displayed//
+disp('now reducing expression using boolean algebra')
+disp('A''B''C+BD+AB+AD')
+
+
diff --git a/1241/CH6/EX6.13/exa6_13.sce b/1241/CH6/EX6.13/exa6_13.sce new file mode 100755 index 000000000..45ecd8fc4 --- /dev/null +++ b/1241/CH6/EX6.13/exa6_13.sce @@ -0,0 +1,42 @@ +//Example 6-13//
+//reduce expression using k-map//
+clc
+//clears the console//
+clear
+//clears all existing variables//
+//Mapping the expression//
+disp(' B''C'' B''C BC BC'' ')
+disp('A'' 1 0 1 1 ')
+disp('A 1 1 1 0 ')
+disp(' From the map, high outputs for 0,2,3,4,5 and 7 ')
+a=[0 0 0 ; 0 1 0 ; 0 1 1 ; 1 0 0 ; 1 0 1 ;1 1 1]
+disp(a)
+for i=1: 6
+ if a(i,1)==1 then
+ b(i,1)='A'
+ else
+ b(i,1)='A'''
+ end
+ if a(i,2)==1 then
+ b(i,2)='B'
+ else
+ b(i,2)='B'''
+ end
+ if a(i,3)==1 then
+ b(i,3)='C'
+ else
+ b(i,3)='C'''
+ end
+end
+disp(' evaluating expression from truth table and map ')
+x1=strcat([ b(1,1),b(1,2),b(1,3) ])
+x2=strcat([ b(2,1),b(2,2),b(2,3) ])
+x3=strcat([ b(3,1),b(3,2),b(3,3) ])
+x4=strcat([ b(4,1),b(4,2),b(4,3) ])
+x5=strcat([ b(5,1),b(5,2),b(5,3) ])
+x6=strcat([ b(6,1),b(6,2),b(6,3) ])
+x=([x1"+",x2"+",x3"+",x4"+",x5"+",x6])
+disp(x)
+//Expression is displayed//
+disp('applying laws of boolean algebra')
+disp('AC+A''B+B''C''')
diff --git a/1241/CH6/EX6.14.a/exa6_14a.sce b/1241/CH6/EX6.14.a/exa6_14a.sce new file mode 100755 index 000000000..be4bbd681 --- /dev/null +++ b/1241/CH6/EX6.14.a/exa6_14a.sce @@ -0,0 +1,13 @@ +//example 6-14a//
+//Number of inputs required//
+clc
+//clears the window//
+clear
+//clears all existing variables//
+disp(' W=AB''D+ACD''+EF ')
+disp('count AND inputs')
+disp('3+3+2=8')
+disp('count OR inputs')
+disp('1+1+1=3')
+disp('therefore total inputs=11')
+//result is displayed//
diff --git a/1241/CH6/EX6.14.b/exa6_14b.sce b/1241/CH6/EX6.14.b/exa6_14b.sce new file mode 100755 index 000000000..b8ea91c64 --- /dev/null +++ b/1241/CH6/EX6.14.b/exa6_14b.sce @@ -0,0 +1,13 @@ +//example 6-14b//
+//Number of inputs required//
+clc
+//clears the window//
+clear
+//clears all existing variables//
+disp(' X=LM+N''PQ+LM''PQ'' ')
+disp('count AND inputs')
+disp('2+3+4=9')
+disp('count OR inputs')
+disp('1+1+1=3')
+disp('therefore total inputs=12')
+//result is displayed//
diff --git a/1241/CH6/EX6.14.c/exa6_14c.sce b/1241/CH6/EX6.14.c/exa6_14c.sce new file mode 100755 index 000000000..6f7a7dd3e --- /dev/null +++ b/1241/CH6/EX6.14.c/exa6_14c.sce @@ -0,0 +1,13 @@ +//example 6-14c//
+//Number of inputs required//
+clc
+//clears the window//
+clear
+//clears all existing variables//
+disp(' Y=ST''U''V+STO''V+UV''+SUV+TU''V'' ')
+disp('count AND inputs')
+disp('4+4+2+3+3=16')
+disp('count OR inputs')
+disp('1+1+1+1+1=5')
+disp('therefore total inputs=21')
+//result is displayed//
diff --git a/1241/CH6/EX6.14.d/exa6_14d.sce b/1241/CH6/EX6.14.d/exa6_14d.sce new file mode 100755 index 000000000..fdf18ef39 --- /dev/null +++ b/1241/CH6/EX6.14.d/exa6_14d.sce @@ -0,0 +1,13 @@ +//example 6-14d//
+//Number of inputs required//
+clc
+//clears the window//
+clear
+//clears all existing variables//
+disp(' (A+B''+C)(A''+D)(B+D'') ')
+disp('count OR inputs')
+disp('3+2+2=7')
+disp('count AND inputs')
+disp('1+1+1=3')
+disp('therefore total inputs=10')
+//result is displayed//
diff --git a/1241/CH6/EX6.15/exa6_15.sce b/1241/CH6/EX6.15/exa6_15.sce new file mode 100755 index 000000000..1df8cf0f6 --- /dev/null +++ b/1241/CH6/EX6.15/exa6_15.sce @@ -0,0 +1,67 @@ +//Example 6-15//
+//Mapping an equation//
+clc
+//clears the console//
+clear
+//clears all existing variables//
+//Mapping the expression//
+disp('Z=m(2,3,6,7,9,10,12,13,14,16,18,22,26,28,29,30)')
+disp(' A'' A ')
+disp(' D''E'' D''E DE DE'' D''E'' D''E DE DE''')
+disp('B''C'' 0 0 1 1 1 0 0 1 ')
+disp('BC'' 0 0 1 1 0 0 0 1 ')
+disp('BC 1 1 0 1 1 1 0 1 ')
+disp('BC'' 0 1 0 1 0 0 0 1 ')
+disp(' From the map, high outputs for 2,3,6,7,9,10,12,13,14,16,18,22,26,28,29,30 ')
+//Therefore the kmap is displayed//
+a=[0 0 0 1 0;0 0 0 1 1;0 0 1 1 0;0 0 1 1 1;0 1 0 0 1;0 1 0 1 0;0 1 1 0 0;0 1 1 0 1;0 1 1 1 0;1 0 0 0 0;1 0 0 1 0;1 0 1 1 0;1 1 0 1 0;1 1 1 0 0;1 1 1 0 1;1 1 1 1 0]
+disp(a)
+for i=1: 16
+ if a(i,1)==1 then
+ b(i,1)='A'
+ else
+ b(i,1)='A'''
+ end
+ if a(i,2)==1 then
+ b(i,2)='B'
+ else
+ b(i,2)='B'''
+ end
+ if a(i,3)==1 then
+ b(i,3)='C'
+ else
+ b(i,3)='C'''
+ end
+ if a(i,4)==1 then
+ b(i,4)='D'
+ else
+ b(i,4)=' D'''
+ end
+ if a(i,5)==1 then
+ b(i,5)='E'
+ else
+ b(i,5)=' E'''
+ end
+end
+disp(' evaluating expression from truth table and map ')
+x1=strcat([ b(1,1),b(1,2),b(1,3),b(1,4),b(1,5) ])
+x2=strcat([ b(2,1),b(2,2),b(2,3),b(2,4),b(2,5) ])
+x3=strcat([ b(3,1),b(3,2),b(3,3),b(3,4),b(3,5) ])
+x4=strcat([ b(4,1),b(4,2),b(4,3),b(4,4),b(4,5) ])
+x5=strcat([ b(5,1),b(5,2),b(5,3),b(5,4),b(5,5) ])
+x6=strcat([ b(6,1),b(6,2),b(6,3),b(6,4),b(6,5) ])
+x7=strcat([ b(7,1),b(7,2),b(7,3),b(7,4),b(7,5) ])
+x8=strcat([ b(8,1),b(8,2),b(8,3),b(8,4),b(8,5) ])
+x9=strcat([ b(9,1),b(9,2),b(9,3),b(9,4),b(9,5) ])
+x10=strcat([ b(10,1),b(10,2),b(10,3),b(10,4),b(10,5) ])
+x11=strcat([ b(11,1),b(11,2),b(11,3),b(11,4),b(11,5) ])
+x12=strcat([ b(12,1),b(12,2),b(12,3),b(12,4),b(12,5) ])
+x13=strcat([ b(13,1),b(13,2),b(13,3),b(13,4),b(13,5) ])
+x14=strcat([ b(14,1),b(14,2),b(14,3),b(14,4),b(14,5) ])
+x15=strcat([ b(15,1),b(15,2),b(15,3),b(15,4),b(15,5) ])
+x16=strcat([ b(16,1),b(16,2),b(16,3),b(16,4),b(16,5) ])
+x=([x1"+",x2"+",x3"+",x4"+",x5"+",x6"+",x7"+",x8"+",x9"+",x10"+",x11"+",x12"+",x13"+",x14"+",x15"+",x16 ])
+disp(x)
+disp('Reduced expression')
+disp('A''BD''E+AB''C''E''+A''B''D+BCD''+DE''')
+//Expression is displayed//
diff --git a/1241/CH6/EX6.16/exa6_16.sce b/1241/CH6/EX6.16/exa6_16.sce new file mode 100755 index 000000000..7df6204ae --- /dev/null +++ b/1241/CH6/EX6.16/exa6_16.sce @@ -0,0 +1,88 @@ +//Example 6-16//
+//Reduce using mapping//
+clc
+//clears the console//
+clear
+//clears all existing variables//
+//Mapping the expression//
+disp('Y=m(0,2,4,8,10,13,15,16,18,20,23,24,26,32,34,40,42,45,47,48,50,56,57,58,60,61)')
+disp(' B'' B ')
+disp(' E''F'' E''F EF EF'' E''F'' E''F EF EF''')
+disp(' C''D'' 1 0 0 1 1 0 0 1 ')
+disp('A'' CD'' 1 0 0 0 1 0 1 0 ')
+disp(' CD 0 1 1 0 0 0 0 0 ')
+disp(' CD'' 1 0 0 1 1 0 0 1 ')
+disp(' ')
+disp(' C''D'' 1 0 0 1 1 0 0 1 ')
+disp('A CD'' 0 0 0 0 0 0 0 0 ')
+disp(' CD 0 1 1 0 1 1 0 0 ')
+disp(' CD'' 1 0 0 1 1 1 0 1 ')
+disp(' From the map, high outputs for 0,2,4,8,10,13,15,16,18,20,23,24,26,32,34,40,42,45,47,48,50,56,57,58,60,61 ')
+//Therefore the kmap is displayed//
+a=[0 0 0 0 0 0;0 0 0 0 1 0;0 0 0 1 0 0;0 0 1 0 0 0;0 0 1 0 1 0;0 0 1 1 0 1;0 0 1 1 1 1;0 1 0 0 0 0;0 1 0 0 1 0;0 1 0 1 0 0;0 1 0 1 1 1;0 1 1 0 0 0;0 1 1 0 1 0;1 0 0 0 0 0;1 0 0 0 1 0;1 0 1 0 0 0;1 0 1 0 1 0;1 0 1 1 0 1;1 0 1 1 1 1;1 1 0 0 0 0;1 1 0 0 1 0;1 1 1 0 0 0;1 1 1 0 0 1;1 1 1 0 1 0;1 1 1 1 0 0;1 1 1 1 0 1 ]
+for i=1: 26
+ if a(i,1)==1 then
+ b(i,1)='A'
+ else
+ b(i,1)='A'''
+ end
+ if a(i,2)==1 then
+ b(i,2)='B'
+ else
+ b(i,2)='B'''
+ end
+ if a(i,3)==1 then
+ b(i,3)='C'
+ else
+ b(i,3)='C'''
+ end
+ if a(i,4)==1 then
+ b(i,4)='D'
+ else
+ b(i,4)=' D'''
+ end
+ if a(i,5)==1 then
+ b(i,5)='E'
+ else
+ b(i,5)=' E'''
+ end
+ if a(i,6)==1 then
+ b(i,6)='F'
+ else
+ b(i,6)=' F'''
+ end
+end
+disp(' evaluating expression from truth table and map ')
+x1=strcat([ b(1,1),b(1,2),b(1,3),b(1,4),b(1,5),b(1,6) ])
+x2=strcat([ b(2,1),b(2,2),b(2,3),b(2,4),b(2,5),b(2,6) ])
+x3=strcat([ b(3,1),b(3,2),b(3,3),b(3,4),b(3,5),b(3,6) ])
+x4=strcat([ b(4,1),b(4,2),b(4,3),b(4,4),b(4,5),b(4,6) ])
+x5=strcat([ b(5,1),b(5,2),b(5,3),b(5,4),b(5,5),b(5,6) ])
+x6=strcat([ b(6,1),b(6,2),b(6,3),b(6,4),b(6,5),b(6,6) ])
+x7=strcat([ b(7,1),b(7,2),b(7,3),b(7,4),b(7,5),b(7,6) ])
+x8=strcat([ b(8,1),b(8,2),b(8,3),b(8,4),b(8,5),b(8,6) ])
+x9=strcat([ b(9,1),b(9,2),b(9,3),b(9,4),b(9,5),b(9,6) ])
+x10=strcat([ b(10,1),b(10,2),b(10,3),b(10,4),b(10,5),b(10,6) ])
+x11=strcat([ b(11,1),b(11,2),b(11,3),b(11,4),b(11,5),b(11,6) ])
+x12=strcat([ b(12,1),b(12,2),b(12,3),b(12,4),b(12,5),b(12,6) ])
+x13=strcat([ b(13,1),b(13,2),b(13,3),b(13,4),b(13,5),b(13,6) ])
+x14=strcat([ b(14,1),b(14,2),b(14,3),b(14,4),b(14,5),b(14,6) ])
+x15=strcat([ b(15,1),b(15,2),b(15,3),b(15,4),b(15,5),b(15,6) ])
+x16=strcat([ b(16,1),b(16,2),b(16,3),b(16,4),b(16,5),b(16,6) ])
+x17=strcat([ b(17,1),b(17,2),b(17,3),b(17,4),b(17,5),b(17,6) ])
+x18=strcat([ b(18,1),b(18,2),b(18,3),b(18,4),b(18,5),b(18,6) ])
+x19=strcat([ b(19,1),b(19,2),b(19,3),b(19,4),b(19,5),b(19,6) ])
+x20=strcat([ b(20,1),b(20,2),b(20,3),b(20,4),b(20,5),b(20,6) ])
+x21=strcat([ b(21,1),b(21,2),b(21,3),b(21,4),b(21,5),b(21,6) ])
+x22=strcat([ b(22,1),b(22,2),b(22,3),b(22,4),b(22,5),b(22,6) ])
+x23=strcat([ b(23,1),b(23,2),b(23,3),b(23,4),b(23,5),b(23,6) ])
+x24=strcat([ b(24,1),b(24,2),b(24,3),b(24,4),b(24,5),b(24,6) ])
+x25=strcat([ b(25,1),b(25,2),b(25,3),b(25,4),b(25,5),b(25,6) ])
+x26=strcat([ b(26,1),b(26,2),b(26,3),b(26,4),b(26,5),b(26,6) ])
+x=([x1"+",x2"+",x3"+",x4"+",x5"+",x6"+",x7"+",x8"+",x9"+",x10"+",x11"+",x12"+",x13"+",x14"+",x15"+",x16"+",x17"+",x18"+",x19"+",x20"+",x21"+",x22"+",x23"+",x24"+",x25"+",x26 ])
+disp(x)
+disp('Reduced expression')
+disp('A''BC''DEF+A''C''E''F''+B''CDF+ABCE''+D''F''')
+//Expression is displayed//
+
+
diff --git a/1241/CH6/EX6.17/exa6_17.sce b/1241/CH6/EX6.17/exa6_17.sce new file mode 100755 index 000000000..4cddbd82d --- /dev/null +++ b/1241/CH6/EX6.17/exa6_17.sce @@ -0,0 +1,83 @@ +
+//Example 6-17//
+//reduce expression using k-map by both POS and SOP//
+clc
+//clears the window//
+clear
+//clears all existing variables//
+//Mapping the expression//
+disp(' C''D'' C''D CD CD'' ')
+disp('A''B'' 1 1 1 0 ')
+disp('AB'' 0 0 1 1 ')
+disp('AB 0 1 1 0 ')
+disp('AB'' 1 1 0 0 ')
+disp(' From the map, high outputs for 0,1,3,6,7,8,9,13,15 ')
+disp(' From the map, low outputs for 2,4,5,10,11,12,14 ')
+//given logic equation//
+a=[0 0 0 0;0 0 0 1;0 0 1 1 ;0 1 1 0;0 1 1 1;1 0 0 0 ;1 0 0 1;1 1 0 1;1 1 1 1]
+disp(a)
+c=[0 0 1 0;0 1 0 0;0 1 0 1;1 0 1 0;1 0 1 1;1 1 0 0;1 1 1 0]
+disp(c)
+for i=1: 9
+ if a(i,1)==1 then
+ b(i,1)='A'
+ else
+ b(i,1)='A'''
+ end
+ if a(i,2)==1 then
+ b(i,2)='B'
+ else
+ b(i,2)='B'''
+ end
+ if a(i,3)==1 then
+ b(i,3)='C'
+ else
+ b(i,3)='C'''
+ end
+ if a(i,4)==1 then
+ b(i,4)='D'
+ else
+ b(i,4)=' D'''
+ end
+end
+for i=1: 7
+ if c(i,1)==1 then
+ d(i,1)='A'''
+ else
+ d(i,1)='A'
+ end
+ if c(i,2)==1 then
+ d(i,2)='B'''
+ else
+ d(i,2)='B'
+ end
+ if c(i,3)==1 then
+ d(i,3)='C'''
+ else
+ d(i,3)='C'
+ end
+ if c(i,4)==1 then
+ d(i,4)='D'''
+ else
+ d(i,4)=' D '
+ end
+end
+disp(' evaluating expression(minterms)from truth table and map ')
+x1=strcat([ b(1,1),b(1,2),b(1,3),b(1,4) ])
+x2=strcat([ b(2,1),b(2,2),b(2,3),b(2,4) ])
+x3=strcat([ b(3,1),b(3,2),b(3,3),b(3,4) ])
+x4=strcat([ b(4,1),b(4,2),b(4,3),b(4,4) ])
+x5=strcat([ b(5,1),b(5,2),b(5,3),b(5,4) ])
+x6=strcat([ b(6,1),b(6,2),b(6,3),b(6,4) ])
+x7=strcat([ b(7,1),b(7,2),b(7,3),b(7,4) ])
+x8=strcat([ b(8,1),b(8,2),b(8,3),b(8,4) ])
+x9=strcat([ b(9,1),b(9,2),b(9,3),b(9,4) ])
+x=([x1"+",x2"+",x3"+",x4"+",x5"+",x6"+",x7"+",x8"+",x9 ])
+disp(x)
+disp(' evaluating expression(maxterms)from truth table and map ')
+disp(' (A+B+C''+D).(A+B''+C+D).(A+B''+C+D'').(A''+B+C''+D).(A''+B+C''+D'').(A''+B''+C+D).(A''+B''+C''+D) ')
+//Expression is displayed//
+disp('now reducing expression using boolean algebra')
+disp('SOP- B''C''+A''B''D+A''BC+ABD ie 15 inputs')
+disp('POS- (B+C''+D)(A''+B''+D)(A+B''+C)(A''+B+C'') ie 16 inputs')
+disp('Therefore SOP form is less expensive')
diff --git a/1241/CH6/EX6.18/exa6_18.sce b/1241/CH6/EX6.18/exa6_18.sce new file mode 100755 index 000000000..1c7b5557d --- /dev/null +++ b/1241/CH6/EX6.18/exa6_18.sce @@ -0,0 +1,19 @@ +//Example 6-18//
+//Minimise an expression//
+clc
+//clears the console//
+clear
+//clears all existing variables//
+//Mapping the expression//
+disp('Y=m(2,3,4,5,6,7,12,13,14,15,18,19,20,21,22,23,28,29,30,31)')
+disp(' A'' A ')
+disp(' D''E'' D''E DE DE'' D''E'' D''E DE DE''')
+disp('B''C'' 0 0 1 1 0 0 1 1 ')
+disp('BC'' 1 1 1 1 1 1 1 1 ')
+disp('BC 1 1 1 1 1 1 1 1 ')
+disp('BC'' 0 0 0 0 0 0 0 0 ')
+disp(' From the map, high outputs for 2,3,4,5,6,7,12,13,14,15,18,19,20,21,22,23,28,29,30,31')
+//Therefore the kmap is displayed//
+disp('Therefore the minimum expression is:')
+disp('Y=C+B''D')
+//result is displayed//
diff --git a/1241/CH6/EX6.19/exa6_19.sce b/1241/CH6/EX6.19/exa6_19.sce new file mode 100755 index 000000000..523151c1d --- /dev/null +++ b/1241/CH6/EX6.19/exa6_19.sce @@ -0,0 +1,54 @@ +
+//Example 6-19//
+//reduce expression using k-map by finding POS//
+clc
+//clears the window//
+clear
+//clears all existing variables//
+//Mapping the expression//
+disp(' C''D'' C''D CD CD'' ')
+disp('A''B'' 0 0 0 1 ')
+disp('AB'' 1 0 0 0 ')
+disp('AB 1 1 0 0 ')
+disp('AB'' 1 1 1 0 ')
+disp(' From the map, low outputs for 0,1,3,5,6,7,10,14,15')
+//given logic equation//
+c=[0 0 0 0;0 0 0 1;0 0 1 1;0 1 0 1;0 1 1 0;0 1 1 1;1 0 1 0;1 1 1 0;1 1 1 1]
+disp(c)
+for i=1: 9
+ if c(i,1)==1 then
+ d(i,1)='A'''
+ else
+ d(i,1)='A'
+ end
+ if c(i,2)==1 then
+ d(i,2)='B'''
+ else
+ d(i,2)='B'
+ end
+ if c(i,3)==1 then
+ d(i,3)='C'''
+ else
+ d(i,3)='C'
+ end
+ if c(i,4)==1 then
+ d(i,4)='D'''
+ else
+ d(i,4)=' D '
+ end
+end
+disp(' evaluating expression from truth table and map')
+l=strcat([ d(1,1),d(1,2),d(1,3),d(1,4)])
+m=strcat([ d(2,1),d(2,2),d(2,3),d(2,4)])
+n=strcat([ d(3,1),d(3,2),d(3,3),d(3,4)])
+o=strcat([ d(4,1),d(4,2),d(4,3),d(4,4)])
+x=strcat([l"+",m"+",n"+",o ])
+disp('the sum of product expression is:')
+disp(x)
+disp('Reading the SOP form')
+disp(' A''B''CD''+BC''D''+AB''D+AC'' ')
+//Expression is displayed//
+disp('now reducing expression using boolean algebra from POS')
+disp(' (A+B+C)(A''+C''+D)(A+D'')(B''+C'') ')
+disp('POS has 14 inputs,SOP has 16 inputs')
+disp('Therefore,POS form is less expensive')
diff --git a/1241/CH6/EX6.2/exa6_2.sce b/1241/CH6/EX6.2/exa6_2.sce new file mode 100755 index 000000000..c472e95b4 --- /dev/null +++ b/1241/CH6/EX6.2/exa6_2.sce @@ -0,0 +1,14 @@ +//Example 6-2//
+//find minterms for A+BC//
+clc
+//clears the console//
+clear
+//clears all existing variables//
+//conversion to minterms//
+disp('Given expression- A+BC ')
+disp(' on solving ')
+disp(' A(B+B'')(C+C'')+BC(A+A'') ')
+disp(' (AB+AB'')(C+C'')+BCA+BCA'' ')
+disp('multiplying')
+disp(' C''AB+AB''C+AB''C+AB''C''+BCA+BCA'' ')
+//final result is displayed//
diff --git a/1241/CH6/EX6.20/exa6_20.sce b/1241/CH6/EX6.20/exa6_20.sce new file mode 100755 index 000000000..b0a756fc0 --- /dev/null +++ b/1241/CH6/EX6.20/exa6_20.sce @@ -0,0 +1,24 @@ +//Example 6-20//
+//Find minimum of expression//
+clc
+//clears the console//
+clear
+//clears all existing variables//
+//Mapping the expression//
+disp('Y=M(0,1,9,10,11,13,14,15,16,17,22,23,26,27)')
+disp(' A'' A ')
+disp(' D''E'' D''E DE DE'' D''E'' D''E DE DE''')
+disp('B''C'' 0 0 1 1 0 0 1 1 ')
+disp('BC'' 1 1 1 1 1 1 0 0 ')
+disp('BC 1 0 0 0 1 1 1 1 ')
+disp('BC'' 1 0 0 0 1 1 0 0 ')
+disp(' From the map, high outputs for 0,1,9,10,11,13,14,15,16,17,22,23,26,27 ')
+//Therefore the kmap is displayed//
+disp('The SOP of expression is:')
+disp('Y=B''C''D+A''B''C+ABC+BD''E''+ACD''+ABD''')
+disp('24 inputs')
+disp('The POS of expression is:')
+disp('Y=(B+C+D)(B''+C+D'')(A''+B+C+D)(A+B''+E'')(A+B''+D'')')
+disp('21 inputs')
+disp('Therefore POS form is the minimum expression')
+//result is displayed//
diff --git a/1241/CH6/EX6.24/exa6_24.sce b/1241/CH6/EX6.24/exa6_24.sce new file mode 100755 index 000000000..78f41d099 --- /dev/null +++ b/1241/CH6/EX6.24/exa6_24.sce @@ -0,0 +1,53 @@ +//Example 6-24//
+//Solve multiple output equation using mapping//
+clc
+//clears the window//
+clear
+//clears all existing variables//
+disp('f1=Sigma m(0,1,2,4,6,7,10,14,15)')
+//First function is displayed//
+disp('f2=Sigma m(3,4,5,9,10,11,14) ')
+//Second function is displayed//
+disp('f1.f2=Sigma m(4,10,14)')
+//Taking the common entries//
+disp('Mapping for f1.f2')
+disp(' C''D'' C''D CD CD'' ')
+disp('A''B'' 0 0 0 0 ')
+disp('AB'' 1 0 0 0 ')
+disp('AB 0 0 0 1 ')
+disp('AB'' 0 0 0 1 ')
+disp(' From the map, high outputs for 4,10,14')
+//given logic equation//
+a=[0 1 0 0;1 0 1 0;1 1 1 0]
+disp(a)
+for i=1: 3
+ if a(i,1)==1 then
+ b(i,1)='A'
+ else
+ b(i,1)='A'''
+ end
+ if a(i,2)==1 then
+ b(i,2)='B'
+ else
+ b(i,2)='B'''
+ end
+ if a(i,3)==1 then
+ b(i,3)='C'
+ else
+ b(i,3)='C'''
+ end
+ if a(i,4)==1 then
+ b(i,4)='D'
+ else
+ b(i,4)=' D'' '
+ end
+end
+disp(' evaluating expression from truth table and map ')
+l=strcat([ b(1,1),b(1,2),b(1,3),b(1,4)])
+m=strcat([ b(2,1),b(2,2),b(2,3),b(2,4)])
+n=strcat([ b(3,1),b(3,2),b(3,3),b(3,4)])
+x=strcat([l"+",m"+",n])
+disp(x)
+//Expression is displayed//
+disp('now reducing expression using boolean algebra')
+disp('ACD''+A''BC''D''')
diff --git a/1241/CH6/EX6.25/exa6_25.sce b/1241/CH6/EX6.25/exa6_25.sce new file mode 100755 index 000000000..c9f287fee --- /dev/null +++ b/1241/CH6/EX6.25/exa6_25.sce @@ -0,0 +1,56 @@ +//Example 6-25//
+//Solve multiple output equation using mapping//
+clc
+//clears the window//
+clear
+//clears all existing variables//
+disp('f1=Sigma m(2,3,7,10,11,14)+d(1,5,15)')
+//First function is displayed//
+disp('f2=Sigma m(0,1,4,7,13,15)+d(5,8,15) ')
+//Second function is displayed//
+disp('f1.f2=Sigma m(1,7,14)+d(5,15)')
+//Taking the common entries//
+disp('Mapping for f1.f2')
+disp(' C''D'' C''D CD CD'' ')
+disp('A''B'' 0 1 0 0 ')
+disp('AB'' 0 X 1 0 ')
+disp('AB 0 0 X 1 ')
+disp('AB'' 0 0 0 0 ')
+disp(' From the map, high outputs for 1,7,14 and dont cares for 5,15')
+//given logic equation//
+a=[0 0 0 1;0 1 0 1;0 1 1 1;1 1 1 0;1 1 1 1]
+disp(a)
+for i=1: 5
+ if a(i,1)==1 then
+ b(i,1)='A'
+ else
+ b(i,1)='A'''
+ end
+ if a(i,2)==1 then
+ b(i,2)='B'
+ else
+ b(i,2)='B'''
+ end
+ if a(i,3)==1 then
+ b(i,3)='C'
+ else
+ b(i,3)='C'''
+ end
+ if a(i,4)==1 then
+ b(i,4)='D'
+ else
+ b(i,4)=' D'' '
+ end
+end
+disp(' evaluating expression from truth table and map ')
+l=strcat([ b(1,1),b(1,2),b(1,3),b(1,4)])
+m=strcat([ b(2,1),b(2,2),b(2,3),b(2,4)])
+n=strcat([ b(3,1),b(3,2),b(3,3),b(3,4)])
+o=strcat([ b(4,1),b(4,2),b(4,3),b(4,4)])
+p=strcat([ b(5,1),b(5,2),b(5,3),b(5,4)])
+x=strcat([l"+",m"+",n"+",o"+",p ])
+disp(x)
+//Expression is displayed//
+disp('now reducing expression using boolean algebra')
+disp('ABC+A''C''D+A''BD')
+
diff --git a/1241/CH6/EX6.26/exa6_26.sce b/1241/CH6/EX6.26/exa6_26.sce new file mode 100755 index 000000000..451725504 --- /dev/null +++ b/1241/CH6/EX6.26/exa6_26.sce @@ -0,0 +1,12 @@ +//Example 6-26//
+//Reduce by Variable Mapping//
+clc
+//clears the console//
+clear
+//clears all existing variables//
+disp('M=A''B''CD''+A''B''CD+AB''CD''+AB''CD+A''BCD+A''BC''D''+ABC''D+ABC''D''')
+disp('Converting the 4 variable minterms to 3 variable minterms')
+disp(' M=m1D''+m1D+m5D''+m5D+m3D+m3D''+m6D+m6D''+m2D''')
+disp('using D+D''=1')
+disp('Result M= B''C+A''CD+BC''D''+ABC''')
+//final expression is displayed//
diff --git a/1241/CH6/EX6.27/exa6_27.sce b/1241/CH6/EX6.27/exa6_27.sce new file mode 100755 index 000000000..9a6a54752 --- /dev/null +++ b/1241/CH6/EX6.27/exa6_27.sce @@ -0,0 +1,11 @@ +//Example 6-27//
+//Reduce by Variable Mapping//
+clc
+//clears the console//
+clear
+//clears all existing variables//
+disp('Z=A''B''CDE+A''BC''DE''+A''BCD+AB''CD''F+ABC''D''+ABCD''')
+disp('Converting the 6 variable minterms to 4 variable minterms')
+disp('m7-E+E'';m14-F+F''')
+disp('Result Z= A''CDE+A''BDE''+ABD''+ACD''F')
+//final expression is displayed//
diff --git a/1241/CH6/EX6.28/exa6_28.sce b/1241/CH6/EX6.28/exa6_28.sce new file mode 100755 index 000000000..ae53e0b15 --- /dev/null +++ b/1241/CH6/EX6.28/exa6_28.sce @@ -0,0 +1,12 @@ +//Example 6-28//
+//Solve using 3 Variable Mapping//
+clc
+//clears the console//
+clear
+//clears all existing variables//
+disp('W=Dm2+m6+Dm5+d(m1+D''m7)')
+disp('Dm5 combined with XDm1 ')
+disp('Dm2 combined with Dm6')
+disp('D''m6 combined either with Dm6 or XD''m7')
+disp('Result W=B''CD+ABD''+BC''D ')
+//final expression is displayed//
diff --git a/1241/CH6/EX6.29/exa6_29.sce b/1241/CH6/EX6.29/exa6_29.sce new file mode 100755 index 000000000..6cfd9604c --- /dev/null +++ b/1241/CH6/EX6.29/exa6_29.sce @@ -0,0 +1,13 @@ +//Example 6-29//
+//Reduce by Mapping//
+clc
+//clears the console//
+clear
+//clears all existing variables//
+disp('R=m0+(E+G)m2+E''m5+Gm10+Fm13+m14+m15+d(m1+Em4+F''m8+F''m9)')
+disp('Converting the 7 variable minterms to 4 variable minterms')
+disp('Em2 covers Em0')
+disp('E''m0 combines with m1')
+disp('Result R=A''B''D''E+A''B''C''+B''CD''G+ABDF+ABC ')
+//final expression is displayed//
+
diff --git a/1241/CH6/EX6.3/exa6_3.sce b/1241/CH6/EX6.3/exa6_3.sce new file mode 100755 index 000000000..6879b2f30 --- /dev/null +++ b/1241/CH6/EX6.3/exa6_3.sce @@ -0,0 +1,15 @@ +//Example 6-3//
+//find minterms for AB+ACD//
+clc
+//clears the window//
+clear
+//clears all existing variables//
+//conversion to minterms//
+disp(' Given expression- AB+ACD ')
+disp(' on solving ')
+disp(' AB(C+C'')(D+D'')+ACD(B+B'') ')
+disp('multiplying')
+disp(' ABCD+ABC''D''+ABC''D+ABCD''+AB''CD+ABCD ')
+disp('we know A+A=A')
+disp(' ABC''D''+ABC''D+ABCD''+AB''CD+ABCD ')
+//result is displayed//
diff --git a/1241/CH6/EX6.30/exa6_30.sce b/1241/CH6/EX6.30/exa6_30.sce new file mode 100755 index 000000000..3051a32c9 --- /dev/null +++ b/1241/CH6/EX6.30/exa6_30.sce @@ -0,0 +1,53 @@ +//Example 6-30//
+//reduce expression using k-map//
+clc
+//clears the window//
+clear
+//clears all existing variables//
+//Mapping the expression//
+disp(' C''D'' C''D CD CD'' ')
+disp('A''B'' 1 0 1 1 ')
+disp('AB'' 0 0 1 1 ')
+disp('AB 0 1 0 0 ')
+disp('AB'' 1 1 0 1 ')
+disp(' From the map, high outputs for 0,2,3,6,7,8,9,10,13 ')
+//given logic equation//
+a=[0 0 0 0;0 0 1 0;0 0 1 1 ;0 1 1 0;0 1 1 1;1 0 0 0 ;1 0 0 1;1 0 1 0;1 1 0 1]
+disp(a)
+for i=1: 9
+ if a(i,1)==1 then
+ b(i,1)='A'
+ else
+ b(i,1)='A'''
+ end
+ if a(i,2)==1 then
+ b(i,2)='B'
+ else
+ b(i,2)='B'''
+ end
+ if a(i,3)==1 then
+ b(i,3)='C'
+ else
+ b(i,3)='C'''
+ end
+ if a(i,4)==1 then
+ b(i,4)='D'
+ else
+ b(i,4)=' D'''
+ end
+end
+disp(' evaluating expression from truth table and map ')
+x1=strcat([ b(1,1),b(1,2),b(1,3),b(1,4) ])
+x2=strcat([ b(2,1),b(2,2),b(2,3),b(2,4) ])
+x3=strcat([ b(3,1),b(3,2),b(3,3),b(3,4) ])
+x4=strcat([ b(4,1),b(4,2),b(4,3),b(4,4) ])
+x5=strcat([ b(5,1),b(5,2),b(5,3),b(5,4) ])
+x6=strcat([ b(6,1),b(6,2),b(6,3),b(6,4) ])
+x7=strcat([ b(7,1),b(7,2),b(7,3),b(7,4) ])
+x8=strcat([ b(8,1),b(8,2),b(8,3),b(8,4) ])
+x9=strcat([ b(9,1),b(9,2),b(9,3),b(9,4) ])
+x=([x1"+",x2"+",x3"+",x4"+",x5"+",x6"+",x7"+",x8"+",x9 ])
+disp(x)
+//Expression is displayed//
+disp('now reducing expression using boolean algebra')
+disp('B''D''+A''C+AC''D')
diff --git a/1241/CH6/EX6.4/exa6_4.sce b/1241/CH6/EX6.4/exa6_4.sce new file mode 100755 index 000000000..7f856011a --- /dev/null +++ b/1241/CH6/EX6.4/exa6_4.sce @@ -0,0 +1,17 @@ +//Example 6-4//
+//minterm designation of AB''C''D''//
+clc
+//clears the window//
+clear
+//clears all existing variables//
+disp('copy original term')
+disp(' AB''C''D'' ')
+disp(' substitute ones for nonbarred letters and zeroes for barred letters ')
+disp('after substitution')
+disp(' 1000 ')
+a=bin2dec('1000')
+disp('the decimal equivalent of 1000 is:')
+disp(a)
+disp(' Therefore decimal subscript of m is 8 ')
+disp(' AB''C''D'' = m8 ')
+//result is displayed//
diff --git a/1241/CH6/EX6.5/exa6_5.sce b/1241/CH6/EX6.5/exa6_5.sce new file mode 100755 index 000000000..3b04fca73 --- /dev/null +++ b/1241/CH6/EX6.5/exa6_5.sce @@ -0,0 +1,17 @@ +//Example 6-5//
+//minterm designation of W''X''YZ''//
+clc
+//clears the window//
+clear
+//clears all existing variables//
+disp('copy original term')
+disp(' W''X''YZ'' ')
+disp(' substitute ones for nonbarred letters and zeroes for barred letters ')
+disp('after substitution')
+disp(' 0010 ')
+a=bin2dec('0010')
+disp('therefore the decimal equivalent of 0010 is:')
+disp(a)
+disp(' Therefore decimal subscript of m is 2 ')
+disp(' W''X''YZ'' = m2 ')
+//result is displayed//
diff --git a/1241/CH6/EX6.6/exa6_6.sce b/1241/CH6/EX6.6/exa6_6.sce new file mode 100755 index 000000000..78bab49bd --- /dev/null +++ b/1241/CH6/EX6.6/exa6_6.sce @@ -0,0 +1,31 @@ +//Example 6-6//
+//map C=A''B''+AB''//
+clc
+//clears the console//
+clear
+//clears all existing variables//
+//Mapping the expression//
+disp(' B'' B ')
+disp('A'' 1 0 ')
+disp('A 1 0 ')
+disp(' From the map, high outputs for 0 and 2 ')
+a=[0 0 ; 1 0]
+disp(a)
+for i=1: 2
+ if a(i,1)==1 then
+ b(i,1)='A'
+ else
+ b(i,1)='A'''
+ end
+ if a(i,2)==1 then
+ b(i,2)='B'
+ else
+ b(i,2)='B'''
+ end
+end
+m=strcat([b(1,1),b(1,2)])
+n=strcat([b(2,1),b(2,2)])
+disp(' evaluating expression from truth table and map ')
+x=strcat([m"+",n]);
+disp(x)
+//Expression is displayed//
diff --git a/1241/CH6/EX6.7/exa6_7.sce b/1241/CH6/EX6.7/exa6_7.sce new file mode 100755 index 000000000..5c4a17022 --- /dev/null +++ b/1241/CH6/EX6.7/exa6_7.sce @@ -0,0 +1,37 @@ +//Example 6-7//
+//Map X=ABC+AB''C+AB''C''//
+clc
+//clears the console//
+clear
+//clears all existing variables//
+//Mapping the expression//
+disp(' B''C'' B''C BC BC'' ')
+disp('A'' 0 0 0 0 ')
+disp('A 1 1 1 0 ')
+disp(' From the map, high outputs for 4,5 and 7 ')
+a=[1 0 0 ; 1 0 1 ; 1 1 1]
+disp(a)
+for i=1: 3
+ if a(i,1)==1 then
+ b(i,1)='A'
+ else
+ b(i,1)='A'''
+ end
+ if a(i,2)==1 then
+ b(i,2)='B'
+ else
+ b(i,2)='B'''
+ end
+ if a(i,3)==1 then
+ b(i,3)='C'
+ else
+ b(i,3)='C'''
+ end
+end
+disp(' evaluating expression from truth table and map ')
+l=strcat([ b(1,1),b(1,2),b(1,3)])
+m=strcat([ b(2,1),b(2,2),b(2,3)])
+n=strcat([ b(3,1),b(3,2),b(3,3)])
+x=strcat([l"+",m"+",n ])
+disp(x)
+//Expression is displayed//
diff --git a/1241/CH6/EX6.8/exa6_8.sce b/1241/CH6/EX6.8/exa6_8.sce new file mode 100755 index 000000000..5bacf755c --- /dev/null +++ b/1241/CH6/EX6.8/exa6_8.sce @@ -0,0 +1,16 @@ +//Example 6-8//
+//Mapping an equation//
+clc
+//clears the console//
+clear
+//clears all existing variables//
+//Mapping the expression//
+disp('Z=m(9,20,21,29,30,31)')
+disp(' A'' A ')
+disp(' D''E'' D''E DE DE'' D''E'' D''E DE DE''')
+disp('B''C'' 0 0 0 0 0 0 0 0 ')
+disp('BC'' 0 0 0 0 1 1 0 0 ')
+disp('BC 0 0 0 0 0 1 1 1 ')
+disp('BC'' 0 1 0 0 0 0 0 0 ')
+disp(' From the map, high outputs for 9,20,21,29,30,31')
+//Therefore the kmap is displayed//
diff --git a/1241/CH6/EX6.9/exa6_9.sce b/1241/CH6/EX6.9/exa6_9.sce new file mode 100755 index 000000000..b81f39539 --- /dev/null +++ b/1241/CH6/EX6.9/exa6_9.sce @@ -0,0 +1,21 @@ +//Example 6-8//
+//Mapping an equation//
+clc
+//clears the console//
+clear
+//clears all existing variables//
+//Mapping the expression//
+disp('Z=m(0,1,3,5,7,10,11,21,22,23,24,26,30,32,34,35,40,41,46,47,50,51,52,60,61)')
+disp(' B'' B ')
+disp(' E''F'' E''F EF EF'' E''F'' E''F EF EF''')
+disp(' C''D'' 1 1 1 0 0 0 0 0 ')
+disp('A'' CD'' 0 1 1 0 0 1 1 1 ')
+disp(' CD 0 0 0 0 0 0 0 1 ')
+disp(' CD'' 0 0 1 1 1 0 0 1 ')
+disp(' ')
+disp(' C''D'' 1 0 1 1 0 0 1 1 ')
+disp('A CD'' 0 0 0 0 1 0 0 0 ')
+disp(' CD 0 0 1 1 1 1 0 0 ')
+disp(' CD'' 1 1 0 0 0 0 0 0 ')
+disp(' From the map, high outputs for 0,1,3,5,7,10,11,21,22,23,24,26,30,32,34,35,40,41,46,47,50,51,52,60,61 ')
+//Therefore the kmap is displayed//
|