Fundamentals of Computing - Principles of Computer Programming
Assembly Languages
- They are a type of high-level programming languages.
- It is more difficult to write in an assembly language than machine language.
- They run slower than machine language.
- Machine language is one step up from assembly languages.
- They create smaller programs.
High-Level Languages
- Advantages:
- Learning a high-level language takes less time than other types of computer languages.
- Programs written in high-level languages run faster than other types of computer languages.
- It is easy to create a compiler for a high-level language.
Types of Computer Languages
- HTML is an example of a Webpage language.
Color Representation
- A 4-bit code can represent a 16 color image.
- An 8-bit code can represent a 128 color image.
- A 16-bit code can represent a 65,536 color image, (2^{16} = 65536).
- A 24-bit code can represent a 16 million color image.
Flow Charts
- NOT true:
- It is usually created by programmers after writing a program.
- True:
- It shows programmers different algorithms before creating a program.
- It uses boxes of different shapes which indicate different types of instructions.
- It helps programmers pay attention to the logic of the solution to the problem.
SQL (Structured Query Language)
- SQL is a Database language.
Interpreters
- An interpreter is a computer program that converts the source code into machine language one line at a time.
Vector Graphics to Bit-map Image Conversion
- The process is called:
- Rendering
- Adapting
- Transforming
- Displaying
Data
- Data:
- It is information processed or stored by a computer.
- It can be in the form of figures, texts, images, or other types of information.
- It can be transferred from one computer to another.
- NOT true:
- It is stored and processed in decimal format.
Computer Languages
- Machine language uses binary code to communicate with the computer.
Western Text Characters
- Around 80 characters are used in Western text.
Memory
- Four Gigabytes is equal to 4096 Megabytes, (4 \text{ GB} = 4096 \text{ MB}).
BASIC Language
- A program that CANNOT be written in BASIC language:
High-Level Languages
- NOT true:
- High-level languages do not allow a program to be written on one computer and then run on a different computer.
- True:
- It is faster to write in a high-level language than in assembly language or machine language.
- Learning a high-level language takes less time.
- High-level languages are easier to read and understand.
Memory Conversions
- 2048 Kilobytes is equal to 2 Megabytes, (2048 \text{ KB} = 2 \text{ MB}).
Binary Representation of Five
- The binary code that represents the number five is 0101.
Application Languages
- NOT an application language:
- Examples of application languages:
Binary Number 1110 in Decimal
- The binary number 1110 represents 14 in decimal.
ASCII Characters
- ASCII allows 128 characters.
Data Characteristics
- Information is processed or stored by a computer.
- Information can be in the form of figures, texts, images.
- Information is stored and processed within a computer in binary format.
- Information can be transferred from one computer to another.
High-Level Languages
- NOT an example of a high-level language:
- Examples of high-level languages:
Text Composition
- Text is composed of characters, where each character is allocated its own binary code.
- Around 80 characters are used in Western text, including:
- 26 upper case letters
- 26 lower case letters
- 10 digits (0-9)
- around 20 marks punctuation
Compiler
- A compiler is a computer program which translates a series of high-level language codes into a separate series of machine language codes.
- Compilation takes two steps to convert the codes:
- The compiler converts the entire source code into machine language.
- The compiler then stores the machine language codes in a separate file, known as an executable file.
Webpage Languages
- Webpage languages allow users to create webpages.
- Webpage languages are easy to read and learn.
- Webpage languages are computer programming languages designed specially for creating webpages.
- Examples include HTML, Java and VBScript.
Software Development
- Software Development is a process of computer programming, documenting, maintaining, testing and big fixing through successive phases in an orderly way.
- Software development is interactive.
- Software development includes not only the actual writing of code, but also the preparation of objects, the planning of what is to be coded and the approval of the final results.
Algorithms
- Algorithms can be a simple or a complex procedure.
- Algorithms can be designed to tell a computer to do a math calculation or to provide the latest sales report.
- Algorithms are formulas which gives instructions for the computer to perform a specific task.
Bit-Mapped Graphics
- Bit-mapped graphics are displayed as a matrix of pixels.
- The color of each pixel is represented by a binary code.
- The more pixels in the image the higher the resolution.
Resolution
- Resolution is the number of pixels in the width and height of the image.
Graphics Representation
- Graphics can be represented in several ways, including:
Compilers & Interpreters
- Compilers & Interpreters function as translators converting code written in a programming language into the machine language to convert the source language to machine language.
- Because the computer only understands machine language, programmers need to use a compiler or an interpreter.
Computer Programmers
- Computer Programmers write step-by-step instructions which tell the computer exactly what it should do.
- Create orders for computers through computer programming languages, which are also called languages.