0% found this document useful (0 votes)
57 views

C1 - Introduction To Computing

This chapter introduces computing systems including computer hardware, software, and various computing environments. It discusses how a computer runs a program by editing, compiling, linking, loading and executing it. Data representation and number systems such as binary, decimal, octal and hexadecimal are also covered. Finally, it provides examples of computer programming languages from machine language to high-level languages and discusses some applications of computer programs.
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
57 views

C1 - Introduction To Computing

This chapter introduces computing systems including computer hardware, software, and various computing environments. It discusses how a computer runs a program by editing, compiling, linking, loading and executing it. Data representation and number systems such as binary, decimal, octal and hexadecimal are also covered. Finally, it provides examples of computer programming languages from machine language to high-level languages and discusses some applications of computer programs.
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 23

BITG 1233 Programming Technique

CHAPTER 1 Introduction to Computing


By Aniza Othman

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

What is a computing systems?


It is a complete working system consists of computer hardware and software Computer hardware is the physical part of a system - Ex : Input/output devices, CPU (CU and ALU), Memory
unit, modem

Computer software is set of instructions that perform Operations


- Ex : Operating Systems / System Software , Application Software

Interface between operating system and application system


Students Engineers Scientist Lawyers Unix Linux Windows Android

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

You can be in any environment of computing as a user or as developer.

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

Use symbolic statement add - addition mul - multiplication

High-Level Language C++


#include <iostream> using namespace std; void main( ) Output { int number1, number2, result; cout<<"Enter first number : "; cin>>number1; cout<<"\nEnter second number : "; cin>>number2; result=number1+number2; cout<<"\nAddition of these two numbers : "<<result; cout<<endl<<endl; }

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.

Edit, Compile, Link/Load and Execute a High Level Language Program


Source File
Syntax error

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

2. Computer Science - Image processing / Image Analysis


- CGI for Visual Effects / Simulation

3. Chemical Engineering
- Colour and Opacity Testing - pH Identification

4. Robotics and Automation - Robot Coordinate System Transformation


- Robot Vision

You might also like