Introduction to computer programming concepts Understand the concepts

  • Slides: 18
Download presentation
Introduction to computer programming concepts

Introduction to computer programming concepts

Understand the concepts, implications and structures of programming, including: • the hierarchical structure of

Understand the concepts, implications and structures of programming, including: • the hierarchical structure of a computer as: • • • application software package (user interface) high-level programming language low-level programming language machine code (binary number notation) hardware • the main characteristics of high-level programming languages, including imperative, procedural, event-driven and object-orientated programming languages • the main characteristics of low-level programming languages, including assembly language and machine code • the main distinctions between programs in high-level and low-level forms in terms of structure, closeness to spoken language and intuition of use.

the hierarchical structure of a computer: • • • Application software package (user interface)

the hierarchical structure of a computer: • • • Application software package (user interface) high-level programming language low-level programming language machine code (binary number notation) hardware High-level language Programs are compiled Low-level language Machine code application software package Machine code is executed by the CPU Computer Hardware User Interface

Application software package (user interface) • This is the end result of programming. •

Application software package (user interface) • This is the end result of programming. • When an application is running, the user interface is what you see and interact with. • Applications software packages are created by programming with a high-level programming language.

High-level programming language • Quite close to natural human language (rather than machine code).

High-level programming language • Quite close to natural human language (rather than machine code). • What most programmers use to write programs. • Examples include: • • C# (C-Sharp) C++ Java Visual Basic • Can be written in code editing software like VB and Net. Beans

High-level programming language • Software for using high-level programming languages to create applications is

High-level programming language • Software for using high-level programming languages to create applications is know as an IDE, it includes code editing, file management, and debugging functions. • Creating a Macro by coding the instructions is an example of using a high-level programming language (Microsoft Visual Basic)

Low-level programming language • Close to machine code, needs fewer changes before a processor

Low-level programming language • Close to machine code, needs fewer changes before a processor can run it. • Written using an assembler. • Each simple command you type in gets assembled into the matching machine code instruction. • Can be called machine code or assembly code

Machine code • The actual binary code that the CPU can understand. • Before

Machine code • The actual binary code that the CPU can understand. • Before any program you write can run on a computer is must be compiled or assembled into machine code.

Hardware • Remember that the hardware is controlled by software run by the CPU

Hardware • Remember that the hardware is controlled by software run by the CPU as it decodes each machine code instruction to carry out actions such as adding numbers, displaying the user interface or loading files from disk storage into RAM

Practice: 1. Read: http: //www. bbc. co. uk/education/guides/z 6 r 86 sg/revision 2. Complete

Practice: 1. Read: http: //www. bbc. co. uk/education/guides/z 6 r 86 sg/revision 2. Complete activity: http: //www. bbc. co. uk/education/guides/z 6 r 86 sg/test Paste result in next slide (11). 3. Complete recap quiz: http: //www. bbc. co. uk/bitesize/quiz/q 28692589 Paste result in slide 12. 4. Read: http: //www. bbc. co. uk/education/guides/z 8 vrd 2 p/revision 5. Complete test: http: //www. bbc. co. uk/education/guides/z 8 vrd 2 p/test paste result in slide 13

Paste activity result (e. g. )

Paste activity result (e. g. )

Paste quiz result (e. g. )

Paste quiz result (e. g. )

Paste test result

Paste test result

Characteristics of high level programing languages • Imperative – a command you have to

Characteristics of high level programing languages • Imperative – a command you have to follow towards handling inputs and processing and outputs. • Procedural – step by step from a defined start to end point. • Event driven – triggered by events for example a mouse click. • Object-oriented – views programs as a collection of objects, not as a list of events or procedures.

High level langue • Visual basic • Java • C++ or c#

High level langue • Visual basic • Java • C++ or c#

Characteristics of low level programing languages • Mnemonics shortened words or phases that cause

Characteristics of low level programing languages • Mnemonics shortened words or phases that cause processes to happen. • E. g. MOV will move a file to a specific location. • Other low level langue's may only contain number and letter codes e. g. hexadecimal •

Recognise and understand: • the terms used in a computer programs, specifically: declaration, input,

Recognise and understand: • the terms used in a computer programs, specifically: declaration, input, output, assignment, variables (local and global) and constants, sub-routines, scope of variables • the need to annotate code to allow for maintenance • the use of data types, including character, string, integer, real and Boolean • the use of data structures, including records and simple arrays.

Terms used in a computer programs: • declaration • input • output • assignment

Terms used in a computer programs: • declaration • input • output • assignment • variables (local ) • variables (global) • Constants • sub-routines • scope of variables