Pope Sylvester II ( – 12 May 1003), originally known as Gerbert of Aurillac, was a French-born scholar and teacher who served as the bishop of Rome and ruled the Papal States from 999 to his death. He endorsed and promoted study of Moorish and Greco-Roman arithmetic, mathematics and astronomy, reintroducing to Europe the abacus and armillary sphere, which had been lost to Latin Europe since the end of the Greco-Roman era. He is said to be the first in Europe to introduce the decimal numeral system using the Hindu-Arabic numeral system. He is credited with the invention of the first mechanical clock in 996. Early life Gerbert was born about 946 in the town of Belliac, near the present-day commune of Saint-Simon, Cantal, France. Around 963, he entered the Monastery of St. Gerald of Aurillac. In 967, Count Borrell II of Barcelona (947–992) visited the monastery, and the abbot asked the count to take Gerbert with him so that the lad could study mathematics in Catalonia and acquire there some knowledge of Arabic learning. Scholarly work Gerbert studied under the direction of Bishop Atto of Vich, some 60 km north of Barcelona, and probably also at the nearby Monastery of Santa Maria de Ripoll. Like all Catalan monasteries, it contained manuscripts from Moslem Spain and especially from Cordoba, one of the intellectual centres of Europe at that time: the library of al-Hakam II, for example, had thousands of books (from science to Greek philosophy). This is where Gerbert was introduced to mathematics and astronomy. Borrell II was facing major defeat from the Andalusian powers so he sent a delegation to Córdoba to request a truce. Bishop Atto was part of the delegation that met with al-Ḥakam II, who received him with honour. Gerbert was fascinated by the stories of the Mozarab Christian bishops and judges who dressed and talked like the Moors, well-versed in mathematics and natural sciences like the great teachers of the Islamic madrasahs. This sparked Gerbert's veneration for the Moors and his passion for mathematics and astronomy. Abacus and numerals Gerbert learned of Hindu–Arabic digits and applied this knowledge to the abacus, but probably without the numeral zero. According to the 12th-century historian William of Malmesbury, Gerbert got the idea of the computing device of the abacus from a Moorish scholar from University of Al-Qarawiyyin. The abacus that Gerbert reintroduced into Europe had its length divided