Until the first electronic computers emerged in the late 1940s, computers were either mechanical or electromechanical. The oldest computer still in existence is a mechanical calculator built by the French mathematician and inventor Blaise Pascal in 1643 called the Pascaline. The Pascaline could add and subtract numbers by rotating a number of cog wheels. The German mathematician and philosopher Gottfried Leibniz built a machine in 1694 that could perform all four arithmetical operations. Although Leibniz's machines were not very practical, Charles Xavier Thomas, a French inventor, in the 19th century was successful in improving and commercializing Leibniz's machines.
The first successful mechanical computer in Japan was the Automatic Abacus completed in 1902 by Ryoichi Yazu. Yazu received a patent in 1903 and produced and sold 200 of his Automatic Abacuses. The Automatic Abacus could do all four arithmetical operations, and numbers were entered in a way similar to an abacus. A unique mechanism performed carrying operations for multiplication and division and also automatically stopped operations when a calculation came to an end. The Automatic Abacus was forgotten thereafter for many years until it was rediscovered in 1965. Torajiro Omoto, in 1923, developed a mechanical desktop calculator that improved upon the German-made Brunsviga mechanical calculator that he sold under the name Tora Brand Calculator. He later rebranded his calculator the Tiger Calculator, which sold very well because it was cheaper than foreign calculators. The Tiger Calculator remained in production until 1960.
Over time, motors were added to manually operated mechanical desktop calculators leading the way to electric-powered desktop calculators.
Slightly earlier, Charles Babbage in England strove to perfect a gear-and-wheels-based machine called the Difference Engine that would create numerical tables using the method of finite differences. He created a small prototype of the Difference Engine in 1832, but abandoned any further development and started studying the Analytical Engine sometime around 1834. Although the Analytical Engine was mechanical, it consisted of a memory unit and an arithmetic logic unit and used punched cards fed in externally to control the Engine's program. Although it was never completed, the Analytical Engine was the precursor to today's computers.Electromechanical Computers
It became possible to develop electrically powered calculators with the advent of small electric motors near the end of the 19th century. Herman Hollerith in the United States developed a mechanical tabulator based on punched cards in 1884 to speed up the tabulation of statistical data. This developed into the Hollerith Punched Card system, which was widely used in business operations well into the 20th century.
In Japan, Ichitaro Kawaguchi, an engineer at the Ministry of Communications and Transportation, built a prototype machine in 1905 called the Kawaguchi Electric Tabulation Machine, which was similar to Hollerith's tabulating machine.
Konrad Zuse, a German computer pioneer, developed the Z1 mechanical computer in 1938 that used electric power for program control and developed the Z2 and Z3 during WWII using relays. George Stibitz, in the United States, led the development of the relay-based Complex Number Calculator (Model I) in 1940 at Bell Labs. The Model I was followed by Models II to V, which were also relay-based computers.
Working at Harvard University, Howard Aiken developed the Harvard Mark I, an automatic electromechanical computer, in 1944. Punched paper tape controlled program sequencing and a motor drove interconnected rotary switches.
In the 1930s, Akira Nakashima at NEC was involved in researching logical methods of designing relay circuits and, together with Masao Hanzawa, published a paper on switching theory. Kanichi Ohashi and Mochinori Goto at the Electrotechnical Institute (today the National Institute of Advanced Industrial Science and Technology) extended this switching theory to logical algebra and logic theory. Yasuo Komamiya applied this logic theory to electronic computation circuit theory and developed the relay-based ETL Mark I computer in 1952 and the ETL Mark II in 1955. Claude Shannon in the United States published a similar switching theory paper after Akira Nakajima and the others had published their papers．
Hideo Yamashita at the Tokyo Imperial University was involved in statistical computer research during WWII and in 1948 developed the Statistical Machine of Yamashita Type, which consisted of relays and counting registers. The machine was later commercialized by Fujitsu and NEC in 1952. Fujitsu completed the relay-based FACOM 100 computer in 1954.Vacuum-Tube Computers
The United States aggressively pursued computer research and development during WWII, leading to the completion of the vacuum-tube-based ENIAC in 1946. Although this computer did not store programs internally, its architecture allowed various programs to be executed by manipulating switches and cables. Following the ENIAC, a succession of vacuum-tube-based computers with stored programs were developed.
Computer R&D in Japan began after the end of WWII. Around 1950, Osaka University, Fuji Photo Film, and the University of Tokyo almost simultaneously began developing vacuum-tube computers. Kenzo Joh at Osaka University prototyped an ENIAC-type arithmetic system in 1950 and then began developing a true binary vacuum-tube computer. Around 1959, the basic functionality and operations of the computer were verified, but the computer's development was abandoned, as transistor-based computers for business machine applications were coming on the scene.
At Fuji Photo Film, Bunji Okazaki began developing the FUJIC vacuum-tube computer in 1949 to automate lens design calculations. The FUJIC was completed in 1956. The University of Tokyo, with a scientific research grant from the Ministry of Education in 1951, began research into computers and then partnered with Toshiba in 1952, after receiving an institute research grant worth 10.11 million yen, to develop the TAC vacuum-tube computer, which was completed in 1959.
Japan never developed a vacuum-tube computer for the commercial market, and no technology was ever directly transferred from vacuum-tube computers to second-generation machines. Nevertheless, vacuum-tube computers did play a huge role in educating and nurturing people who would go on to be computer pioneers.Parametron Computers
Parametron computers were unique to Japan, using the parametron circuit invented in Japan. Eiichi Goto, working at the University of Tokyo, invented a new arithmetic circuit element called the parametron in 1954. The University of Tokyo began developing the prototype PC-1 parametron computer in parallel with the TAC vacuum-tube computer. Following the University of Tokyo's lead, the Telecommunications Research Laboratory of the Nippon Telephone and Telegraph Public Corporation (today's NTT), Tohoku University (jointly with NEC), KDD Research Laboratories, and other Japanese universities and institutes started researching and developing their own parametron computers. The Telecommunications Research Laboratory put the MUSASINO-1 into operation in 1957, making it the world's first parametron computer. A string of corporations — including Hitachi, NEC, Fuji Tsushinki Manufacturing (now Fujitsu), Oki Electric, Nippon Denshi Sokki, and Koden Electronics — released commercial parametron computers. Oi Electric even produced a parametron calculator．
Parametron computers were mainly used for scientific and engineering calculations and, thus, employed binary parallel architectures. Parametron computers offered excellent reliability, but they were slower and consumed more power than transistor computers. There was also a ceiling to how far they could be improved. So as the reliability of transistors improved, parametron computers were replaced by transistor computers and parametron computer development came to an end in the early 1960s．
Transistors were invented in 1948 by John Bardeen, Walter Brattain, and William Shockley at Bell Labs. Bell Labs developed the TRADIC transistor computer in 1954, but it did not have stored programs. The Electrotechnical Laboratory moved on to transistor computer R&D after relay computers and finished the prototype ETL Mark III in 1956. This was one of the world's first stored-program transistor computers. The Electrotechnical Laboratory developed the production-ready ETL Mark IV in 1957, from whose technology NEC developed the NEAC-2201 in 1958 and Hitachi developed the HITAC 301 in 1959．
The ETL Mark IV used a magnetic drum for its internal memory unit. The Electrotechnical Laboratory improved on this machine, by adding a magnetic core memory for example, and developed the ETL Mark IV A in 1959. In the same year, Kyoto University and Hitachi jointly developed the KDC-1 for Kyoto University．
Mitsubishi Electric developed the MELCOM 1101 in 1960, which had an add-on high-speed arithmetic unit. In 1961, Fujitsu came out with its first transistor computer, the FACOM 222, and Oki Electric developed the OKITAC5090, which used magnetic core memory for all internal memory. Also in the same year, Kyoto University and Toshiba jointly developed Japan’s first microprogram-controlled computer, the KT-Pilot. In 1962, NEC announced the large-scale NEAC-2206 computer. In 1963, Fujitsu developed the small, general-purpose FACOM 231 computer, and Toshiba developed the TOSBAC-3400 computer for scientific calculations based on the KT-Pilot．
Mamoru Hosaka and others at the Japanese National Railways' R&D Institute (today the Railway Technical Research Institute) designed MARS-1, a seat reservation system that used online real-time processing, and Hitachi produced the system. The MARS-1 system went into operation in January 1960, becoming the world's first seat reservation system for trains. MARS-101, MARS-1's successor, was completed in 1964．
Until the early 1960s, Japan had been developing computer products that made use of domestic parametron and transistor technologies. However, in response to the growing application of computers in data processing systems, Japanese developers started adopting technologies from overseas companies as well. Hitachi entered into a technology-sharing agreement with RCA to bolster its product line. NEC made a similar arrangement with Honeywell, and Mitsubishi Electric partnered with TRW.