Presentation is loading. Please wait.

Presentation is loading. Please wait.

บทนำสู่คอมพิวเตอร์. Outline Computer Concepts Computer Components Software OS How to write a program? Program development.

Similar presentations


Presentation on theme: "บทนำสู่คอมพิวเตอร์. Outline Computer Concepts Computer Components Software OS How to write a program? Program development."— Presentation transcript:

1 บทนำสู่คอมพิวเตอร์

2 Outline Computer Concepts Computer Components Software OS How to write a program? Program development

3 Computer Concepts Computers –Universal Computational Devices Given enough time and memory, all computers are capable of computing exactly the same things (irrespective of speed, size or cost).- Turing’s Thesis –Level Categorization Machine Architecture Devices Circuits Program/Software Algorithm Application Software OS

4 Devices Each Mother board is composed by Hundreds of ICs (Integrated Circuits). Each IC could composed by millions of transistors. A CPU is also composed by millions of transistors. What is a transistor? VIA pc3500 Mainboard

5 Devices - Transistors Similar to a light switch Opened/Closed status depends on voltage provided Open switch: no current flows Closed switch: current flows

6 Devices - Transistors Symbolic Transistors (CMOS) A B G N Closed if gate is “on” Open if gate is “off” P Open if gate is “on” Closed if gate is “off” A B G

7 Devices - Transistors An OR Gate built from transistors D A B C OR gate c is 1 if either a or b is 1 a b c

8 Logic Circuits Adder Logic Circuits built by logic gates

9 Computer Architecture Composed by CPU (Central Processing Unit), Memory, and I/O. These three are connected by buses. When computing, data are fetched from memory to CPU. CPUMain Memory I/O buses

10 Computer Architecture - CPU Composed by ALU (Arithmetic & Logic Unit) and CU (Control Unit) ALU – computing CU – sequence control CPU Main Memory I/O buses ALU CU

11 Computer Architecture – Main Memory 2-based numbers, each called bit. 8 bits = 1 byte 1 kilobyte = 1024 bytes 1 megabyte = 1024 x 1024 bytes 1 gigabyte = 1024 x 1024 x 1024 bytes 1 terabyte = 1024 x 1024 x 1024 x 1024 bytes CPU Main Memory I/O buses 10111001 10111100 00011100 00110101 11111110 10000000 11111111 1 byte

12 Computer Architecture – I/O Input/Output Devices E.g. hard disk, CD/DVD reader, modem, wireless card, keyboard, mouse, etc. CPUMain Memory I/O buses

13 OS OS - Operating System What are OSs? –Programs that work between computer hardware and application programs. –[Computer] Resources Manager Resources including: CPU time, memory, I/O devices

14 Application Software A Sequence bits of command E.g. if we want to calculate the average value, we need to put the commands: 0100 0001 then 0001 1110 which change the following bits (0, 0), (1, 2), (2, 2), (3,4) from 1 to 0, then change (1, 1) and (1, 3) from 0 to 1, then…. We call such the sequence as a program/software. Main Memory 10111001 10111100 01011100 00110101 11111110 10000000 11111111 01000001 00011110 00000000 00000000 00000000 00000000 00000000 Instruction zone Data zone

15 How can we write a program? Machine Code Assembly ORG 80000 MOV A, #1 ADDA R0 10111001 10111100 01011100

16 How can we write a program? High-level Language csum=0; for i=1:10 a(i)=input('Enter a data entry:'); csum=csum+a(i); end avg=csum/10;

17 Program Development Problem Formulation Input/Output Algorithm Development Implementation Analysis & Testing Requirement Specification Design Coding Debugging Installation Maintenance

18 Communicate with other programmers? Flow chart g==ng>n return display ‘Less than this.’display ‘Greater than this.’ display ‘You got it.’

19 Communicate with other programmers? Pseudo code Algorithm arrayMax(A, n) Input array A of n integers Output maximum element of A currentMax  A[0] for i  1 to n  1 do if A[i]  currentMax then currentMax  A[i] return currentMax Example: find max element of an array


Download ppt "บทนำสู่คอมพิวเตอร์. Outline Computer Concepts Computer Components Software OS How to write a program? Program development."

Similar presentations


Ads by Google