Chapter 01 Introduction of Programming
1. The Working Model of Computer
1.1 Von Neumann Structure
1.2 The Component of Computer
A computer is composed of hardware and software. If hardware is the blood and flesh of a computer, the software is its soul.
To some extent, the performance of a computer is mainly determined by its hardware, while the function of a computer is mostly decided by its software.
-
hardware
-
Central Processing Unit, CPU
- Controller gets the instructions from memory and give order to other parts.
- ALU (Arithmetic Logic Unit) implement the arithmetic and logic computations described by instructions.
- Register temporarily stores the data needed to do the computation and the outcome of the computation, the state of current implementation and the address of the next instruction.
-
memory
Memory is used to store the ongoing program and the data used by the program.
The capacity of memory is much larger than register, but the access to register is much faster than memory.
-
Read Only Memory, ROM
-
Random Access Memory, RAM
If we turn off the computer, the content of ROM is still there, but the content of RAM will be lost.
-
-
peripheral device
- input/output device
- External storage permanently stores anything you want to keep while the computer is turned off
-
-
software
Software can be divided into:
system software
application software
and supporting software.
- Program is the description of processing objects (data structure) and processing rules(algorithm)
- Document is the explanation materials that helps understand the program.
A computer with only hardwares is called bare machine.
When software is added to the computer, it evolves into a more functional computer called virtual machine.
1.3 How Information is Represented in Computer
All information in the computer is eventually represented as a sequence of 0 and 1.
The basic unit of information is called bit, which means a binary digit.