summaryrefslogtreecommitdiff
path: root/3827/CH4/EX4.3/EX4_3.sce
blob: 0a2a0615fa74bb871d88fcff0d99ca292033e6b6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
//EX4_3: Simple Binary Adder

//clears the screen
clc

//clears already existing variables
clear

disp(' A | B | X | Y |')
disp('----------------')
disp(' 0 | 0 | 0 | 0 |')
disp(' 0 | 1 | 0 | 1 |')
disp(' 1 | 0 | 0 | 1 |')
disp(' 1 | 1 | 1 | 0 |')
disp('X = AB and Y = A''B + AB'' = A⊕B')