Cognitive diagnosis models (CDMs) are restricted latent class models that can be used to analyze response data from educational or psychological tests. The Deterministic Input Noisy Output “AND” gate (DINA) model and the Deterministic Input Noisy Output “OR” gate (DINO) model there are two popular cognitive diagnosis models (CDMs) for educational and evaluation assessment. They show different views on how cognitive skills are related and the likelihood of an item responding correctly. This study aims to comparison between these two models and comparison between girls and boys for cognitive diagnosis modeling. In addition, this research aims at determining the 8th grade students’ level of mathematics at the school level. Followed by the analysis of a set of data from Trends in International Mathematics and Science Study (TIMSS) 2011 mathematics assessment is used to examine the Mathematical abilities of students in Grade 8, which measures 13 attributes and includes 32 questions. A sample size of 274 includes 129 girls and 145 boys, and the students are selected based on the multistage cluster sampling method from Ghor province. Under the cognitive diagnosis assessment framework, the deterministic, inputs, noisy, “and” gate (DINA) model and the deterministic, inputs, noisy, “or” gate (DINO) model are used. The results demonstrated that the highest probability of mastery belonged to attribute 4 at (0.4836). However, the lowest probability belonged to attribute 24 and 32 which is (0.12).