The ancient computers occupied more space and more infrastructure. So it took up-gradations through 5 generations to become the modern day computer. The generations of computer are discussed below as follows
First Generation ComputerÂ
Period :Â 1946-1959.
They used Vacuum tubes as their basic component. They produced more heat, so needed cooling devices. They consumed huge electricity, occupied huge spaces, huge costs, etc., Machine code was used as programming language.
Example : ENIAC
Second Generation Computer
Period :Â 1959-1965.
They used transistors as their components as they were cheap, compact, faster programming and produced less heat than the first generation computers. Assembly language and high-level programming languages like FORTRAN, COBOL was used.
Example : UNIVAC 1108
Third Generation Computer
Period :Â 1965-1971.
They used Integrated circuits instead of transistors. An Integrated Circuit consists of many transistors, resistors and capacitors along with the associated circuitry. The Integrated circuit was invented by Jack Kilby. It provided compactness, cost effectiveness, less electricity consumption, etc., High-level languages like FORTRAN-II TO IV, COBOL, PASCAL PL/1, BASIC, ALGOL-68 were used.
Example : Honeywell-6000 series
Fourth Generation Computer
Period :Â 1971-1980.
They used Very Large Scale Integrated (VLSI) circuits instead of Integrated circuits. VLSI  had the capability to have numerous transistors and other circuitry on a single chip. It still paved way for compactness, no requirement of cooling AC unit, affordable, powerful, etc., High-level languages like C, C++, DBASE etc., can be used.
Example : STAR 1000
Fifth Generation Computer
Period :Â 1980-present times.
The  VLSI technology was transformed into ULSI (Ultra Large Scale Integration) technology accommodating millions of electronic components in a chip. It provided way for artificial intelligence and created more powerful, compact, affordable, advanced computers. All high-level languages like C and C++, Java, .Net etc. can be used.
Example : Laptops