Comp Sci 2.5 Programming Languages and IDEs

0.0(0)
studied byStudied by 0 people
0.0(0)
full-widthCall with Kai
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
GameKnowt Play
Card Sorting

1/78

encourage image

There's no tags or description

Looks like no tags are added yet.

Study Analytics
Name
Mastery
Learn
Test
Matching
Spaced
Call with Kai

No study sessions yet.

79 Terms

1
New cards

What is the primary purpose of a high-level programming language (HLL)?

To allow humans to write code using English-like keywords that are easy to read and debug.

2
New cards

Name one example of a high-level programming language mentioned in the source material.

Python (or Java, C++, JavaScript).

3
New cards

How does the portability of high-level languages compare to low-level languages?

High-level languages are portable and can run on different CPU types, whereas low-level languages are CPU-specific.

4
New cards

In a high-level language, one line of code typically translates into _ lines of machine code.

Many

5
New cards

What is the only language that a CPU can understand directly?

Machine Code (Binary/1s and 0s).

6
New cards

Term: Assembly Language

Definition: A low-level language that uses mnemonics (like LDR or ADD) to represent machine code instructions.

7
New cards

In Assembly Language, one line of code typically translates into _ line(s) of machine code.

One

8
New cards

What is the main advantage of using a low-level language over a high-level language?

It provides the programmer with direct control over the CPU and memory.

9
New cards

Why must high-level code be translated before execution?

Computers can only execute machine code, so HLL must be converted for the CPU to process it.

10
New cards

What specific type of translator is used to convert Assembly Language into machine code?

Assembler

11
New cards

How does a compiler process source code during translation?

It translates the entire source code at once into a single executable file.

12
New cards

What is a significant advantage of using a compiler for a finished software product?

The program runs fast and the source code is kept secret from the user.

13
New cards

What happens if a compiler encounters a single error in the source code?

The entire compilation fails and no executable file is created.

14
New cards

How does an interpreter process source code during translation?

It translates and executes the source code line by line.

15
New cards

Why is an interpreter considered better than a compiler during the development/debugging phase?

It stops exactly where an error occurs, allowing for immediate testing and fixing.

16
New cards

What is a main disadvantage of running interpreted code for the end-user?

Programs run slower because they must be translated every time they are executed.

17
New cards

Term: Integrated Development Environment (IDE)

Definition: A software package that provides all tools needed to write, test, and debug code in one place.

18
New cards

In an IDE editor, what is the purpose of 'syntax highlighting'?

To colour keywords (like if or print) to make the code easier for humans to read.

19
New cards

How does 'auto-completion' in an IDE assist a programmer?

It suggests commands as the user types, reducing syntax errors and increasing speed.

20
New cards

In the context of IDE error diagnostics, what is a 'breakpoint'?

A tool that stops the execution of code at a specific line to inspect its state.

21
New cards

What is the function of a 'variable watcher' in an IDE?

It allows the programmer to see how a value changes in real-time as the program runs.

22
New cards

What is the role of the 'run-time environment' within an IDE?

It allows the programmer to quickly execute and test their code without leaving the editor.

23
New cards

Under what condition would a programmer choose to use a compiler over an interpreter?

When the program is finished and ready to be distributed or sold to users.

24
New cards

The CPU is often referred to as the _ of the computer.

Brain

25
New cards

What are the three stages of the cycle the CPU follows to process instructions?

Fetch, Decode, and Execute.

26
New cards

During the 'Fetch' stage, from where is the next instruction retrieved?

Main memory (RAM).

27
New cards

Which CPU component performs mathematical calculations and logical comparisons?

ALU (Arithmetic Logic Unit).

28
New cards

What is the primary role of the Control Unit (CU)?

To manage hardware, control data flow, and manage the Fetch-Execute cycle.

29
New cards

Why is 'Cache' memory located inside the CPU?

To provide extremely fast access to frequently used instructions so the CPU doesn't wait for RAM.

30
New cards

Which specific register holds the memory address of the next instruction to be processed?

Program Counter (PC).

31
New cards

What information is stored in the Memory Address Register (MAR)?

The address of the location in memory where data is to be fetched or stored.

32
New cards

What is the function of the Accumulator (ACC)?

To store the immediate results of calculations performed by the ALU.

33
New cards

How is CPU clock speed measured?

In Hertz (Hz), typically Gigahertz (GHz), representing cycles per second.

34
New cards

What is the performance benefit of a multi-core processor?

It allows the computer to process multiple instructions simultaneously (parallel processing).

35
New cards

Term: Embedded System

Definition: A small computer system designed for a specific, dedicated task within a larger system.

36
New cards

Give one example of an embedded system found in a household appliance.

Washing machine (controlling cycles) or Microwave (timer settings).

37
New cards

Why is RAM considered 'volatile' memory?

Because data is lost when the power is turned off.

38
New cards

What is the primary function of ROM (Read Only Memory)?

To store the BIOS or Bootstrap loader (startup instructions).

39
New cards

What happens during 'swapping' in the context of Virtual Memory?

Unused data is moved from RAM to secondary storage to free up space, then moved back when needed.

40
New cards

Why does using Virtual Memory make a computer run slower?

Secondary storage is much slower at data transfer than RAM.

41
New cards

Which type of secondary storage uses a read/write head and has the lowest cost per gigabyte?

Magnetic storage (HDD).

42
New cards

Why is Solid State storage preferred for portable devices?

It is highly durable (no moving parts) and has very fast access speeds.

43
New cards

How many bits are in a single 'Byte'?

8

44
New cards

Why do humans use Hexadecimal instead of long strings of binary?

It is easier for humans to read and remember.

45
New cards

What does 'Color Depth' represent in an image file?

The number of bits used to represent each pixel.

46
New cards

What is the definition of 'Metadata' in a file?

Hidden data about a file, such as its format, GPS location, or creation date.

47
New cards

How does 'Lossy' compression reduce file size?

By permanently removing data that humans cannot easily perceive.

48
New cards

Which network topology connects all devices to a central switch?

Star Topology.

49
New cards

What is the main disadvantage of a Mesh Topology?

It is very expensive and difficult to install due to the high number of connections.

50
New cards

Which network device sends data packets between different networks (e.g., LAN to Internet)?

Router

51
New cards

What is the difference between a MAC address and an IP address?

A MAC address is permanent/physical; an IP address is logical/changeable and used for routing.

52
New cards

Term: Protocol

Definition: A set of rules for how data is transmitted across a network.

53
New cards

Which email protocol is used for sending emails?

SMTP (Simple Mail Transfer Protocol).

54
New cards

What is one advantage of using 'Layers' in network communication?

It breaks communication into manageable pieces so developers can focus on one area at a time.

55
New cards

Which layer of the TCP/IP model handles web browsers and applications like HTTP?

Application Layer

56
New cards

How does a Firewall protect a network?

By monitoring traffic and blocking unauthorised access based on specific rules.

57
New cards

What is the purpose of 'Penetration Testing'?

Hiring ethical hackers to find system weaknesses before criminals do.

58
New cards

Which function of an Operating System allocates RAM to prevent applications from overwriting each other?

Memory Management

59
New cards

How does an Operating System perform 'Multitasking'?

By switching between processes so quickly that they appear to run at the same time.

60
New cards

What is the purpose of a 'Device Driver'?

To act as a translator between the Operating System and external hardware.

61
New cards

Why would a Magnetic Hard Drive benefit from 'Defragmentation'?

It reorganises files into contiguous blocks so the read/write head moves less, speeding up access.

62
New cards

Why should you NOT defragment a Solid State Drive (SSD)?

It can shorten its lifespan and provides no speed benefit as there are no moving parts.

63
New cards

What is the main difference between Open Source and Proprietary software?

Open Source makes the source code available to everyone; Proprietary keeps it hidden and restricted.

64
New cards

Term: Abstraction

Definition: Removing unnecessary details from a problem to focus on the essential parts.

65
New cards

Term: Decomposition

Definition: Breaking a complex problem down into smaller, more manageable sub-problems.

66
New cards

In a flowchart, what does a Diamond shape represent?

A Decision (Selection).

67
New cards

What is the difference between a Syntax Error and a Logic Error?

Syntax errors stop the program from running; logic errors allow the program to run but produce wrong results.

68
New cards

Which programming construct repeats a block of code a set number of times?

Count-controlled iteration (FOR loop).

69
New cards

The operator used to find the remainder after division is _.

MOD (Modulo)

70
New cards

The operator used to find how many whole times one number goes into another is _.

DIV (Quotient)

71
New cards

What is the difference between a 'Global Variable' and a 'Local Variable'?

Global variables work anywhere in the program; local variables only exist inside a specific sub program.

72
New cards

Which input validation check ensures that data is between two specific values (e.g., age 11-18)?

Range Check

73
New cards

In Boolean logic, which gate only outputs 1 if BOTH inputs are 1?

AND gate

74
New cards

What is the result of applying a NOT gate to an input of 0?

1

75
New cards

In Boolean logic, which gate outputs 1 if at least one input is 1?

OR gate

76
New cards

Term: Casting

Definition: The process of converting one data type to another (e.g., string to integer).

77
New cards

Which SQL keyword is used to specify which fields (columns) to display?

SELECT

78
New cards

Which SQL keyword is used to filter results based on specific criteria?

WHERE

79
New cards

What is the purpose of 'Maintainability' in coding?

To ensure code is easy for others to understand, debug, and update later.