Summary

These notes provide a comprehensive overview of computer science concepts, including the architecture of the CPU, different types of memory and storage, and how data is represented in computers. It looks at the basic elements of computer systems.

Full Transcript

1.1 - Systems Architecture ========================== **1.1.1 Architecture of the CPU** [The purpose of the CPU:] **Computer:** an electronic device which takes input, processes data, and delivers output The purpose of the CPU is to fetch, decode and execute instructions. The fetch-execute-deco...

1.1 - Systems Architecture ========================== **1.1.1 Architecture of the CPU** [The purpose of the CPU:] **Computer:** an electronic device which takes input, processes data, and delivers output The purpose of the CPU is to fetch, decode and execute instructions. The fetch-execute-decode cycle: - - - - - - [Common CPU components and their function:] - - - - [Von Neumann architecture:] John von Neumann designed computers where **both instruction data AND program data are stored in the same memory in binary form.** Key characteristics: CPU, CU, ALU, onboard cache, internal clock Each instruction is stored in a location in the memory and each location has an address. So, the processor can fetch an instruction stored in e.g. memory address 1, and bring it back to the processor. In order to do this, they make use of special-purpose registers: - - - - - **Buses:** sets of wires used to transfer data and signals between CPU and memory - - - - - - **1.1.2 CPU performance** [How common characteristics of CPUs affect their performance:] - - - - - - - - - - - - - - - - - - - **1.1.3 Embedded systems** [The purpose and characteristics of embedded systems:] **Embedded system:** a computer system with a dedicated function within a larger mechanical/electrical system. They are dedicated to a specific task meaning design engineers can optimise them to reduce size and cost of product, as well as increase its reliability for the given task. Typical properties: - - - - But comes at the cost of limited processing resources making them more difficult to program and interact with. [Examples of embedded systems:] - - - 1.2 - Memory and Storage ======================== **1.2.1 Primary storage (memory)** [The need for primary storage:] - - - [The difference between RAM and ROM:] +-----------------------------------+-----------------------------------+ | RAM | ROM | +===================================+===================================+ | - - - - | - - - | +-----------------------------------+-----------------------------------+ [The purpose of ROM in a computer system:] - - [The purpose of RAM in a computer system:] - - [Virtual memory:] - - - - [Cache:] - - - - - - **1.2.2 Secondary storage** [The need for secondary storage:] ROM is read only and RAM is volatile so it is: - - - [Common types of storage:] Drive: The device that reads and writes data from secondary storage Media: What the data is actually stored on - - - - - - - - - - - - - - - - - **1.2.3 Units** [The units of data storage:] - - - - - - - - [How data needs to be converted into a binary format to be processed by a computer:] Everything stored in a computer system is in binary digits - bits - (2 different states): 0 and 1. Makes it easier and therefore cheaper to manufacture electronic devices. It also makes them more reliable. Binary 0 = Off Binary 1 = On E.g. a capacitor has charge (1) or doesn't (0) [Data capacity and calculation of data capacity requirements:] **1.2.4 Data storage** **Numbers** [How to convert positive denary whole numbers to binary numbers (up to and including 8 bits) and vice versa.] ![](media/image8.png) [How to add two binary integers together (up to and including 8 bits) and vice versa:] Example: ![](media/image14.png) Overflow error: Due to the overflow error, the binary does not equal the denary, 317, because 317 is too big to be stored in an 8 bit binary. Another extra column to the left will have to be added. When the result of an addition is too large for the number of bits the computer works with there will be an overflow error. [How to convert positive denary whole numbers and binary integers into 2-digit hexadecimal numbers and vice versa:] Hexadecimal: 123456789A(10)B(11)C(12)D(13)E(14)F(15) ![](media/image2.png) Computers don't use hexadecimal but are useful for representing large binary numbers in a smaller number of digits. Used in computer science for colours and mac addresses. Advantages for programmers and Computer Scientists in using hex rather than binary: 1. 2. 3. 4. Most Significant Bit - left most bit in any representation. This is because it represents the most significant (largest) VALUE Least Significant Bit - right most bit in any representation. [Binary shifts:] - - - - Example (left shift): ![](media/image24.png) Example (right shift): **Characters** [The use of binary codes to represent characters:] Each character is represented by a UNIQUE binary number Character sets are logically ordered, e.g. the character code for 'B' will be one more than the character code for 'A'. [The term 'character set':] A character set is a defined list of characters recognised by the computer. [The relationship between the number of bits per character in a character set, and the number of characters which can be represented, e.g. ] - - - **Images** [How an image is represented as a series of pixels, represented in binary:] Bitmap - image made up of different coloured squares called pixels: - - - - - A pixel is the ***smallest addressable part*** of an image. It can have only one colour at a time, but it is addressable, which means the colour can be changed. **Image resolution** -- is expressed as the number of pixels in the image [Metadata:] Additional data stored with the image such as the width, height, resolution and colour depth of the image [The effect of colour and depth resolution on:] - - **Sound** [How sound can sampled and stored in digital form:] [ ] Sampling involves measuring the amplitude of a wave at regular intervals. These are then quantised (rounded) into one of a set number of values and stored together in a binary file. [The effect of sample rate, duration and bit depth on: the playback quality, the size of a sound file:] Sampling Rate/frequency is the number of times the sound is sampled per second -- measured in Hertz (Hz) or Kilohertz. By taking samples at more frequent intervals, the digital signal will come closer to approximating the analogue signal. Sampling depth is the number of bits per sample - will increase playback quality and the size of the sound file. Bit rate is the space available for each sample measured in kilobits/sec. **1.2.5 Compression** [The need for compression:] - - [Types of compression:] - - - - - - - - 1.3 -- Computer networks, connections and protocols =================================================== **1.3.1 Networks and topologies** [Types of network:] - - - - - - - - +-----------------------------------+-----------------------------------+ | Advantages of networks | Disadvantages | +===================================+===================================+ | - - - - | - - - | +-----------------------------------+-----------------------------------+ [Factors that affect the performance of networks:] - - - - - - - - - - - - - - - - - - - - - - - - To improve the performance of a network, you could: - - - - [The different roles of computers in a client-server and a peer-to-peer network:] Client-server: - - - - - - - Peer-to-peer: - - - - - - - - - - [The hardware needed to connect stand-alone computers into a Local Area Network: ] - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - [The Internet as a worldwide collection of computer networks:] - - - - - - - - - ![](media/image9.png) - - - - - - - - - Top level - generic root to many websites, second level denotes type of organisation, third level is organisation name. - - - - [Star and Mesh network topologies:] ![](media/image27.png) Star: Advantages Disadvantages ------------------------------------------------------------ --------------------------------------------------------- Fast data transfer as there are few data collisions Requires additional hardware such as the central switch If one cable fails the other workstations are not affected If the central device fails the whole network goes down Mesh: Partial mesh network model usually used, often in conjunction with star topologies to create larger networks **1.3.2 Wired and wireless networks, protocols and layers** [Modes of connection:] - - - - - - - - - - - - - - - - - - - - - - - - - - - [Encryption:] - - - - - - - - - - - - - - - [IP addressing and MAC addressing:] IP addressing: - - - - - - - It is needed because it allows routers to forward packets of data from one network to another in the most efficient way. Routers connect at least 2 networks e.g. 2 WANs and use the recipient\'s IP address to determine the fastest and least congested route to the next router. Routing table -- list of networks it is connected to and most efficient routes Each packet contains: - - - - - Advantages: - - - - - MAC addresses: - - - - - - - [Standards:] Networking standards are rules that allow computer systems to communicate across networks. Standards have been created to ensure devices can exchange data and work together by interpreting signals in the same way, regardless of the manufacturer. [Common protocols including:] - - - - - - - A protocol is a set of rules that allow devices on a network to communicate with each other. ![](media/image13.png) [The concept of layers:] A layer is a division of network functionality. Rather than a single, huge specification for all possible forms of communication, designers divide the communication problem into subparts, called layers. The interfaces between the layers are defined by protocols. The combination of layers is sometimes called a protocol stack. TCP/IP protocol stack: the model is used to visualise the different parts of a network as each of the four layers has a specific role. Each layer is associated with a different protocol. 1. 2. 3. 4. ![](media/image21.png) Why have them? - - - 1.4 -- Network security ======================= [[network threats revision sheet]](https://docs.google.com/document/d/1hrJvk2miEmYRBWeLrGCOjGPCg2Wj7bvXjI30rroskks/edit?tab=t.0) 1.5 -- Systems software ======================= [[computing 1.5 notes]](https://docs.google.com/presentation/d/1hWJ-HzLaH4umKIOit_976yl0W4iVfNOPDedSfoyd8Bs/edit#slide=id.p) 1.6 -- Ethical, legal, cultural and environmental impacts of digital technology =============================================================================== **1.6.1 Ethical, legal, cultural and environmental impact** [Impacts of digital technology on wider society including:] - - - ![](media/image10.png) - [Legislation relevant to Computer Science:] - - - - 2.3 -- Producing robust programs ================================ **T2 - Defensive designs** - - - - - - - **[TYPES OF VALIDATION CHECK:]** Check Example ---------------- ----------------------------------------------------------------------------------------------------- Range check A number or date is within a sensible/allowed range Type check Data is of the right type, such as integer, letter or text Length check Text entered is not too long or too short -- for example, a password is between 8 and 15 characters Presence check Checks that data has been entered, i.e. the field has not been left blank Format check Checks that the format of, for example, a postcode or email address is correct **Maintainable programs:** - - - - - - - - - +-----------------------+-----------------------+-----------------------+ | **Validation Check** | **Description** | **Example** | | -------------------- | --------------- | ----------- | +=======================+=======================+=======================+ | Check digit | checks the data is in | a National Insurance | | | the right format | number is in the form | | | | LL 99 99 99 L where L | | | | is any letter and 9 | | | | is any number | +-----------------------+-----------------------+-----------------------+ | Format check | looks up words in a | a password which | | | dictionary | needs to be six | | | | letters long | +-----------------------+-----------------------+-----------------------+ | Length check | checks that data has | in | | | been entered into | most databases a key | | | a field | field cannot be left | | | | blank | +-----------------------+-----------------------+-----------------------+ | Lookup table | the last one or two | number of hours | | | digits in a code are | worked must be less | | | used to check the | than 50 and more than | | | other digits are | 0 | | | correct | | +-----------------------+-----------------------+-----------------------+ | Presence check | looks up acceptable | MS Word uses red | | | values in a table | lines to underline | | | | misspelt words | +-----------------------+-----------------------+-----------------------+ | Range check | checks the data | bar code readers in | | | isn\'t too short or | supermarkets use | | | too long | check digits | +-----------------------+-----------------------+-----------------------+ | Spell check | checks that a value | there are only seven | | | falls within the | possible days of the | | | specified range | week | +-----------------------+-----------------------+-----------------------+ **T3 - Errors and Testing** - - [Testing:] It is important that programs are fully tested to find logic errors. Before testing, a plan is created which will test for: - - - - E.g. Program: enter a number between 1 and 100 Some examples of test data: - - - - Finding logic errors: - - **A trace table is useful for:** - - - *(To draw a trace table, make a column for each variable used, in the order in which they appear. You don't need to fill in a value for a variable which does not change in a particular row)* There are two types of testing: - - - - Some papers we did: [[Pseudo Paper 1 v5]](https://docs.google.com/document/d/1qT1cPk2aWL0XGM0DTEB-aitVqXYcV0FfMVp9OnGRt4U/edit?mode=html&tab=t.0)

Use Quizgecko on...
Browser
Browser