a. 
>> A = [0 0 1 1]

A =

     0     0     1     1

>> B = [0 1 0 1]

B =

     0     1     0     1

>> C = xor(A,B)

C =

     0     1     1     0

>> D = ~A

D =

     1     1     0     0

>> diary off
