The Sefer Hamitzvot of the Rambam Mitzvah 45 and 46.