C1 - Introduction To Computing
C1 - Introduction To Computing
Introduction To Computing
Objectives
Introduction to Computing Systems : Computer hardware and Software, Computing Environment Introduction to Programming : Computer language, computer program and computer application How does a computer run a program : edit, compile, link, load and execute a program Data representation and Number System
Word Processor SpreadSheet Database Management s/w CAD s/w Mathematical Computation s/w PC Macintosh Sun
Computing Environment
Computing Environment is a collection of computers / machines, software, and networks that support the processing and exchange of electronic information meant to support various types of computing solutions. Personal Computing Environment Time sharing Computing Environment Client/Server Computing Environment Internet Computing Environment Mobile Computing Environment Cloud Computing Environment
Personal computing
Time-sharing computing
Client/Server Computing
Internet Computing
Mobile Computing
Cloud Computing
Cloud computing is the delivery of computing as a service rather than a product, whereby shared resources, software and information are provided to computers and other devices as a utility (like the electricity grid) over a network (typically the Internet)
Computer Languages
1940s Low Level Language / Machine Language / Binary Language understood by computers 1950s Assembly Language (Symbolic Statement) 1960s High Level Language (English-like Commands) ex) C++, C, Fortran , Java, Basic 1990s Natural Language (Human Language) Writing program in high level language is certainly easier than writing in assembly or machine language WHY ?
Machine Language
00000000 0000000000000000 010111110 00001100 0000000000000010 11101111 0000000000000101 11101111 0000000000001011 00000100 11000010 00010110 10011110
Assembly Language
pusha1 -8(fp) pusha1 (r2) calls #2, read pusha1 -12(fp) pusha1 3(r2) calls #2, read add13 -8(fp), -12(fp), pusha 6(r2) calls #2, print clrl r0 ret
Assembly Language Example RD A RD B CLA A ADD B ST SUM PRT SUM HALT Read a number into memory location A. Read a second number into memory location B. Clear the ALU and add the number in A to it. Add the number in B to the ALU. Store the result from the ALU into location SUM. Send the number in SUM to the printer. Stop processing.
A C program int A,B,SUM; scanf (%d,%d, &A, &B); SUM = A + B; printf (The sum = %d \n, SUM); Read two integer numbers A and B. Add them up and assign in SUM Print the value of SUM.
C++ Program Scan for preprocessor directive Program translated by translator into Machine Language Link other Machine Language Program to Object Code exe file Load exe file into memory Receive Input / Produce Output
Object Code
Logic error Runtime error Execution error
Data Representation
In a computer, information is represented in binary/ base 2 Represented by 1 bit the value at any given time, either 0 or 1, low or high, off or on. 8 bit= 1 byte Sequence of bits may represent an instruction, numeric value, a character, a portion of an image or digital signal or some other type of data. 1000110 = 70 = F (ANSI) 1000001 = 65 = A (ANSI) 1100001 = 97 = a (ANSI)
2 10 2 10 2 10
As computer become more powerful, the amount of data that can be generated and processed is increasing
Number System
The base 10 number system has 10 decimal digits (0 9) 1 2 310 = 1x102 + 2x101 + 3x100 = 12310 The base 2 number system has 2 binary digits (0 1) 1 0 1 02 = 1x23 + 0x22 + 1x21 + 0x20 = 8 + 2 = 1010 The base 8 number system has 2 octal digits (0 7) 1578 = 1x82 + 5x81 + 7x80 = 64 + 40 + 7 = 11110
The hexadecimal / base 16 number system has 16 hexadecimal digits (0 9, A - F) 3EC16 = = = = 3x162 + Ex161 + Cx160 3x256 + 14x16 + 12x1 768 + 224 + 12 100410
How to convert from base 10 to any other base ? How to convert from base 8 to base 2 ? How to convert from base 16 to base 2 ?
Applications
Where can you apply the computer programs ? Computer program can be applied in lots of areas 1. Aeronautical Engineering - Exploration of Space design aircraft / spacesuit
- Applications Satellites GPS - communication
3. Chemical Engineering
- Colour and Opacity Testing - pH Identification