tailieunhanh - Lecture Introduction to programming with Java - Chapter 1: Introduction to computers and programming

In this chapter, the following content will be discussed: Hardware terminology, main memory, auxiliary memory, drives, writing algorithms using pseudocode, programming language code, the compilation process for non-java programs, object code, portability, java virtual machine, the compilation process for java programs, history of java. | Ch 1 - Introduction to Computers and Programming Hardware Terminology Main Memory Auxiliary Memory Drives Writing Algorithms Using Pseudocode Programming Language Code The Compilation Process for Non-Java Programs Object Code Portability Java Virtual Machine The Compilation Process for Java Programs History of Java 1 Hardware Terminology Computer system = all of the components shown below. 2 Hardware Terminology I/O = input and output devices Input examples: keyboard, mouse, scanner. Output examples: monitor (screen), printer. CPU = the computer's "brain." Synonyms: central processing unit processor microprocessor popular CPUs: Intel Core 2 Quad Intel Core i7 AMD Phenom II AMD Athlon 64 3 Main Memory When a computer performs calculations, it often needs to save intermediate results. It saves those intermediate results in the main memory storage area. Main memory is often called RAM (Random Access Memory). Memory contains storage boxes, and each storage box contains a piece of information. For example, if a program stores the word “Emu,” it uses six storage boxes: one for the first half of E, one for the second half of E, one for the first half of m, one for the second half of m, etc. 4 Main Memory Each of the six storage boxes used to store Emu is a byte. Computers don't understand the alphabet. They only understand 0’s and 1’s. So computers map each alphabet character to a series of sixteen 0's and 1's. For example, the letter E is 00000000 01000101. So in storing the letter E, main memory actually stores 00000000 01000101. Each of the 0's and 1's is called a bit. And each of the eight-bit groupings is a byte. The capacity (size) of memory is described in terms of number of bytes. RAM capacities in a typical computer range from 1 GB (gigabyte) to 8 GB. RAM is volatile – data is lost when power is turned off. Address Memory Contents 50,000 50,001 50,002 50,003 50,004 50,005 m E u 5 Auxiliary Memory Auxiliary memory is for saving data . | Ch 1 - Introduction to Computers and Programming Hardware Terminology Main Memory Auxiliary Memory Drives Writing Algorithms Using Pseudocode Programming Language Code The Compilation Process for Non-Java Programs Object Code Portability Java Virtual Machine The Compilation Process for Java Programs History of Java 1 Hardware Terminology Computer system = all of the components shown below. 2 Hardware Terminology I/O = input and output devices Input examples: keyboard, mouse, scanner. Output examples: monitor (screen), printer. CPU = the computer's "brain." Synonyms: central processing unit processor microprocessor popular CPUs: Intel Core 2 Quad Intel Core i7 AMD Phenom II AMD Athlon 64 3 Main Memory When a computer performs calculations, it often needs to save intermediate results. It saves those intermediate results in the main memory storage area. Main memory is often called RAM (Random Access Memory). Memory contains storage boxes, and each storage box contains a piece