Step 1:
Start by defining our input data X, and the correct answers D (these are the values shown in the truth table).
clear;
clc;
close all;
X=[0 0 %input matrix
0 1
1 0
1 1];
D=[0 %correct output matrix
1
1
0];