t-test paired sample for catgorial variable

#1
Hi,

I've got to compare paired sample.
1 group of pupils were measured twice for attendance in class. possible results were: 0 = attended, 1 = not attended

Can I use a t-test for paired samples? or what other test should I use in this case?

Thanks
 
#2
McNemar's test

Found the right answer for anyone who is interested.

McNemar's test!

In SPSS:

Analyze -> Nonparametric test -> 2 Related samples