1 of 30

Chapter 1

Introduction

For use with Foundations of Computer Science 5e by Behrouz Forouzan (ISBN 9781473787322) © 2023

2 of 30

Objectives

After studying this chapter, the student should be able to:

  • Define the Turing model of a computer.
  • Define the von Neumann model of a computer.
  • Describe the three components of a computer: hardware, data, and software.
  • List topics related to computer hardware.
  • List topics related to data.
  • List topics related to software.
  • Give a short history of computers.

For use with Foundations of Computer Science 5e by Behrouz Forouzan (ISBN 9781473787322) © 2023

3 of 30

Turing Model

The idea of a universal computational device was first described by Alan Turing in 1937. He proposed that all computation could be performed by a special kind of a machine, now called a Turing machine. He based the model on the actions that people perform when involved in computation. He abstracted these actions into a model for a computational machine that has really changed the world.

For use with Foundations of Computer Science 5e by Behrouz Forouzan (ISBN 9781473787322) © 2023

4 of 30

Data processors

Before discussing the Turing model, let us define a computer as a data processor. Using this definition, a computer acts as a black box that accepts input data, processes the data, and creates output data (Figure 1.1). Although this model can define the functionality of a computer today, it is too general. In this model, a pocket calculator is also a computer (which it is, in a literal sense).

For use with Foundations of Computer Science 5e by Behrouz Forouzan (ISBN 9781473787322) © 2023

5 of 30

Programmable data processors

The Turing model is a better model for a general-purpose computer. This model adds an extra element to the specific computing machine: the program. A program is a set of instructions that tells the computer what to do with data. Figure 1.2 shows the Turing model.

For use with Foundations of Computer Science 5e by Behrouz Forouzan (ISBN 9781473787322) © 2023

6 of 30

For use with Foundations of Computer Science 5e by Behrouz Forouzan (ISBN 9781473787322) © 2023

7 of 30

For use with Foundations of Computer Science 5e by Behrouz Forouzan (ISBN 9781473787322) © 2023

8 of 30

The universal Turing machine

A universal Turing machine, a machine that can do any computation if the appropriate program is provided, was the first description of a modern computer. It can be proved that a very powerful computer and a universal Turing machine can compute the same thing. We need only provide the data and the program—the description of how to do the computation—to either machine. In fact, a universal Turing machine is capable of computing anything that is computable.

For use with Foundations of Computer Science 5e by Behrouz Forouzan (ISBN 9781473787322) © 2023

9 of 30

VON NEUMANN MODEL

Computers built on the Turing universal machine store data in their memory. Around 1944–1945, John von Neumann proposed that, since program and data are logically the same, programs should also be stored in the memory of a computer.

For use with Foundations of Computer Science 5e by Behrouz Forouzan (ISBN 9781473787322) © 2023

10 of 30

Computers built on the von Neumann model divide the computer hardware into four subsystems: memory, arithmetic logic unit, control unit, and input/output (Figure 1.5).

Four subsystems

For use with Foundations of Computer Science 5e by Behrouz Forouzan (ISBN 9781473787322) © 2023

11 of 30

The von Neumann model states that the program must be stored in memory. This is totally different from the architecture of early computers in which only the data was stored in memory: the programs for their task was implemented by manipulating a set of switches or by changing the wiring system.

The memory of modern computers hosts both a program and its corresponding data. This implies that both the data and programs should have the same format, because they are stored in memory. In fact, they are stored as binary patterns in memory—a sequence of 0s and 1s.

The stored program concept

For use with Foundations of Computer Science 5e by Behrouz Forouzan (ISBN 9781473787322) © 2023

12 of 30

A program in the von Neumann model is made of a finite number of instructions. In this model, the control unit fetches one instruction from memory, decodes it, then executes it. In other words, the instructions are executed one after another. Of course, one instruction may request the control unit to jump to some previous or following instruction, but this does not mean that the instructions are not executed sequentially. Sequential execution of a program was the initial requirement of a computer based on the von Neumann model. Today’s computers execute programs in the order that is the most efficient.

Sequential execution of instructions

For use with Foundations of Computer Science 5e by Behrouz Forouzan (ISBN 9781473787322) © 2023

13 of 30

COMPUTER COMPONENTS

We can think of a computer as being made up of three components: computer hardware, data, and computer software.

For use with Foundations of Computer Science 5e by Behrouz Forouzan (ISBN 9781473787322) © 2023

14 of 30

Computer hardware today has four components under the von Neumann model, although we can have different types of memory, different types of input/output subsystems, and so on. We discuss computer hardware in more detail in Chapter 5.

Computer hardware

The von Neumann model clearly defines a computer as a data processing machine that accepts the input data, processes it, and outputs the result.

Data

For use with Foundations of Computer Science 5e by Behrouz Forouzan (ISBN 9781473787322) © 2023

15 of 30

The main feature of the Turing or von Neumann models is the concept of the program. Although early computers did not store the program in the computer’s memory, they did use the concept of programs. Programming those early computers meant changing the wiring systems or turning a set of switches on or off. Programming was therefore a task done by an operator or engineer before the actual data processing began.

Computer software

For use with Foundations of Computer Science 5e by Behrouz Forouzan (ISBN 9781473787322) © 2023

16 of 30

For use with Foundations of Computer Science 5e by Behrouz Forouzan (ISBN 9781473787322) © 2023

17 of 30

For use with Foundations of Computer Science 5e by Behrouz Forouzan (ISBN 9781473787322) © 2023

18 of 30

HISTORY

In this section we briefly review the history of computing and computers. We divide this history into three periods.

For use with Foundations of Computer Science 5e by Behrouz Forouzan (ISBN 9781473787322) © 2023

19 of 30

Mechanical machines (before 1930)

During this period, several computing machines were invented that bear little resemblance to the modern concept of a computer.

  • In the 17th century, Blaise Pascal, a French mathematician and� philosopher, invented Pascaline.
  • In the late 17th century, German mathematician Gottfried Leibnitz� invented Leibnitz’ Wheel.
  • The first machine that used the idea of storage and programming� was the Jacquard loom, invented by Joseph-Marie Jacquard at the� beginning of the 19th century.

For use with Foundations of Computer Science 5e by Behrouz Forouzan (ISBN 9781473787322) © 2023

20 of 30

  • In 1890, Herman Hollerith, working at the US Census Bureau,� designed and built a programmer machine that could automatically� read, tally, and sort data stored on punched cards.
  • In 1823, Charles Babbage invented the Difference Engine. Later,� he invented a machine called the Analytical Engine that parallels� the idea of modern computers.

For use with Foundations of Computer Science 5e by Behrouz Forouzan (ISBN 9781473787322) © 2023

21 of 30

The birth of electronic computers (1930–1950)

Between 1930 and 1950, several computers were invented by scientists who could be considered the pioneers of the electronic computer industry.

The early computers of this period did not store the program in memory—all were programmed externally. Five computers were prominent during these years:

  • ABC

Early electronic computers

  • Z1
  • Mark1
  • Colossus
  • ENIAC

For use with Foundations of Computer Science 5e by Behrouz Forouzan (ISBN 9781473787322) © 2023

22 of 30

The preceding five computers used memory only for storing data, and were programmed externally using wires or switches. John von Neumann proposed that the program and the data should be stored in memory. That way, every time we use a computer to do a new task, we need only change the program instead of rewiring the machine or turning hundreds of switches on and off.

Computers based on the von Neumann model

The first computer based on von Neumann’s ideas was made in 1950 at the University of Pennsylvania and was called EDVAC. At the same time, a similar computer called EDSAC was built by Maurice Wilkes at Cambridge University in England.

For use with Foundations of Computer Science 5e by Behrouz Forouzan (ISBN 9781473787322) © 2023

23 of 30

Computer generations (1950–present)

Computers built after 1950 more or less follow the von Neumann model. They have become faster, smaller, and cheaper, but the principle is almost the same. Historians divide this period into generations, with each generation witnessing some major change in hardware or software (but not in the model).

The first generation (roughly 1950–1959) is characterized by the emergence of commercial computers.

First generation

For use with Foundations of Computer Science 5e by Behrouz Forouzan (ISBN 9781473787322) © 2023

24 of 30

Second-generation computers (roughly 1959–1965) used transistors instead of vacuum tubes. Two high-level programming languages, FORTRAN and COBOL invented and made programming easier.

Second generation

The invention of the integrated circuit reduced the cost and size of computers even further. Minicomputers appeared on the market. Canned programs, popularly known as software packages, became available. This generation lasted roughly from 1965 to 1975.

Third generation

For use with Foundations of Computer Science 5e by Behrouz Forouzan (ISBN 9781473787322) © 2023

25 of 30

The fourth generation (approximately 1975–1985) saw the appearance of microcomputers. The first desktop calculator, the Altair 8800, became available in 1975. This generation also saw the emergence of computer networks.

Fourth generation

This open-ended generation started in 1985. It has witnessed the appearance of laptop and palmtop computers, improvements in secondary storage media (CDROM, DVD and so on), the use of multimedia, and the phenomenon of virtual reality.

Fifth generation

For use with Foundations of Computer Science 5e by Behrouz Forouzan (ISBN 9781473787322) © 2023

26 of 30

COMPUTER SCIENCE AS A DISCIPLINE

With the invention of computers, a new discipline has evolved: computer science. Like any other discipline, computer science has now divided into several areas. We can divide these areas into two broad categories: systems areas and applications areas. This book is a breadth-first approach to all these area. After reading the book, the reader should have enough information to select the desired area of specialty.

For use with Foundations of Computer Science 5e by Behrouz Forouzan (ISBN 9781473787322) © 2023

27 of 30

OUTLINE OF THE COURSE

After this introductory chapter, the book is divided into five parts.

Part I: Data representation and operation

This part includes Chapters 2, 3, and 4. Chapter 2 discuss number systems, how a quantity can be represented using symbols. Chapter 3 discusses how different data is stored inside the computer. Chapter 4 discusses some primitive operations on bits.

For use with Foundations of Computer Science 5e by Behrouz Forouzan (ISBN 9781473787322) © 2023

28 of 30

Part II: Computer hardware

This part includes Chapters 5 and 6. Chapter 5 gives a general idea of computer hardware, discussing different computer organizations. Chapter 6 shows how individual computers are connected to make computer networks, and internetworks (internets).

This part includes Chapters 7, 8, 9, and 10. Chapter 7 discusses operating systems. Chapter 8 shows how problem solving is reduced to writing an algorithm for the problem. Chapter 9 takes a journey through the list of contemporary

programming languages. Finally, Chapter 10 is a review of software engineering.

Part III: Computer software

For use with Foundations of Computer Science 5e by Behrouz Forouzan (ISBN 9781473787322) © 2023

29 of 30

Part IV: Data organization and abstraction

Part IV includes Chapters 11, 12, 13, and 14. Chapter 11 discuss data structure, collecting data of the same or different type under one category. Chapter 12 discusses abstract data types. Chapter 13 shows how different file structures can be used for different purposes. Finally, Chapter 14 discusses databases.

Part V: Advanced topics

This part covers Chapters 15, 16, 17, and 18. Chapter 15 discusses data compression. Chapter 16 explores some issues to do with security. Chapter 17 discusses the theory of computation. Finally Chapter 18 gives some idea of artificial intelligence, a topic with day-to-day challenges in computer science.

For use with Foundations of Computer Science 5e by Behrouz Forouzan (ISBN 9781473787322) © 2023

30 of 30

Part VI: Social media and social Issues

Part VI briefly discusses social media and social issues, two topics that students of computer science may be interested to explore.

For use with Foundations of Computer Science 5e by Behrouz Forouzan (ISBN 9781473787322) © 2023