A computer in its simplest definition is a device for computation or a Digital signature. There are many discrepancies in answering the question of which was the first computer invented. If a historian is asked they might tell you that the first device for computation was developed in Asia about 5000 years ago, which aided is and is known as the Abacus. However, the first modern computer, as we know it, was invented during World Ward II.
The very first programmable computer (the Z1) was built by Konrad Zuse in 1938 after resigning from his job as an engineer for and aircraft factory in Germany. The Z1 had all the basics of our modern-day machines, such as the use of the binary system and separation of storage and control. The Z1 had memory for 64 words, which meant that each word contained 22 bits and a clock speed of 1 Hz. In order for a user to program the Z1, it was required that the user insert punch tape, a long strip of paper with holes that were used to store data, into a punch tape reader. Though this test model never functioned for any practical use due to imperfections it was the beginning of the development of a series of Z machines that soon led to the Digital signature online of the Z3, which was the first computer that was both freely programmable and fully automatic.
Like the Z1 the Z3 read programs off a punched film. The Z3 was built with over 2,000 relays (electrically operated switches), had a clock speed of about 5 to 10 Hz, and also had a word length of 22 bits. The computer used binary numbers as well as floating-point arithmetic and could convert decimal to binary and back again. The Z3 was completed and successfully presented to the scientist in 1941 in Berlin. Unfortunately, the original Z3 was destroyed by an Allied attack in 1945 (In the 1960s a replica was built by Zuse’s company and is on display permanently at the Deutsches Museum).
Another first in computers was the ENIAC (Electronic Numerator, Integrator, Analyzer, and Computer), invented by J. Presper Eckert and John Mauchly between 1943-1946. The ENIAC was the first digital computer. This computer was massive in size, it was about 1,800 square feet and used about 18,000 vacuum tubes, and weighed between 30-50 tons. The ENIAC capable of adding 5,000 ten-digit decimal numbers per second, contained 7,200 crystal diodes, 1,500 relays, 70,000 resistors, 10,000 capacitors, and around 5 million hand-soldered joints.