summaryrefslogtreecommitdiff
path: root/3808/CH1/EX1.8/Ex1_8.sce
blob: 74bd443dc474b66d14ad269c65c25fa7bb5b0c3d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
//Chapter 01: The Foundations: Logic and Proofs

clc;
clear;

x = [0 1 1 0 1 1 0 1 1 0];
y = [1 1 0 0 0 1 1 1 0 1];

bit_and=bitand(x,y)
bit_or=bitor(x,y)
bit_xor=bitxor(x,y)

disp(bit_and,"The bitwise AND is")
disp(bit_or,"The bitwise OR is")
disp(bit_xor,"The bitwise XOR is")