I have two files with one column.   
If the first rows in the two files are same, then print 1 otherwise print 0.

`file1`:

```
M
A
A
M

```

`file2`:

```
M
M
A
A

```

`output`:

```
1
0
1
0

```

Can anybody show me an awk script which would do this?