The Sefer Hamitzvot of the Rambam Mitzvah 39 and 40.