Computer Science

Cards (428)

  • An algorithm is a set of instructions used by computers to solve problems or perform tasks
  • RAM (Random Access Memory) stores data temporarily while it's being used
  • A program is an instruction that tells the computer what to do
  • The CPU (Central Processing Unit) is where instructions are carried out by the computer
  • The input device allows data to be entered into the computer, such as keyboard, mouse, scanner etc.
  • A programmer writes code using an editor, which can be saved as source code files with the extension .java
  • .class file - contains bytecode that can be executed on the JVM (Java Virtual Machine)
  • The Java Development Kit (JDK) includes everything needed to write, compile, run and debug programs written in Java.
  • Laptop computers are portable with smaller screens and keyboards, run on batteries, and are suitable for travel.
  • Computer programs can be written using programming languages such as Python, Java, C++, Ruby, etc.
  • The output device displays information from the computer, such as monitor, printer, speakers etc.
  • Computers can be classified as desktop, laptop, tablet, smartphone, server, mainframe, supercomputer, embedded system, wearable technology, robotics, IoT devices.
  • Fetch-decode-execute cycle
    The process by which a computer's central processing unit (CPU) retrieves and executes instructions from memory
  • Fetch cycle
    1. Control unit sends a 'read' signal to the RAM on the control bus
    2. Uses the address bus to send signals specifying the required memory location in the RAM
    3. Contents are transferred to the CPU along the data bus
  • Control bus
    Manages the information flow between components, indicating whether the operation is a read or write and ensuring that the operation happens at the right time
  • During the decode and execute stages, the instructions are interpreted and carried out
  • Central Processing Unit (CPU)

    • Decodes the instruction
    • Executes the instruction
  • Arithmetic Logic Unit (ALU)

    • Carries out calculations
  • Roles of operating systems
    • Systems software management
    • Application software management
    • Memory management
    • File management
    • User interface
    • User management
    • Peripheral device management
  • Utility software
    • Encryption software
    • Data compression software
    • Defragmentation software
    • Backup software
    • Malware and anti-malware software
    • Repairing and converting software
  • Computer modelling
    • Attempts to abstract the rules and mechanisms that control real-life systems and apply them in computer programs
    • Can be used to answer 'what if' questions
    • Simulations will only be successful if all of the rules abstracted from the real-life systems are correct
  • Advantages of computer modelling
    • Ability to experiment without harm
    • New products can be tested without having to build prototypes
    • Tests can be quickly repeated
    • Changes to the rules and input data can be made quickly to see the outcomes
  • Disadvantages of computer modelling
    • The mathematical calculations may be too complex to model 'real life' situations
    • May be difficult to identify all of the rules correctly
    • The model is not reality so the answers might not be right
    • The processing power needed to run the simulations may be greater than what is available
  • Machine language
    The lowest-level programming language, consisting of instructions written as 1s and 0s that the processor can directly understand
  • Assembly language
    A low-level programming language that uses mnemonics to represent the machine code instructions
  • High-level language
    Programming languages that resemble human languages and address the programming logic rather than dealing with hardware issues
  • Uses of low-level languages
    • Often used in embedded systems
    • Used to write device drivers and real-time systems where speed is essential
    • Assembly language is specific to each type of CPU
  • Uses of high-level languages
    • Most software is developed using a high-level language
    • Less time-consuming to write and quicker to test
    • Programs are portable from one machine to another
  • Compiler
    Translates the source code into a standalone machine code program (object code) that can then be executed by the processor
  • Interpreter
    Translates the high-level code line by line into machine code, needed each time the program is run
  • Hub
    Sends every message to every computer on the network, creating extra unnecessary network traffic
  • Switch
    Reads the destination address (MAC address) of the messages and relays them only to the intended recipients
  • Router
    Connects different networks together, reads address information and forwards the messages to the correct networks
  • Wireless access point
    Converts data received through cables into wireless signals and vice versa, does not read destination addresses and directs messages to all devices
  • Data transmission
    1. Data is split into packets to avoid high bandwidth needed for large files
    2. Each packet has a header with source/destination addresses and position in message
    3. Footer informs receiving device this is the end of the packet
  • Layers of the TCP/IP model
    • Application Layer
    • Transport Layer
    • Internet Layer
    • Network Access Layer
  • Protocols in the TCP/IP model
    • Application Layer: FTP, HTTP, HTTPS, SMTP, POP, IMAP
    • Transport Layer: TCP, UDP
    • Internet Layer: IP
    • Network Access Layer: Ethernet, Wi-Fi
  • Protocols
    The rules that computers must follow when communicating over a network, to ensure data is sent and received accurately and goes to the correct address
  • TCP/IP
    A set of protocols that allows a computer to communicate across a wide area network, splitting data into packets, reassembling, encrypting/decrypting, and adding addresses to transmit to the correct destination
  • FTP
    File Transfer Protocol, provides the rules for file transfer between computers