SKJ2413 OBJECT ORIENTED PROGRAMMING
Chapter 1 2013
Mohd Fadzli Marhusin PhD (CompSc) UNSW (Cyber Security) Master (Info Tech) CompSc UKM BSc Info Studies (Info Systems Mgnt) UiTM American Associate Degree (Mgnt Info Systems) KYPM MCSE & MCTS Microsoft Faculty of Science and Technology (Information Security & Assurance Program) Universiti Sains Islam Malaysia Bandar Baru Nilai, 71800 Nilai, Negeri Sembilan, Malaysia fadzli@usim.edu.my +606 798 8000 ext 6663
1
Copyright Reserved. Mohd Fadzli Marhusin.
Computer Instruction
A computer program is a set of instruction that tell computer what to do. Computer Instruction is in the form of on and off switches. Often this is represented by a binary form of 1s and 0s. For instance: a = 97 = 1100001 b = 98 = 1100010 For additional examples please refer to http://www.asciitable.com/ & http://www.branah.com/ascii-converter.
Copyright Reserved. Mohd Fadzli Marhusin.
2
1
2/21/2013
Computer Instruction : Execution Flow
Any program you execute .e.g., a calculator, will be loaded first into RAM, then when the CPU is ready to execute, instructions will be transferred part by part from RAM into the CPU. The CPU is divided into Logic Unit – to deal with general execution (in and out) and Arithmetic Logic Unit – to deal with instruction related to mathematical calculation. The CPU also has a set of memory/cache hierarchy usually referred to as register, L1 and L2. From programmer point of view, the details of CPU architecture and the memory and how they work are not important as long as a program written execute well without any errors. .
Copyright Reserved. Mohd Fadzli Marhusin.
3
Computer Instruction : Cont’
You write a computer program using a high-level programming language, e.g. java. The java compiler and interpreter responsible to converting the code you write into form of on and off switches. When you execute a java program, the program is run within a contained environment