diff options
Diffstat (limited to '45/CH4/EX4.4/exmple_4_4.sce')
-rwxr-xr-x | 45/CH4/EX4.4/exmple_4_4.sce | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/45/CH4/EX4.4/exmple_4_4.sce b/45/CH4/EX4.4/exmple_4_4.sce new file mode 100755 index 000000000..c3243ff94 --- /dev/null +++ b/45/CH4/EX4.4/exmple_4_4.sce @@ -0,0 +1,17 @@ +//example 4.4 +clc; +clear; +r= input('Enter the value of R (0 or 1) :'); // accepting the inputs from the user +t= input('Enter the value of T (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 |