summaryrefslogtreecommitdiff
path: root/911/CH7/EX7.9.a/ex_7_9_a.sce
diff options
context:
space:
mode:
Diffstat (limited to '911/CH7/EX7.9.a/ex_7_9_a.sce')
-rw-r--r--911/CH7/EX7.9.a/ex_7_9_a.sce23
1 files changed, 23 insertions, 0 deletions
diff --git a/911/CH7/EX7.9.a/ex_7_9_a.sce b/911/CH7/EX7.9.a/ex_7_9_a.sce
new file mode 100644
index 000000000..31ea71912
--- /dev/null
+++ b/911/CH7/EX7.9.a/ex_7_9_a.sce
@@ -0,0 +1,23 @@
+// example 7.9(a)//
+clc
+//clears the screen//
+clear
+//clears all variables//
+disp('here ABCD = 1011 and G1''=0 and G2''=0')
+r= input('Enter the value of G1'' (0 or 1) : ' );
+//accepting the inputs from the user//
+t=input('Enter the value of G2'' (0 or 1): ' );
+sel = input ('Enter the values of ABCD : ' );
+strb = bitcmp(bitand (r,t),1);
+if strb ==0 then
+ //checking whether strobe is high or low//
+if sel ==1100 then
+y= 'The two pulses are steered to the Y12 output ' ;
+else
+y= 'The output Y12 remains in the High state ';
+end
+else
+y='The output Y12 remains in the High state ' ;
+end
+disp (y)
+//displaying result// \ No newline at end of file