The Sefer Hamitzvot of the Rambam Mitzvah 30 and 31.