Hasan al-Askari was born during a period when his father Ali al-Hadi, the tenth Imam, was suspected of being involved in a conspiracy against the Caliph Al-Mutawakkil. There is doubt as to whether al-Askari was born in Medina or Samarra. According to authentic shia hadith he was born in Medina on the 8th of Rabiul Akhar 232 Hijri (4 December 846 AD) and died in Samarrah Iraq on the 8th of Rabiul Awwal 260 Hijri (4 January 874) aged 28. The period of his imamate was 6 years. He was taken along with his family to Samarra in the year 230, 231 or 232 A.H., and was kept there under house arrest. In Samarra, al-Askari spent most of his time reading the Quran and the Sharia. According to Donaldson, al-Askari must also have studied languages, for in later years it was known that he could speak Hindi with the pilgrims from India, Turkish with the Turks, and Persian with the Persians. According to Shia accounts, however, it is part of the divine knowledge given to all Imams to be able to speak all human languages.  It is said that even as a child, al-Askari was endowed with divine knowledge. One day a man passed by him, and saw that he was crying. The man told him he would buy a toy that he might play with. "No!" said al-Askari, "We have not been created for play." The man was amazed at this answer and said, "Then, what for have we been created?" "For knowledge and worship." answered the child. The man said "Where have you got this from?" Al-Askari said, "From the saying of God, Did you then think that We had created you in vain." The man was confused, so he said, "What has happened to you while you are guiltless, little child?" al-Askari said, "Be away from me! I have seen my mother set fire to big pieces of firewood, but fire is not lit except with small pieces, and I fear that I shall be from the small pieces of the firewood of the Hell."  Al-Askari's mother, as in the case of the majority of The Twelve Imams, was a slave girl who was honoured after bearing children with the title Umm walad (mother of offspring). Her given name was Hadith, though some say she was called Susan, Ghazala, Salil, or Haribta. Al-Askari had other brothers, and among them was Ja'far who was also known as Ja'far al-Zaki or Jaffar-us-Sani. His other brother was Husayn, and together he and al-Askari were known as "as-Sibtayn", after their two grandfathers Hasan and Husayn, who were also called as-Sibtayn.

Answer this question "How devoted was he to his beliefs?" by extracting the answer from the text above.
It is said that even as a child, al-Askari was endowed with divine knowledge. One day a man passed by him, and saw that he was crying.