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 --- 2522/CH6/EX6.8/exm6_8.sce | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100755 2522/CH6/EX6.8/exm6_8.sce (limited to '2522/CH6/EX6.8/exm6_8.sce') diff --git a/2522/CH6/EX6.8/exm6_8.sce b/2522/CH6/EX6.8/exm6_8.sce new file mode 100755 index 000000000..00e371f86 --- /dev/null +++ b/2522/CH6/EX6.8/exm6_8.sce @@ -0,0 +1,11 @@ +//page no 186 +//example no 6.8 +//KEEPING THE RADIO ON. +//to keep the radio on without affecting the other appliances, the D4 bit should always be 1 +//assuming an input input binary 10101010 +clc; +A=[1 0 1 0 1 0 1 0]; +B=[0 0 0 1 0 0 0 0]; +Y=bitor(A,B); //ORing input (A) with B to keep the D4 bit always set +disp(Y); +printf('D4 bit will always be one without affecting the other bits'); -- cgit