1/158
Name | Mastery | Learn | Test | Matching | Spaced |
---|
No study sessions yet.
Why do programmers use hexadecimal numbers rather than binary numbers?
It is easier to say and memorise hexadecimal codes rather than binary codes as they are more simple
RAM
Random Access Memory
Volatile
Temporarily stores data (e.g. when apps are in use)
ROM
Read Only Memory
Non-Volatile
It stores firmware (BIOS,UEFI), which store instructions to boot-up the computer
What is an operating system?
Software which allows the user to control both hardware and software.
It hides the complexities of the hardware.
What is the user interface?
the part of the computer with which the user interacts with.
5 functions of the OS
Hardware management
File management
Memory management
Process management
Security management
Purpose of application software
Performs tasks related to end user
Define CLI
Command Line Interface
Users interact with the operating system using text commands
Define GUI
Graphical User Interface
Users interact with the OS with visual icons such as pointers, menus, windows
Advantages and Disadvantages of CLI
Advantages:
It takes up less system resources.
Useful for automated tasks
Commands are faster to type
Disadvantages:
Memorising the commands can be hard
Typing errors can occur
Less intuitive
Advantages and Disadvantages of GUI
Advantages:
Intuitive, user-friendly
Requires little prior knowledge of computers
Easier to understand and adaptable
Disadvantages:
Not good for repetitive tasks
Slower to find
Uses more system resources
Utility system software includes:
software which maintains and protects the OS(e.g. defragmenter)
What is cache
Cache is a device which is used between 2 devices that communicate at different speeds. It is commonly used between the CPU and RAM.
The CPU communicates at a much faster speed than RAM, so cache was made in order to increase the computer performance as CPU did not have to wait for RAM to fetch data.
It stores frequently used data.
What is the function of virtual memory
Used when RAM is full. The least frequently used data in RAM is swapped out into VM, and swapped back into RAM when there is space.
VM functions on an HDD
How many bits does ASCII use? Extended ASCII?
7 bits or 128 characters
Extended ASCII uses 8 bits
What is Unicode and why was it invented
Unicode is an international character code which includes all languages, made up of 2 or 4 byte (16 or 32 bit)
Unicode was invented as ASCII and extended ASCII had no standardisation because there were many different versions
What is the difference between logical right shift and arithmetic right shift?
In logical right shift, the empty spaces become zeros, but in arithmetic right shift, the empty spaces is one
Explain symmetric encryption
It uses the same pre-shared key to encode and decode data. The key is shared privately
Explain asymmetric encryption
A public key is shared publicly and it is used to encrypt data, but the message can only be decrypted by a private key, which is transferred to the recipient.
Compiler language
Translate high level language into machine code all at once
Executable format (.exe)
Independent, runs without needing translator software, easily distributable
If the code has errors or has a change, the code must be recompiled (creates more .exe files)
Needs to be compiled for specific machine architecture
Harder to debug
Fast execution speed
Memory heavy
The source code is not shown, which protects intellectual property
Creates two files to be maintained, one for editing and one for execution.
Interpreter language
Translates high level language into machine code one line at a time
Each line is executed after translation
If an error in the code is found, the program immediately stops
Dependent, needs translator software, not easily distributable
Cross platform
Easier to debug
Slow execution
No optimisation
Less RAM needed
Only one file is needed to be maintained
Needs to be translated everytime the program is run
Source code is made available
Why does the computer need to translate code before execution?
The code must be in binary or machine code in order for the processor to understand.
Computers use transistors, which has 2 states on or off. This can be represented by binary, which has 2 values, 1 or 0
4 ciphers and their types
Caesar cipher - shift cipher
Pigpen cipher - substitution cipher
Railfence cipher - transposition cipher
Vigenere cipher - Polyalphabetic substitution cipher
Bitmap graphics
Bitmap graphics contain the colour and position of millions of pixels (picture elements)
The colour is stored using hexadecimal code
What is colour depth
The number of bits used to encode the colour of each pixel
Standard colour depth is 24 bits (RGB)
High reso vs Low reso
Resolution is number of pixels per inch
High reso images have lots of small pixels
Low reso images have few big pixels
Vector graphics
Made up of simple shapes and lines
smaller than bitmap file
Not suitable for high quality pictures
Img reso formula
width*height
Img size formula
width x height x colour depth
Analogue sound
Sound which changes value constantly
What is sample rate and the unit
The number of times the audio amplitude is recorded
frequency
_hertz, standard is 44.1 kHz
Bit depth // Sample resolution
the number of bits available for each sample
Sampling
Measuring a soundwave at regular but different intervals
Audio file size formula
sample rate * bit depth * length
What is pseudocode
A standard way to show an algorithm without the rules of a programming language
What is an algorithm
A series of step-by-step instructions of a procedure
Lossy vs Lossless compression
Lossy compression : the original data is permanently deleted
Lossless compression : original data is not lost
NOT gates
Inverter
Outputs the opposite of the input
AND gates
Multiplication
Outputs the product of inputs
OR gates
Addition
Outputs the sum of inputs
NAND gates
NOT AND
Outputs the opposite of the product of inputs
NOR gates
NOT OR
Outputs the opposite of the sum of inputs
XOR Gate
Outputs zero when inputs are the same
Outputs one when inputs are different
Uses of logic gates
NAND gates are used in burglar alarms or buzzers
Circuits involving processing and computations
doorbells, street lights
Firmware
System software which is stored in ROM.
Initialises the hardware components and starts the OS when the computer is turned on.
Writing to magnetic storage (HDDs)
- Contains a stack of disks called platter
- Each disk has a magnetic coating on the surface.
- The data is recorded along tracks on the disks surface, separated by sectors
North = 1
South = 0
Reading from magnetic storage
The arm of the platter moves to be along the selected track
The disk spins so that the required sector of the track is under the arm's head
The magnetic coating sends a signal to the head, and the disk controller translates this into binary
Writing to optical data storage
A laser heats the surface of the disk, creating pits and land on the surface. The pits are lower than the land surrounding them, and they are unreflective.
Reading from optical data storage
The disk spins in the drive to ensure that all the data is read
A tracking mechanism moves the laser to the correct place
The laser shines onto the disk, and the light is reflected onto a sensor, which translates this into binary
Writing to Flash Drives
Control signals identify which bit is to be written to, and applies a high voltage
This pulls electrons into pools of the transistor, recording 1s and 0s
Electrons = 0
Empty pool = 1
Reading from Flash drives
Control signals identify which bit is to be read from, applying a small voltage.
The 1s and 0s from the pools are recorded
Why are SSDs not long term?
Writing to and reading from SSDs involve applying a voltage, which breaks down the transistor over time.
Why is camel case used?
There is easier readability
Consistency with programming
Variable names cannot include a space
High level programming language (HLL)
- Uses English command words, so it is easily understandable
- Has rich instruction set (sequencing, selection, iteration)
- Supports many different datatypes (Boolean, string, ...)
- Fewer lines of code can represent complex texts e.g. loops
- A line of code generates several executable instructions
- All HLLs need translator software
- Programmers do not need to know the specific machine architecture in order to understand it.
Low level programming language (LLL)
- Uses mnemonics/abbreviations or binary code, which is hard to understand
- Limited instruction set
- Cannot represent complex constructs
- No datatypes
- A line of code generates only one executable instruction.
- Programmers need to know specific details of machine architecture in order to understand it.
- Only assembler needs translator, otherwise LLL do not need translator software
Bit pattern
a collection of binary digits
e.g. ASCII code, hexadecimal
Memory address
A unique location in memory where instructions or data are stored
Buffer
most Input/Output devices have memory between the main system as they communicate at different speeds
Why does adding more RAM increase the computer's performance
More RAM means there is more space in RAM
This means VM needs to be accessed less, which increases the performance as the Swap In/Swap Out process takes time
ALU
Arithmetic Logic Unit
performs mathematical or logical operations in CPU
Register
storage inside the CPU
stores an instruction, an address, etc.
Control Unit
organises the actions of other CPU parts
Clock
an electronic device inside the CPU
used to sync the actions of other CPU units
CIR
Current Instruction Register
stores the current instruction being decoded/executed
ACC
Accumulator
used to hold the data during the calculations of the ALU
MDR
Memory Data Register
Stores the instruction that is currently being read from or written to.
MAR
Memory Address Register
stores the memory address of the memory currently being read/written
PC
Program Counter
stores the address of the next instruction
Fetch-Decode-Execute cycle
Fetch:
The address of the next instruction to be processed is copied onto MAR by PC
The control unit uses control bus to send read signal to read from memory
The data of the instruction’s memory address is copied onto data bus, and onto MDR
Decode:
The control unit analyses the data, and sends signals to other CPU components
Execute :
The instruction is executed by the ALU
The performance of the CPU
Clock Speed : The rate at which the instructions are processed by CPU. Faster clock speed, better performance
Number of processor cores: Parallel processing can be done, where the computer can multitask or perform the same task together
Size of cache : A larger cache means more frequently used data can be stored, so the CPU will not have to wait for RAM to access data, which improves bottleneck issue and speeds up processing
Cloud Storage
A form of secondary storage
Accessed via the Internet
Files in Cloud servers can be accessed anywhere on any device as long as there is internet
Virtualisation
Hiding the true physical nature of computer resources
Embedded device
a computer contained inside of another device that typically performs a single function.
Sequential computational model
follows instruction in an algorithm step by step
Parallel computational model
The tasks are shared equally between 2 or more processors in a computer
Needs an OS which can handle 2 or more processors
Needs software that is capable of splitting the tasks equally among the processors
Multi-Agent computational model
Separate algorithm are processed by different systems/agents to perform a function
Each agent acts independently, but they cooperate and communicate with one another
Network
an arrangement of computers and devices connected to share resources or data
Server
A powerful computer which provides the network with services such as storage or emails
Types of network connectivity
wired and wireless
Types of networks
PAN (personal area network) - data transmission across short distances
LAN (local area network) - a network across a small geographical area
WAN (wide area network) - network across a large geographical area
Network models
Client-server and peer-to-peer
Why are networks used?
To share access to the Internet
To share peripheral devices
To share file storage
To run software/security updates
Communication
How does a client-server model work?
The user uses its IP address to connect with the server’s IP. The server will authenticate the user, and the user will send a request to access its services. The server will provide its services.
How does a peer-to-peer model work?
There is no dedicated server ; each computer connected on a network can act as both a client or server. Simultaneously providing services to others while requesting services from others
Packet
In storage, data is in bits.
When data is sent over a network, it is a packet.
3 sections in packet :
- Header : Contains sender and receiver IP addresses, and the format of the packet (no. and order)
- Payload : contains the data
- Trailer : error checking e.g. checksum
Bus topology (Pros and Cons)
devices are connected along a single cable, with a terminator at the end to prevent data collisions.
Pros:
- Cheap to install
- easy to add more devices
Cons:
- when the cable is damaged, the entire network fails
- difficult to find a fault on the cable
- runs slower if there are more devices
- security risk
Ring topology (Pros and Cons)
cable connects the networked devices to each other in a loop/ring
Pros :
- adding extra devices won't affect performance
- easy to add devices
- no data collisions as the messages all travel in the same direction
Cons:
- whole network will fail when the cable fails or if a device fails
- it is a closed loop so the network must shut down for a while to add or remove a device
- hard to find fault
- expensive than bus
Star topology (Pros and Cons)
each network is connected to a central point ( a hub or switch)
Pros :
- when the cable is damaged, only the device connected to it fails, nott the entire network
- if a switch is used, the messages are sent to only the intended user, so it is more secure
- faults are easy to find
Cons:
- when the hub or switch fails, entire network fails
- expensive as u need to buy the switch/hub, and cables for each device
Mesh topology (Pros and Cons)
Devices in a mesh network will pass messages on to other devices within the network
Pros:
- not a lot of network traffic as messages can be easily rerouted
- high performance
Cons:
- difficult and expensive installation
- difficult to manage
Protocol definition
A set of rules which control the format of communications between devices on a network
What is eavesdropping
unauthorised sight of data being sent from one computer to another over a network (data interception)
Ways to prevent data interception
- Use a WEP or WPA encryption protocol and a firewall
- Use of wireless router by complex passwords
- Don't use public Wi-Fi connectivity
latency
The delay encountered by data travelling through network
Bandwidth
The amount of data which can be carried from 1 point to another on a network over a time
SMTP
Simple Mail Transfer Protocol
used when sending emails over the internet
controls the format of emails
commands email servers how to understand and respond to messages
POP(3)
Post Office Protocol (3)
used for retrieving email from an email server
you can download messages and then delete them from the server
there are storage limitations on the server, as well as privacy issues
more CPU time is used when a large number of emails are being downloaded
IMAP
Internet Message Access Protocol
allows emails to be accessed using multiple email clients
leaves messages on the server until deleted
changes are synced with the mail server in real time
Ethernet
A collection of family of protocols that is used for physical network connections in LAN
Wi-Fi
Wireless Fidelity
digital communications protocol which sets out how data is transmitted on wireless LANS
TCP
Transmission Control Protocol
provides a reliable connection between computers, checking whether the data is sent correctly
used when accessing web pages or email servers