1/223
All the content you need to know for GCSE Computer Science
Name | Mastery | Learn | Test | Matching | Spaced |
---|
No study sessions yet.
A logical shift involves moving each bit in a bit pattern a certain number of places to the left or right, and the empty spaces left are filled with zeros.
An arithmetic shift performs a similar operation, but on a shift right, the most significant bit (MSB) is copied into the empty spaces on the left, preserving the sign of the number in two's complement representation, whereas on a logical shift left, zeros are added to the right.
Please describe the fetch-decode-execute cycle performed by the CPU.
Fetch: The Control unit checks the PC for the address of the next instruction and loads it onto the MAR. The address from the MAR is used as the address to retrieve the instruction from. The instruction arrived at the MDR, then it is copied from the MDR onto the CIR. The PC is then incremented.
The Control Unit (CU) decodes the instruction stored in the Current Instruction Register (CIR) and splits it into two main components Opcode and Operands.
Execute: The instruction is executed and the results goes into the ACC, then it will be sent back to RAM, to be stored.
The address bus carries the memory addresses of data or instructions between the CPU and memory.
The data bus transmits the actual data and instructions between the CPU, memory, and other peripherals.
The control bus sends control signals from the control unit to other components of the computer, coordinating their actions.
Magnetic storage devices include hard disk drives (HDDs) and magnetic tape drives.
A HDD contains a stack of circular, metal platters that spin at high speed. These platters are coated with a magnetic material. Each platter has an electromagnetic read-write head on an arm that moves across the surface.
Data is stored on these platters as magnetic patterns. Each tiny area on the platter can be magnetised to represent a binary number: a north-to-south (1) or south-to-north (0).
To read data, the read head passes over the spinning platter and detects the magnetic orientation of these tiny areas. To write data, the write head magnetises these areas with the appropriate north or south pole.
Optical storage devices, including CDs, DVDs, and Blu-ray discs, use patterns of pits and lands on their surface to represent data.
Writing: A laser beam is fired to burn the disk to create pits (0) and land (1)
Reading: A laser beam is shone onto the disc, and the reflected light is interpreted as 1s and 0s based on whether it hits a pit or a land.
How do SSD write?
& read?
What are some typical forms?
Write: an electrical current is applied to the transistor, this forces electrons, through the barrier to trap them in electron pools. A full pool is 0 and an empty pool is 1.
Read: a small voltage is applied. If the pool is empty, the transistor turns on, a 1 is read. If the pool is full, the transistor does not turn on, a 0 is read.
Uses: USB sticks, phones, smart watches etc.
A key drawback of solid-state storage can be the relatively limited number of read-write cycles it can endure over its lifespan.
They also tend to be more expensive per unit of storage compared to magnetic storage.
Embedded systems are often single-purpose
have customised hardware and software
have limited memory and processing power
are designed for low power consumption
may have wireless connectivity
often have a minimal or no user interface
are typically small in physical size
are responsive to their environment
require low maintenance
usually operate in real-time.
It manages computer hardware and software.
Provides an interface between the user and hardware.
Provides common services for programs e.g. malware removal
What are the 5 main tasks performed by an Operating System?
Process management
Memory management
File management
User management
Peripheral management
Memory management is the operating system's task of controlling and coordinating the computer's main memory (RAM).
When a process is loaded into memory, the OS allocates blocks of memory called pages.
It keeps track of which parts of memory are currently being used and by which processes.
If memory becomes full, the OS may temporarily move inactive processes out of main memory into an area on the hard drive called virtual memory, freeing up RAM for active processes.
File management is the responsibility of the operating system to organise and keep track of files and folders stored on the computer's storage devices, such as hard drives and SSDs.
The OS maintains a hierarchical structure of directories (folders) and files.
It handles operations such as creating, deleting, copying, moving, and renaming files and directories.
File permissions control who can do what with each file, ensuring data security.
Peripheral management involves the operating system communicating with and controlling the computer's peripheral devices, such as printers, keyboards, and mice.
The OS uses special software called device drivers to enable communication between the operating system and each specific peripheral device.
These drivers need to be kept up to date so that peripherals continue to work as expected.
The round-robin algorithm is a scheduling algorithm used by the operating system in process management of CPU time.
In this algorithm, each process in the ready queue is allocated a short period of CPU time, known as a time slice or quantum.
If a process does not complete its execution within its time slice, it is moved to the back of the ready queue, and the next process in the queue gets its turn.
This ensures that all processes get some CPU time and prevents any single process from monopolising the CPU.
Files are handled normally over time (deletion, saving modification etc.)
At first the files are stored contiguously but as files are deleted, new smaller gaps of free space are created.
Then new files have to be stored in these gaps, but many do not fit so are split between these gaps making them non-contiguous.
So then files are broken up across the HDD, resulting in slower read & write speeds.
Yes but it does not affect their speed as data retrieval time is the same as there are no moving parts.
Antimalware software is a type of utility software designed to protect the computer system from malicious software (malware) such as viruses, worms, spyware, and ransomware.
It works by scanning files and system memory for known malware signatures and suspicious behavior.
If malware is detected, the antimalware software can quarantine, remove, or block it.
More sophisticated antimalware uses heuristic analysis to look for suspicious code patterns even in previously unknown malware.
They can handle unexpected inputs (out of their problem space) without crashing.
They are thus dependable and reliable in adverse conditions.
Three practices to make software more robust include adhering to good programming practices, carrying out regular code reviews, and keeping an audit trail. Good programming practices involve writing clear, well-structured code that anticipates potential errors.
Regular code reviews by other programmers can help identify and fix potential weaknesses.
An audit trail helps in tracing what changes were made to the code and when, which can be useful for debugging and identifying the cause of issues.
Audit trails are logs that record what changes were made to the software code and when, along with who made the changes.
Audit trails are useful for tracking the history of the software development, debugging issues, and ensuring accountability.
Could you provide examples of low-level programming languages?
Machine code
Assembly language
What are some key features of low-level programming languages?
Low-level languages are closely related to the computer's hardware. Machine code consists of binary instructions that the CPU can directly execute. Assembly language uses mnemonic codes that correspond to machine instructions. Low-level languages require a detailed understanding of the computer's architecture and are often machine-specific. They give the programmer direct control over hardware but are difficult and time-consuming to write.
Assembly language is a type of low-level programming language that uses symbolic representations, called mnemonics, for machine instructions.
Each mnemonic typically corresponds to a single machine code instruction.
Assembly language needs to be translated into machine code by an assembler before it can be executed by the computer.
What are some typical uses for low-level programming languages?
Low-level languages are often used for programming directly with computer hardware and for writing code that needs to be very efficient in terms of memory usage and execution speed. This includes writing device drivers and programming for embedded systems.
Could you give 3 examples of high-level programming languages?
C++
Java
Python
What are some characteristic features of high-level programming languages?
+ Readable & easy to use as they use English-like keywords and syntaxes
+ Problem orientated: programmers get to focus on the logic of the problem rather than details of the underlying hardware.
+ They are machine independent and thus device portable
= A single line of high level code corresponds to many lines of machine code
- Usually less resource efficient than low level languages.
What are some common uses for high-level programming languages?
High-level languages are widely used for developing a wide range of applications, including desktop software, web applications, mobile apps, and artificial intelligence programs. They provide libraries and tools that simplify complex programming tasks.
What are three disadvantages of using low-level programming languages?
Time: Low-level languages are time-consuming to write.
Technicality: Low-level languages are hard to learn and use effectively.
Portability: Low-level languages are often not portable between two devices.
What is one advantage of using low-level programming languages?
One advantage of low-level languages is that they allow for very efficient code in terms of memory usage and execution speed, giving the programmer direct control over the hardware.
What are three advantages of using high-level programming languages?
Three advantages of high-level languages are that they are easier and faster to write due to their more human-readable syntax, they are more portable across different computer architectures, and they allow programmers to focus on the problem rather than hardware details.
What is one disadvantage of using high-level programming languages?
One disadvantage of high-level languages is that they may be less efficient in terms of memory usage and execution speed compared to carefully written low-level code, as the translator may not always produce the most optimised machine code.
- Entire Program needs to be compiled before running after any source code modification, this can take time
- If there are errors the programmer, they are reported after the program finished running which wastes time and is harder to decode.
What are two advantages of using an interpreter?
Three advantages of using an interpreter are that it provides immediate feedback as code is executed line by line, making it easier to debug.
It is also platform-independent, as long as an interpreter is available for that platform, the code can be run. Interpreters are often better for testing and prototyping due to the ability to run code incrementally.
They are generally slower than compilers because every run the code needs to be translated.
There are several reasons to connect computers on a network,
including the ability to share data and software,
the capacity to share printers, hard drives and other hardware peripherals,
the facility to enable rapid deployment of new software and updates,
the potential to enable people to communicate with each other using services such as the web and web-based software,
and the possibility of collaborative working and video conferencing.
A local area network spans a small geographical area.
It is typically used in small organisations
LANs are often connected to WANs, e.g. the internet.
An IP address is a distinct numerical label assigned to each device connected to a computer network that utilises the Internet Protocol for communication, enabling data to be sent and received correctly.
An IP address is a unique numeric identifier for a device when it is connected to a network. This allows data to be sent and received correctly at the right device.
Describe the sequence of events when a HTML web page is requested
When a user enters a URL into their web browser, the browser sends a request containing the URL to a DNS server.
The DNS server then translates the domain name part of the URL into its corresponding IP address.
Once the browser has the IP address of the web server hosting the requested page, it sends an HTTP request to that server.
The web server then finds the requested page and sends it back to the browser in the form of data packets, which the browser then interprets and displays as the web page.
What journey do packets do across the network (including verification)?
The sending computer breaks down the data of a message or file into smaller units called packets.
These packets are then directed through the network by routers, which inspect the destination address in each packet and determine the most efficient path to the receiving computer.
The packets may take different routes across the network and might arrive at the receiving computer out of order.
The receiving computer reassembles these packets into the original message or file once all packets have been received
It then verifies the packets integrity using checksums within the packet headers.
What are Routers?
What does a router do when it receives a packet?
It examines the destination IP address located in the packet's header.
Using this address and its internal routing table, the router then determines the optimal next hop or the next network segment towards the packet's final destination.
It removes the MAC addresses previously on the packet and adds the MAC address of itself and the next node the packet is being forwarded to
It proceeds to forwards the packet accordingly.
Identify the three main components of a data packet and describe the information contained within each?
A data packet typically comprises three parts:
Header:
IP of destination and sender
Sequence number
Checksum
Total sum of packets
Body:
Data being sent
Footer:
End of packet flag
Describe the four steps a computer undertakes upon receiving data packets
When a computer receives data packets, it first checks that all the packets have been received.
Secondly, it verifies that each of the received packets is complete and uncorrupted by using the checksum information in the header.
Thirdly, it uses the sequence numbers in the headers to reassemble the packets into the correct order, reconstructing the original data.
Finally, once the data is reassembled and verified, the computer can then process or display the information contained within the packets, such as rendering a web page in a browser.
Bandwidth is the total volume of data that can be transferred by the network at one time, this total bandwidth is shared between all connected devices
Wi-Fi is a wireless communication medium that uses radio waves to transmit data over short to medium ranges (up to 100 m)
it is commonly used to connect devices to local area networks and the internet, offering flexibility and ease of installation.
It is susceptible to interference from walls and physical obstacles.
Easily wireless LANs can be created with Wi-Fi, allowing devices like laptops and consoles to connect without dedicated network cabling, provided they have the network ID and a password.
Wired networks generally offer more secure connections,
higher and more reliable data transfer speeds with high bandwidth (up to 10 Gigabits per second),
lower susceptibility to interference compared to wireless networks. The cables in wired networks have protective coverings making them less susceptible to interference.
What are protocols in network communication?
Why are they needed?
Protocols are a set of rules and procedures that govern how devices on a network communicate with each other, ensuring that data is transmitted and received correctly.
Protocols are needed:
to ensure that data is formatted correctly,
to ensure that addressing is correct,
to ensure that data is transmitted in an understandable way,
to ensure that errors are detected.
POP is an Application Layer protocol used by email clients to retrieve email messages from a mail server. Its use is to retrieve email from a server and then the email is deleted off the server.