module COMP2 (Z,A1,A2,B1,B2);

  output  Z;
  input   A1;
  input   A2;
  input   B1;
  input   B2;

  wire Z,A1,A2,B1,B2;
  wire bit1,bit2;

  xnor x1 (bit1,A1,B1);
  xnor x2 (bit2,A2,B2);
  and  a1 (Z,bit1,bit2);

endmodule
