Search CSNewbs
286 items found for ""
- 2.4c - Image Storage - OCR GCSE (J277 Spec) | CSNewbs
Learn about how images are represented in a computer system, including file size, resolution, colour depth and metadata. Based on the J277 OCR GCSE Computer Science specification (first taught from 2020 onwards). 2.4c: Image Storage Exam Board: OCR Specification: J277 Bitmap Images Bitmap images are made of pixels - single-colour squares - arranged on a grid . Each pixel is assigned a binary value which represents the colour of that pixel. The quality of a bitmap image depends on the total amount of pixels , this is known at the image resolution . Because it is made of pixels, scaling a bitmap image up will result in a visible loss of quality . Most images on computers are bitmaps, such as photos and screenshots . Vector Images Vector images are drawn by the computer following precise mathematical instructions to create lines and objects . Vectors are usually smaller in file size compared to bitmaps because each pixel in a bitmap is stored as an individual binary value. Vectors can be scaled up without any loss of quality and are typically used for logos and animations . How to Calculate the File Size of a Bitmap File Size = Resolution x Colour Depth The resolution of an image is the width in pixels multiplied by the height in pixels. The colour depth (also known as bit depth ) is the number of bits that are used to represent each pixel's colour . 1 bit represents 2 colours (0 or 1 / black or white). 2 bits will allow for 4 colours, 3 bits for 8 colours, 4 for 16 etc. A colour depth of 1 byte (8 bits ) allows for 256 different colours . Remember you must multiply the colour depth , not the number of available colours (e.g. 8 not 256). The RGB (Red , Green , Blue ) colour model uses 3 bytes (a byte of 256 red shades , a byte of 256 green shades and a byte of 256 blue shades ) that together can represent 16.7 million different colours. Example Height = 6 bits Resolution = height x width Resolution = 8 x 6 = 48 bits -------------------------- Colour Depth = 1 bit (only 2 colours) -------------------------- File Size = Resolution x Colour Depth File Size = 48 x 1 = 48 bits File Size in bytes = 48 ÷ 8 = 6 bytes File Size in kilobytes = 6 ÷ 1000 = 0.00 6 kilobytes Width = 8 bits Look carefully at the exam question to see if the examiner is expecting the answer in bits, bytes or kilobytes . Always calculate the file size in bits first then: Divide the file size in bits by 8 to convert to bytes . Divide the file size in bytes by 1000 to convert to kilobytes . Metadata for Images Metadata is additional data about a file . Common image metadata includes: Height and w idth in pixels Colour depth Resolution Geolocation Date created Last edited File type Author details Metadata is important, For example, the dimensions must be known so the image can be displayed correctly . Metadata for a picture taken on a smartphone: Q uesto's Q uestions 2.4c - Image Storage: 1. Describe three ways that bitmap and vector images are different. [ 6 ] 2. Define the terms image resolution and colour depth . [2 ] 3. How many colours can be represented with a colour depth of... a. 1 bit [ 1 ] b . 5 bits [ 1 ] c. 1 byte [ 1 ] 4. How is the file size of an image calculated? [2 ] 5a. An image file has a width of 10 pixels , a height of 8 pixels and a colour depth of 2 . What is the file size in bytes ? [3 ] 5b. An image file has a width of 120 pixels , a height of 120 pixels and a colour depth of 1 . What is the file size in kilobytes ? [3 ] 5c. An image file has a width of 32 pixels , a height of 21 pixels and a colour depth of 1 . What is the file size in bytes ? [3 ] 6. State what is meant by metadata and give three examples of metadata for a graphics file. [ 3 ] width in pixels, e.g. 720 height in pixels, e.g. 480 2.4b - Character Storage Theory Topics 2.4d - Sound Storage
- Computer Science Newbies
Homepage for learning about computer science in school. Discover topics across GCSE and Level 3 IT subjects, plus programming languages including Python, HTML and Greenfoot. C omputer S cience Newb ie s Popular CSNewbs topics: Programming PYTHON GCSE Computer Science OCR GCSE Computer Science EDUQAS OCR Cambridge Technicals Level 3 IT You are viewing the mobile version of CSNewbs. The site will appear better on a desktop or laptop . Programming HTML CSNewbs last updated: Monday 10th February 2025 Over 490,000 visits in the last year! About CSNewbs
- 3.2a - Wired & Wireless Networks - OCR GCSE (J277 Spec) | CSNewbs
Learn about the differences between wired and wireless networks. Based on the J277 OCR GCSE Computer Science specification (first taught from 2020 onwards). 3.2a: Wired & Wireless Networks Exam Board: OCR Specification: J277 Wired Connections Wireless Connections Wireless connections, such as WiFi or Bluetooth , use no cables but require a wireless network interface card (WNIC ). Wireless connections generally have a slower speed and can be affected by the computer's distance from the wireless router as well as obstacles like walls or bad weather. Wired connections use physical cables , such as copper or fibre optic wires , and require a network interface card (NIC ) to connect to a network. These wired connections use a wired connection protocol - most commonly Ethernet . Restricted Movement Faster More Secure NIC Required Freedom of Movement Slower Less Secure WNIC Required Q uesto's Q uestions 3.2a - Wired & Wireless Networks: 1. Briefly compare wired and wireless networks in terms of movement , transmission speed , security and required hardware . You could answer this in the form of a table. [ 8 ] 3.1b - Network Hardware & Internet Theory Topics 3.2b - Protocols & Layers
- 2.4d - Sound Storage - OCR GCSE (J277 Spec) | CSNewbs
Learn about how sounds are represented in a computer system including how analogue sound waves are converted into binary. Also, learn about sample rate, bit depth, bit rate and metadata. Based on the J277 OCR GCSE Computer Science specification (first taught from 2020 onwards). 2.4d: Sound Storage Exam Board: OCR Specification: J277 Converting Analogue Sound to Binary Analogue sound waves must be digitally recorded and stored in binary . To record the sound, the amplitude (height ) of the analogue sound wave is measured and recorded in binary at specific intervals . 0010 1011 0101 0101 Analog sound wave ADC (Analog to Digital Converter) Binary sample Sampling an Analogue Sound Wave Digital sampling is discrete (separate) and not continuous like analogue waves. To get the highest quality sound, many samples are taken to recreate the analogue wave as closely as possible . Sample Rate The sample rate (sampling frequency) is the number of times per second the amplitude of the sound wave is measured . It is measured in kilohertz (kHz), for example CD quality is 44.1kHz (44,100 samples per second). The higher the sample rate , the better the audio quality as the digital data more closely resembles an analogue wave . However, higher sample rates result in larger file sizes because more data is stored for each individual sample. A low sample rate will result in a low-quality sound because the digital data does not closely resemble the original analog wave . A higher sample rate will result in a higher-quality sound because the digital data more closely resembles the original analog wave . Bit Depth The bit depth is the number of bits available to represent each sample . For example, a sample with a bit depth of 4 could be 0101 or 0111 or 1010. A sample with a bit depth of 8 could be 01010110 or 1010110 or 11001111. A common bit depth is 16 bits . The higher the bit depth , the more bits are available to be used for each sample. Therefore the quality is often higher as the wave more closely resembles an analog wave . The file size will also be larger if the bit depth is higher, as each sample stores additional bits . low bit rate = lower quality high bit rate = higher quality sound file size = sample rate x bit depth x duration Example: A short audio sample has a bit depth of 4 and a sample rate of 10 samples per second . The clip is 15 seconds long . 4 bits x 10 = 40 bits per second. 40 x 15 = 600 bits . To convert the answer from bits to bytes , divide by 8 . 600 bits ÷ 8 = 75 bytes . Calculating File Size Q uesto's Q uestions 2.4d - Sound Storage: 1. Explain how an analogue sound wave is converted into a binary sample . [ 2 ] 2a. What is a sample rate ? [2 ] 2b. Explain two ways an audio file will be affected if the sample rate is increased . [4 ] 3a. What is bit depth ? [2 ] 3b. Explain two ways an audio file will be affected if the bit depth is increased . [4 ] 4 . An audio sample has a bit depth of 8 , a sample rate of 10 and it is 12 seconds long . What is the file size in bytes ? [ 2 ] 2.4c Image Storage Theory Topics 2.5 - Compression
- Python | 8a - Using Lists | CSNewbs
Learn how to create and use lists in Python. Try practice tasks and learn through text and images. Perfect for students learning GCSE Computer Science in UK schools. top Python 8a - Using Lists Lists A list is a temporary data structure . Any changes made to the list while the program is running will not be saved the next time it is run . Data can be added to and removed from lists so they can change in size (unlike an array which is fixed and not used in Python). It is important to note that each data element in a list has an index so that it can be specifically referenced (to delete it for example) and that indexes start at 0 . A list of the rainbow colours in order would start at 0 like this: Creating & Printing Lists Lists use square brackets in Python. Separate list items with commas . Strings must use speech marks and integers do not use speech marks. people = [ "Alan" , "Jesse" , "Max" , "Jack" ] years = [ 2010, 2019, 2001, 2016 ] There are many different ways to print items from a list depending on how you want it to look . Print all items on one line Type the list name into a print command to output the complete list . Typing an asterisk * before the list name removes punctuation . cities = [ "Shanghai" , "Sao Paolo" , "Bishkek" , "Asmara" ] print (cities) cities = [ "Shanghai" , "Sao Paolo" , "Bishkek" , "Asmara" ] print (*cities) ['Shanghai', 'Sao Paolo', 'Bishkek', 'Asmara'] Shanghai Sao Paolo Bishkek Asmara Print each item on a separate line To print a list line-by-line use a for loop to cycle through each item. 'city ' is just a variable name and can be replaced with the traditional 'i ' or anything relevant to the context, such as 'colour ' in a list of colours or 'name ' in a list of people. cities = [ "Shanghai" , "Sao Paolo" , "Bishkek" , "Asmara" ] for city in cities: print (city) Shanghai Sao Paolo Bishkek Asmara Print separated items on one line To print separated data elements on the same line then you can use the end command which defines what should go after each item . The example below uses slashes but end = " , " would add comma and space between each element. cities = [ "Shanghai" , "Sao Paolo" , "Bishkek" , "Asmara" ] for city in cities: print (city, end = " / " ) Shanghai / Sao Paolo / Bishkek / Asmara / Print specific list items To print an element with a certain index , put the index in square brackets . But remember that the index starts at 0 not 1. cities = [ "Shanghai" , "Sao Paolo" , "Bishkek" , "Asmara" ] print ( "The first city is" , cities[0]) print (cities[2], "is the third city" ) The first city is Shanghai Bishkek is the third city Create a list of five different of foods . Print all list items on one line . Then print each item on a different line . Finally print just the first and fifth items . Example solution: lettuce yoghurt tomato artichoke tuna lettuce yoghurt tomato artichoke tuna The first item is lettuce The fifth item is tuna Lists Task 1 (Five Foods ) Lists Task 2 (Four Numbers ) Create a list of four integer values . Print all list items on one line separated by colons . Example solutions: 345:123:932:758: 812:153:783:603: Add (Append / Insert) to a List Append items to the end of a list To add a new item to the end of a list use the .append() command. Write .append() after the name of your list, with the new data in brackets . pets = [ "dog" , "cat" , "hamster" ] pets.append( "rabbit" ) print (*pets) fillings = [ "ham" , "cheese" , "onion" ] extra = input ( "Enter another filling: " ) fillings.append(extra) print ( "Your sandwich:" , *fillings) dog cat hamster rabbit Enter another filling: lettuce Your sandwich: ham cheese onion lettuce Insert items to a specific index Use the insert command to place an item in a specific position within the list. Remember that Python counts from 0 so the medals example below puts "silver" as index 2 , which is actually the 3rd item . medals = [ "platinum" , "gold" , "bronze" ] medals.insert(2, "silver" ) print (*medals) names = [ "Stacy" , "Charli" , "Jasper" , "Tom" ] name = input ( "Enter a name: " ) position = int ( input ( "Enter an index: " )) names.insert(position,name) print (*names) platinum gold silver bronze Enter a name: Lena Enter an index: 0 Lena Stacy Charli Jasper Tom Enter a name: Pat Enter an index: 3 Stacy Charli Jasper Pat Tom Use a loop to add items to a list A for loop can be used to add a certain number of items to a list. A while loop can be used to keep adding values until a certain value (e.g. ' stop ' or ' end ') is input. animals = [ ] for i in range (4): animal = input ( "Enter an animal: " ) animals.append(animal) print ( "\nAnimals:" , *animals) animals = [ ] while True : animal = input ( "Enter an animal: " ) if animal == "stop" : break else : animals.append(animal) print ( "\nAnimals:" , *animals) Enter an animal: lion Enter an animal: horse Enter an animal: hyena Enter an animal: squirrel Animals: lion horse hyena squirrel Enter an animal: rhino Enter an animal: gazelle Enter an animal: deer Enter an animal: stop Animals: rhino gazelle deer Example solution: Lists Task 3 (Favourite Musicicans ) Create a list of three musicians or bands you like . Print the list . Then append two new bands using two inputs . Print the list again. Use the sandwich filling example for help. Musicians I like: Lana Del Rey Devon Cole Elly Duhé Enter another musician: Charli XCX Enter another musician: Kenya Grace Musicians I like: Lana Del Rey Devon Cole Elly Duhé Charli XCX Kenya Grace Lists Task 4 (Missing 7 ) Create a list of numbers in order from 1 to 10 but miss out 7 . Use the insert command to add 7 in the correct place . Print the list before and after you insert 7. Example solution: 1 2 3 4 5 6 8 9 10 1 2 3 4 5 6 7 8 9 10 Lists Task 5 ('Land' Countries ) Use a while True loop to input countries that end in 'land' until the word 'finish ' is input . Print the list at the end. Note: You do not need to check if the countries entered are correct. There are also more than four. Example solution: Enter a country ending in 'land': Iceland Enter a country ending in 'land': Poland Enter a country ending in 'land': Switzerland Enter a country ending in 'land': Thailand Enter a country ending in 'land': finish Country list: Iceland Poland Switzerland Thailand Delete (Remove/Pop) from a List Delete items with a specific value To delete data with a certain value use the .remove() command, with the value in brackets . trees = [ "fir" , "elm" , "oak" , "yew" ] trees.remove( "elm" ) print (*trees) fir oak yew trees = [ "fir" , "elm" , "oak" , "yew" ] tree = input ( "Select a tree to remove: " ) trees.remove(tree) print (*trees) Select a tree to remove: oak fir elm yew Delete items with a specific index To delete data in a specific position in your list use the .pop() command, with the position in the brackets . Remember that indexes start at 0 so .pop(0) removes the first item . Negative values start from the end of the list , so -1 is the final item and -2 is the second last item and so on. kitchen = [ "plate" , "cup" , "spoon" , "jug" ] kitchen.pop(0) print (*kitchen) kitchen = [ "plate" , "cup" , "spoon" , "jug" ] kitchen.pop(-2) print (*kitchen) kitchen = [ "plate" , "cup" , "spoon" , "jug" ] index = int ( input ( "Select an index: " )) kitchen.pop(index) print (*kitchen) cup spoon jug plate cup jug Select an index: 1 plate spoon jug Delete all items in a list To delete data in a list use the .clear() command. insects = [ "ant" , "bee" , "wasp" ] insects.clear() insects.append( "hornet" ) print (*insects) hornet Lists Task 6 (Day Off ) Example solution: Create a list with the five week days . Ask the user to input a weekday and remove that day from the list. Print the list. Which day do you want off? Tuesday Your new days of work: Monday Wednesday Thursday Friday Lists Task 7 (May and October ) Create a list with the twelve months in order . Delete May and then October using the pop command by referring to their indexes in the list. Print the list. Note: Be aware the index of each month after May will change when May is popped from the list. Example solution: January February March April June July August September November December Finding the Length of a List To find the length of a list use the len function. You can create a separate variable for the length (shown in the first example below) or use the len command directly (second example). states = [ "Maine" , "Utah" , "Ohio" , "Iowa" ] length = len (states) print ( "There are" , length , "states in the list." ) states = [ "Maine" , "Utah" , "Ohio" , "Iowa" ] print ( "There are" , len (states), "states in the list." ) There are 4 states in the list. Lists Task 8 (Q Words ) Use a while True loop to input words beginning with q until the word ' stop ' is entered. Then use len to find the length of the list and print this value. Note: You do not need to check if the entered words actually start with q. Example solution: Input a Q word: question Input a Q word: quick Input a Q word: quiet Input a Q word: quandry Input a Q word: stop You wrote 4 Q words! Cycle Through List Items A for loop can be used to cycle through each item in a list. The following examples present some ways that this may be used. This program uses a for loop to add a word (David) before each list item. davids = [ "Beckham" , "Attenborough" , "Schwimmer" , "Tennant" , "Lynch" ] for i in range (5): print ( "David" , davids[i]) David Beckham David Attenborough David Schwimmer David Tennant David Lynch An if statement can be used within a for loop to check the value of each item . The example below checks how many items are 'medium'. sizes = [ "small" , "medium" , "small" , "large" , "medium" , "small" ] count = 0 for i in range (6): if sizes[i] == "medium" : count = count + 1 print ( "There were" ,count, "medium choices." ) There were 2 medium choices. The program below uses a while loop to allow entries until 'stop ' is input then a for loop to check the value of each item . Because the final length of the list is not known when the program starts, the len command is used in the range of the for loop . sports = [] fcount = 0 rcount = 0 while True : option = input ( "Choose football or rugby: " ) sports.append(option) if option == "stop" : break for i in range ( len (sports)): if sports[i] == "football" : fcount = fcount + 1 elif sports[i] == "rugby" : rcount = rcount + 1 print ( "\nResults:" ,fcount, "people chose football and" ,rcount, "chose rugby." ) Choose football or rugby: rugby Choose football or rugby: rugby Choose football or rugby: football Choose football or rugby: rugby Choose football or rugby: football Choose football or rugby: stop Results: 2 people chose football and 3 chose rugby. Lists Task 9 (Over 25 ) Create a list with the following eight numbers: 13, 90, 23, 43, 55, 21, 78, 33 Use a for loop to cycle through the list and check if each item is over 25 . Use a count variable to increase by 1 if the number is over 25. At the end print how many numbers are over 25 - there are five . Example solution: 5 numbers are over 25. Lists Task 10 (Favourite Lesson ) Use a while True loop to keep inputting school subjects until ' done ' is entered. Keep a count of how many times ' Maths ' is entered. Print the total number of people who entered maths. Example solution: Enter a subject: English Enter a subject: Maths Enter a subject: Art Enter a subject: Maths Enter a subject: History Enter a subject: done There were 2 people who chose maths. Sorting Lists The .sort() command will sort elements in a list into alphabetical order (if a string ) or numerical order (if a number ). names = [ "Robb" , "Jon" , "Sansa" , "Arya" , "Bran" , "Rickon" ] print ( "Original:" , *names) names.sort() print ( "Sorted:" , *names) Original: Robb Jon Sansa Arya Bran Rickon Sorted: Arya Bran Jon Rickon Robb Sansa numbers = [56,98,23,12,45] numbers.sort() print (*numbers) 12 23 45 56 98 The .sort() command can be used to sort values in descending order by including reverse = True in the brackets. names = [ "Robb" , "Jon" , "Sansa" , "Arya" , "Bran" , "Rickon" ] print ( "Original:" , *names) names.sort(reverse = True ) print ( "Sorted:" , *names) Original: Robb Jon Sansa Arya Bran Rickon Sorted: Sansa Robb Rickon Jon Bran Arya numbers = [56,98,23,12,45] numbers.sort(reverse = True ) print (*numbers) 98 56 45 23 12 Lists Task 11 (Sorted Fruit ) Example solution: Use a for loop to append six fruits to an empty list. Sort the list into alphabetical order and print it. Enter a fruit: strawberry Enter a fruit: kiwi Enter a fruit: lemon Enter a fruit: pear Enter a fruit: orange Enter a fruit: mango Sorted fruit: kiwi lemon mango orange pear strawberry Searching Through Lists A simple if statement can be used to see if a certain value appears within a list. names = [ "Alex" , "Bill" , "Charlie" , "Darla" ] name = input ( "Enter a name: " ) if name in names: print ( "Yes," , name , "is in the list." ) else : print ( "Sorry," , name , "is not in the list." ) Enter a name: Bill Yes, Bill is in the list. Enter a name: Sadie Sorry, Sadie is not in the list. Lists Task 12 (Packed Suitcase ) Example solutions: Create a list with five items to take on holiday. Ask the user to input an item and use an if statement to check if it is or isn't in the list. What should I pack? sun cream I've already packed sun cream What should I pack? toothpaste Whoops! I forgot to pack toothpaste Calculating the Sum of a List To calculate the sum of a list of numbers there are two methods. Using Python's built-in sum function : numbers = [1,4,2,3,4,5] print ( sum (numbers)) Both methods will result in the same output : 19 Using a for loop to cycle through each number in the list and add it to a total . numbers = [1,4,2,3,4,5] total = 0 for number in numbers: total = total + number print (total) Lists Task 13 (Sum and Average ) Example solution: Use a for loop to ask the user to input 5 numbers and append each to a list. Use the sum command to output the total and use it calculate the average . Enter a number: 6 Enter a number : 7 Enter a number : 6 Enter a number : 9 Enter a number : 4 The total is 32 The average is 6.4 Extending a List .extend() can be used in a similar way to .append() that adds iterable items to the end of a list . This commands works well with the choice command (imported from the random library ) to create a list of characters that can be randomly selected. The code below adds a lowercase alphabet to an empty list and then, depending on the choice of the user, adds an uppercase alphabet too. The choice command is used in a loop to randomly select 5 characters. Using .extend() to make a random 5-character code from random import choice list = [] list. extend ( "abcdefghijklmnopqrstuvwxyz" ) upper = input ( "Include uppercase letters? " ) if upper == "yes" : list. extend ( "ABCDEFGHIJKLMNOPQRSTUVWXYZ" ) code = "" for number in range (5): letter = choice (list) code = code + letter print ( "Your five character code is" , code) Possible outputs: Include uppercase letters? yes Your five character code is yPfRe Include uppercase letters? yes Your five character code is GJuQw = Include uppercase letters? no Your five character code is gberv Extend treats each character as an indidual item whereas append adds the whole string as a single entity . Most of time append would be used, but extend is suitable for a password program as additional individual characters can be added to a list depending on the parameters (e.g. lowercase letters, uppercase letters, numbers and special characters). list = [] list. extend ( "ABCD" ) list. extend ("EFGH" ) print (list) list = [] list. append ( "ABCD" ) list. append ("EFGH" ) print (list) ['A','B','C','D','E','F','G','H'] ['ABCD' , 'EFGH'] = = Practice Task 14 Use the code above (for a 5-character code ) to help you make a password generator . Ask the user if they want uppercase letters , numbers and special characters and use the extend command to add them to a list of characters if they type yes (you should extend lowercase characters into an empty list regardless, like in the code above). Use a for loop and the choice command (imported from the random library) to randomly generate a 10-character password . Example solutions: Include uppercase letters? yes Include numbers? yes Include special characters? yes Your new password is RjWSbT&gW5 Include uppercase letters? no Include numbers? yes Include special characters? no Your new password is hdf8se9y2w ⬅ Section 7 Practice Tasks 8b - 2D Lists ➡
- 3.1b - Hardware & Internet - OCR GCSE (J277 Spec) | CSNewbs
Learn about network devices such as a switch, router, modem and NIC. Also learn about internet terms and services including DNS and the Cloud. Based on the J277 OCR GCSE Computer Science specification (first taught from 2020 onwards). 3.1b: Network Hardware & Internet Exam Board: OCR Specification: J277 Network Devices When sending data across a network, files are broken down into smaller parts called data packets . Whole files are too large to transfer as one unit so data packets allow data to be transferred across a network quickly . Each packet of data is redirected by routers across networks until it arrives at its destination. Data packets may split up and use alternative routes to reach the destination address. When all the packets have arrived at the destination address the data is reassembled back into the original file. Wireless Access Point A Wireless Access Point provides a link between wireless and wired networks . It creates a wireless local area network that allows WiFi-enabled devices to connect to a wired network. Examples of a wireless access point in a public space could be a WiFi or Bluetooth hotspot , for example a WiFi hotspot in a coffee shop or airport to provide access to the internet. A wireless access point may be a separate device or built into another device such as a router. Router Routers are used to transfer data packets between networks . Routers receive data packets and use the IP address in the packet header to determine the best route to transmit the data. Data is transferred from router to router across the internet towards the destination. A router stores the IP address of each computer connected to it on the network and uses a list called a routing table to calculate the quickest and shortest route to transfer data. Switch A switch is used to connect devices together on a LAN . It receives data packets from a connected node, reads the destination address in the packet header and forwards the data directly to its destination. A switch will generate a list of the MAC addresses of all devices connected to it when it receives data , and must scan for a matching destination address before sending. An alternative to a switch is a hub but a hub is slower and less secure as it forwards a copy of received data to all connected nodes . Network Interface Controller / Card A Network Interface Controller (NIC ) commonly also known as a Network Interface Card is an internal piece of hardware that is required for the computer to connect to a network . The card includes a MAC address which is used when sending data across a LAN . An ethernet cable is plugged into the network card to allow data to be exchanged between the device and a network. A NIC used to be a separate expansion card but is now typically embedded on the motherboar d . Transmission Media Although not technically a device, the communication channel along which data is transferred will affect performance . Three common types of transmission media include: Ethernet cables - used typically on a LAN to transfer data between nodes and hardware such as switches. Examples include Cat5e and Cat6. Fibre Optic cables - very fast but more expensive and fragile cables typically used to send data quickly along a WAN . Data is sent as pulses of light . Coaxial cables - older , slower , copper cables that are not used as much in modern times as they can be affected by electromagnetic interference . The Internet The internet is a global network of interconnected networks . The world wide web (WWW ) is not the same as the internet. It is a way of accessing information , using protocols such as HTTPS to view web pages . Servers provide services on the internet , such as a web server which responds to the web browser (client) request to display a web page . The web server processes the client request to prepare the web page and return it so the web browser can display it to the user . A website must be hosted (stored) on a web server so that it can be accessed by others using the internet . A unique domain name (e.g. csnewbs.com) must be registered with a domain registrar – this is a company that checks the name is valid and not already taken . What is the Internet? DNS Servers A DNS ( Domain Name System ) server stores a list of domain names and a list of corresponding IP addresses where the website is stored. The first thing to understand is that every web page has a domain name that is easy for humans to remember and type in (such as www.csnewbs.com ) as well as a related IP address (such as 65.14.202.32) which is a unique address for the device that the web page is stored on. The steps taken to display a web page: 1. A domain name is typed into the address bar of a browser . 2. A query is sent to the local DNS server for the corresponding IP address of the domain name . www.facebook.com 3. The local DNS server will check if it holds an IP address corresponding to that domain name. If it does it passes the IP address to your browser . 66.220.144.0 4. The browser then connects to the IP address of the server and accesses the web site . If the local DNS server does not hold the IP address then the query is passed to another DNS server at a higher level until the IP address is resolved. If the IP address is found, the address is passed on to DNS servers lower in the hierarchy until it is passed to your local DNS server and then to your browser. Cloud Storage The cloud refers to networks of servers accessed on the internet . Cloud computing is an example of remote service provision . Cloud servers can have different purposes such as running applications , remote processing and storing data . When you store data in 'the cloud', using services such as Google Drive or Dropbox, your data is stored on large servers owned by the hosting company . The hosting company (such as Google) is responsible for keeping the servers running and making your data accessible on the internet . Cloud storage is very convenient as it allows people to work on a file at the same time and it can be accessed from different devices. However, if the internet connection fails , or the servers are attacked then the data could become inaccessible . Cloud Storage Characteristics: ✓ - Huge CAPACITY and you can upgrade your subscription if you need more storage. ✓ / X - Cloud storage is difficult to rank in terms of PORTABILITY , DURABILITY and ACCESS SPEED because it depends on your internet connection. A fast connection would mean that cloud storage is very portable (can be accessed on a smartphone or tablet) but a poor connection would make access difficult . ✓ - Cloud storage is typically free for a certain amount of storage. Users can then buy a subscription to cover their needs - Dropbox allows 2 GB for free or 2 TB for £9.99 a month. Q uesto's Q uestions 3.1b - Network Hardware & Internet: 1a. Explain how a switch works. [ 2 ] 1b. Describe the purpose of a router . [ 2 ] 1c. State what WAP stands for and why it is used . [ 2 ] 1d. State what NIC stands for and why it is required . [ 2 ] 1e. State the differences between the three main types of transmission media . [ 3 ] 2a. State what the internet is and how it is different to the world wide web . [ 2 ] 2b. What is web hosting ? [ 2 ] 3a. What is a DNS server ? [ 2 ] 3b. Describe, using a mix of text and icons / images , how a DNS server is used to display a web page . [5 ] 3c. Describe how a DNS server searches for an IP address if it is not found on the local DNS server . [ 2 ] 4a. Describe what cloud computing is. [ 2 ] 4b. State two advantages and two disadvantages of the cloud . [ 4 ] 3.1a - Network Types & Performance Theory Topics 3.2a - Wired & Wireless Networks
- 3.1a - Network Types & Performance - OCR GCSE (J277 Spec) | CSNewbs
Learn about the factors that affect the performance of networks, as well as different types of network types such as LAN and WAN. Based on the J277 OCR GCSE Computer Science specification (first taught from 2020 onwards). 3.1a: Network Types & Performance Exam Board: OCR Specification: J277 What is a network? A network is more than one computer system connected together allowing for communication and sharing of resources . Network Types Networks can be split into different types , usually categorised by their geographical distance apart and the area that they serve. Local Area Network Wide Area Network Client-Server Network Clients make requests to a server , the server manages that request and responds. For example, if the user (client) makes a request to access www.bbc.co.uk to a web server. Large services like Amazon and Google will need very powerful servers to handle millions of requests a second. The client is completely dependent on the server to provide and manage the information. The server controls network security , backups and can be upgraded to manage higher demand. Advantages: The network can be controlled centrally from the server to easily backup data and update software . Hardware, software and resources can be shared across the network, such as printers, applications and data files . The network allows for improved scalability , meaning more clients can be easily added to the central server . Disadvantages: Large amounts of traffic congestion will cause the network to slow down . If a fault occurs with the server then the whole network will fail . IT technicians may be required to manage and maintain the network . Malware , such as viruses, can spread quickly across the network. Peer-to-Peer Network For peer-to-peer networks , data is shared directly between systems without requiring a central server . Each computer is equally responsible for providing data. Peer to peer is optimal for sharing files that can then be downloaded. Disadvantages: Without a dedicated server there is no central device to manage security or backups . Backups must be performed on each individual system. Computer performance will decrease with more devices connected to the network, especially if other machines are slow. Advantages: This is a simpler network than client-server to set up as no server is required . Clients are not dependent on a server . Perfect for quickly sharing files between systems , such as downloading media files. A local area network (LAN ) has computer systems situated geographically close together , usually within the same building or small site , like a school or office . The network infrastructure of a LAN (such as servers and routers) is usually owned and managed by the network owner . A wide area network (WAN ) has computer systems situated geographically distant to each other, possibly across a country or even across the world . WANs often use third party communication channels , such as connections by internet services providers like BT or Virgin Media. Other network types do exist, such as a Metropolitan Area Network (MAN ) for computer systems connected across a town or city or a Personal Area Network (PAN ) for devices connected and used by an individual . Data Packets When sending data across a network, files are broken down into smaller parts called data packets . Whole files are too large to transfer as one unit so data packets allow data to be transferred across a network quickly . Each packet of data is redirected by routers across networks until it arrives at its destination. Data packets may split up and use alternative routes to reach the destination address. When all the packets have arrived at the destination address the data is reassembled back into the original file. Contents of a Data Packet: Header Payload Trailer Source address Destination address Packet number Protocol The data itself A checksum - this is a calculation on the data to see if any errors or corruption have occurred during transmission . What is a network topology? Network topology refers to layout of computer systems on a local network . Devices in a network topology diagram are often called 'nodes' . Two types of typology are star and mesh . Star Topology Each computer system is connected to a central device , usually a hub or switch . How it works: Each computer system is connected to the central hub or switch and transfers its data packets there. The hub or switch looks at the destination address and transfers the packets directly to the intended computer. Advantages: A star topology has improved security because data packets are sent directly to and from the hub / switch in the centre and not necessarily all devices like in a bus or ring topology. New systems can be attached directly to the central system so the network doesn't need to be shut down . System failures of attached computers won't usually cause complete network failure. Transfer speeds are generally fast in a star topology as there are minimal network collisions . Disadvantages: Extra hardware (the hub or switch) is required to be purchased, installed and maintained. If the central system (the hub or switch) fails then the whole network will be unusable until the error is fixed. Mesh Topology In a full mesh network, each computer system is connected to every other computer system . There is also a partial mesh network where only some nodes (e.g. a printer) are connected to every other node. How it works: Data packets are transferred to the destination address along the quickest path , travelling from node to node. If a pathway is broken , there are many alternative paths that the packets can take. Advantages: If one cable or system fails then data packets can take an alternative route and still reach the destination address. Because of the large possible number of systems and connections, a mesh topology can usually withstand large amounts of data traffic . New systems can be added to the network without disrupting the entire topology . Disadvantages: Because of the possibly large amount of cables required (especially in a full mesh topology) this network layout can be expensive to install and maintain . Redundant cabling should be avoided - this is when cables are connected between systems that won't ever need to communicate . Performance There are several different factors that can affect the performance ( speed ) of a network, such as: The bandwidth available * Interference (e.g. thick walls) Applications being used Number of users at the same time Distance to travel / signal strength Server / CPU Performance Number of data collisions Amount of data to transfer * Bandwidth is the maximum amount of data that can be sent across a network at once . Q uesto's Q uestions 3.1a - Network Types & Performance: 1a. Describe the difference between a LAN and WAN . [2 ] 1b. Give an example of how a LAN and a WAN could each be used . [ 2 ] 2 a. Describe how peer-to-peer networks and client-server networks function. 2b. Give one use for both types of network. 3. Draw and label diagrams of client-server , peer-to-peer , star and mesh networks. [8 ] 4. An office currently uses a star topology but is considering changing to a mesh topology . Describe two advantages and two disadvantages of both topologies. [ 8 ] 5. State five factors that could affect the performance of a network . [5 ] 2.5 - Compression 3.1b - Network Hardware & Internet Theory Topics
- 3.2b - Protocols & Layers - OCR GCSE (J277 Spec) | CSNewbs
Learn about the different protocols used on networks - HTTP, HTTPS, TCP, IP, FTP and SMTP. Also learn about protcol layers in the 4-layer TCP/IP model. Based on the J277 OCR GCSE Computer Science specification (first taught from 2020 onwards). 3.2b: Protocols & Layers Exam Board: OCR Specification: J277 Protocols A protocol is a set of rules that allow devices on a network to communicate with each other . TCP / IP (Transmission Control Protocol / Internet Protocol) TCP / IP is actually two separate protocols that combine together. TCP is a protocol that allows packets to be sent and received between computer systems. It breaks the data into packets and reorders them back into the original data at the destination. IP is a protocol in charge of routing and addressing data packets . This ensures data packets are sent across networks to the correct destination . It is also an addressing system - every device on a network is given a unique IP address so data packets can be sent to the correct computer system. HTTP is used to transfer web pages over the Internet so that users can view them in a web browser . All URLs start with either HTTP or HTTPS (e.g. https://www.csnewbs.com). HTTPS is a more secure version of HTTP that works with another protocol called SSL ( Secure Sockets Layer ) to transfer encrypted data . You should see a padlock symbol in the URL bar if your connection to that website is secure. HTTP/HTTPS (Hypertext Transfer Protocol) Transfer Protocols FTP ( File Transfer Protocol ) is used to transfer files across a network. It is commonly used to upload or download files to/from a web server . SMTP ( Simple Mail Transfer Protocol ) is a protocol used to send emails to a mail server and between mail servers . POP ( Post Office Protocol ) and IMAP (Internet Message Access Protocol ) are both protocols for receiving and storing emails from a mail server. POP will delete an email from the email server once it has been downloaded to a device . Pop! IMAP syncs the message with an email server so it can be accessed by different devices . IP Address & MAC Address There are two versions of IP addressing currently used - IPv4 and IPv6 . IPv4 is a 32-bit address , represented in denary , that allows for over 4 billion unique addresses . It has four 8-bit segments of denary values (from 0 to 255) separated by full stops . IPv4 example: 145.13.218.102 IPv6 is a 128-bit address , represented in hexadecimal , that allows for an undecillion unique addresses . It has eight 16-bit segments of four hexadecimal values (0000 - FFFF), separated by colons . IPv6 example: 736E:1029:A4B3:902D:77B2:72FF:AE62:0912 A MAC address is a unique hexadecimal number assigned to each network interface card/controller inside a networked device such as a router or laptop . A MAC address is a 48-bit address made up of six 8-bit pairs in hexadecimal , separated by dashes . While an IP address may change , the MAC address can’t be changed . MAC stands for Media Access Control . Network Interface Card (NIC) MAC example: 19-C2-D1-47-AA-38 Networking 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 . TCP/IP Stack & Layers What is TCP/IP? TCP/IP (Transmission Control Protocol / Internet Protocol ) is a set of protocols that operate on different layers . These two protocols are used together to allow computers to communicate on a network . What is a protocol layer? A layer is a division of network functionality - each layer provides a specific function to assist the transmission of the data that is being sent. TCP/IP is split into four layers (named Application , Transport , Internet and Link ). Important Note: You do not need to know any layer names or the purpose of any specific layers in the OCR GCSE J277 specification , just what layers are and why they’re used . Why are protocol layers used? Layers are self-contained , so they allow different developers to concentrate on one aspect of the network at a time . A layer can be taken out and edited without affecting other layers . Protocol layers are used to visualise the different parts of a network , as each of the four layers of TCP/IP has a specific role and is associated with different protocols . Protocols are broken down into well-defined , specific layers to simplify design , making it easier to identify errors (known as troubleshooting ). Each layer uses specific protocols , so layering ensures these protocols are applied in a specific order . This process uses abstraction and layers only communicate with adjacent layers for easy compatibility . Q uesto's Q uestions 3.2b - Protocols & Layers: 1. Describe each of the following protocols . It might be helpful to also draw an icon or small diagram for each one: a. TCP [ 2 ] b. IP [ 2 ] c. HTTP & HTTPS [ 3 ] d. FTP [ 2 ] e. SMTP [ 2 ] f. POP3 & IMAP [ 2 ] 2. State which protocol would be used in the following scenarios : a. Transferring a music file to a friend over the internet. [ 1 ] b. Sending an email to a family member in America. [ 1 ] c. Using a webpage to enter a password securely. [ 1 ] d. Receiving an email from a bank. [ 1 ] 3a. What are networking standards ? [ 2 ] 3b. What is TCP/IP ? [ 2 ] 3c. What is a protocol layer ? [ 2 ] 3d. Give at least two reasons why protocols are split into layers . [ 4 ] 3.2a - Wired & Wireless Networks Theory Topics 4.1 - Security Threats
- 2.5 - Compression - OCR GCSE (J277 Spec) | CSNewbs
Learn about the benefits of compression and the differences between lossy and lossless compression. Also, learn how compression ratios work. Based on the J277 OCR GCSE Computer Science specification (first taught from 2020 onwards). 2.5: Compression Exam Board: OCR Specification: J277 What is compression? To compress a file means to make its size smaller . Benefits of compression include: Files take up less storage space (so more files can be stored). Files can be transferred quicker (because they are smaller). Files can be read from or written to quicker . There are two methods that are used to compress files: Lossy and Lossless . Lossy Compression Lossy compression uses an algorithm (set of instructions) to analyse a file and remove data that cannot be heard or seen by humans . For example, a lossy algorithm would analyse the sound waves of an audio file and remove any frequencies which humans cannot hear. This process reduces the size of the file . Further lossy compression will remove data that humans can see / hear . For example, the dog image to the right has been strongly compressed using a lossy algorithm and some data has clearly been removed. Lossy compression removes the data permanently , so the file can never return to its original form . Lossy compression is often used with images , audio and video to reduce the file size, for example to send over the internet. Lossless Compression Lossless compression reduces the size of a file without permanently removing any data . Because of this, the file is returned to its original form when decompressed, so no quality is lost . A file that is compressed with a lossless algorithm is usually larger than a file compressed with a lossy algorithm because no data has been permanently removed. Lossless compression is used with files that would not work if data was removed, for example executable files (e.g. programs and games) or word documents . Remember that lossy and lossless compression do not just refer to images. Below is an audio file that has been compressed with lossy compression . Data has been removed so the audio quality has decreased. 197 KB 81 KB 43 KB Q uesto's Q uestions 2.5 - Compression: 1. Describe 3 benefits of compressing a file . [ 3 ] 2. Describe the differences between lossy and lossless compression . [4 ] 3. A student needs to compress a Microsoft Word document to send in an email. Suggest which type of compression they should use and why . [ 2 ] 2.4d Sound Storage Theory Topics 3.1a - Network Types & Performance
- Python | Section 10 Practice Tasks | CSNewbs
Test your understanding of working with files in Python, including reading, searching, writing and editing. Try practice tasks and learn through text and images. Perfect for students learning GCSE Computer Science in UK schools. Python - Section 10 Practice Tasks Task One Create a file in Python called DaysOfTheWeek.txt. Write the days of the week into the file in a single print line but put each day on a new line. Check the file to see if it has worked. Example solution: Task Two Create a file called Colours.txt. Use a for loop to ask the user to enter 8 different colours. Write each colour onto the same line, with a space between the colours. Close the file and open it again in read mode and print it. Example solution: Task Three Create a file named "Holiday.txt". Ask the user to enter the family name, destination and and number of passengers. Print each family's details on their own line. Bonus: Edit this program to add a search feature to look for the family name. Example solution: Task Four Use the holiday file from task three above. You are going to change the destination. Ask the user to enter a family name and then a new destination. Update the destination with the new value. Check the file to ensure the destination has been updated successfully. Use section 10c to help you with this task. Example solution: ⬅ 10c - Remove & Edit Lines 11 - Graphical User Interface ➡
- OCR CTech IT | Unit 1 | 1.1 - Computer Hardware | CSNewbs
Learn about input and output devices used with computer systems. Based on the 2016 OCR Cambridge Technicals Level 3 IT specification. 1.1 - Computer Hardware Exam Board: OCR Specification: 2016 - Unit 1 Input Devices An input device allows data, such as text, images, video or sound, to be entered into a computer system. Common input devices: Mouse Keyboard Scanner Controller Microphone Webcam Chip Reader OCR / OMR Scanner Barcode Scanner Graphics Tablet Sensors (e.g. light or temperature) Touch Screen Remote Control Biometric Scanner (e.g. fingerprint or iris) Concept Keyboard Output Devices There are many outputs created by a computer system, including printed documents, on-screen data and sound. Common output devices: Monitor Printer (e.g. inkjet or laser) Plotter Speakers Projector Alarm Light Headphones Touch Screen Braille Terminal Communication devices can be found in 1.5 . Biometric Devices A biometric device uses a human characteristic as part of its security mechanism, such as a fingerprint , iris (eye), face o r voice . Organisations using biometrics must instruct each employee to first input their information to a database , by scanning their fingerprint for example. Whenever the scanner scans a finger it searches in its database to see if the fingerprint matches one that it already holds . Only authorised employees will have already scanned their fingerprints so if there is no match then access is not allowed . Advantages of biometric devices: Security is improved as biometrics can't be shared like passwords can. Even if a password is exposed the system can't be accessed without having the biometric too. Biometric scanners verify that a user is who they claim to be. Using a biometric device (e.g. fingerprint scanner) might be quicker and easier than entering a username and password. Disadvantages of biometric devices: Can be expensive to install and all users must take the time to initially set up by entering their biometric into the database so they will be recognised by the system. Unreliable in that it can be affected by the environment (e.g. dirty fingers can't be used with a fingerprint scanner or voice recognition may not work in a loud environment). Disabled users might not be able to provide the biometric required. Privacy concerns - users might not want their personal characteristics stored on a computer system. Q uesto's Q uestions 1.1 - Computer Hardware: 1. Make a list of 5 input devices and 5 output devices . Challenge yourself to look up and include devices from this page you may not be familiar with. [10 ] 2a. State 3 human features that may be recorded by a biometric device . [3 ] 2b. Describe how a biometric device works . [3 ] 2c. A school is considering installing biometric devices to allow only sixth form students to enter certain parts of the school. Describe 3 advantages and 3 disadvantages to the school of using biometrics in this way. [10 ] Topic List 1.2 - Computer Components
- Python | Extended Task 7 | CSNewbs
Test your ability to create a more complex program in Python based on a given scenario. Perfect for students learning GCSE Computer Science in UK schools. Extended Task 7 'Guess the Number' Multiplayer Game A primary school teacher wants to create a fun activity for their students to play when it is raining and they have to stay inside during break and lunch. Five pupils can play the game at once. Each player chooses a number between 1 and 100 . Then a random number is generated. Whoever was furthest from the random number is out of the game . The four remaining players then pick a new number . This continues with one player being removed each round until only one player is left and they are the winner. Add your own flair and additional features to your program as an extension, including preventing the same number being chosen by multiple players . For this task, you will need to create a document and include the following sections (with screenshots where appropriate): An introduction to explain the Purpose of your program . A List of Requirements for a successful program. Screenshots of your code (with comments in your code to show understanding). Testing – Create a plan to show how you will test your program and then explanations of any errors that you found and how they were fixed . An Evaluation of what worked, what didn’t, and how you met each of your requirements from your original list. Also, discuss further improvements that you could have made to improve your program. Reminders for this task: You will need to use loops to allow the users to enter their numbers. You may wish to use subroutines to decompose the problem into separate rounds. You will need to import the random library to generate a random number in each round. You will need to compare each number to the randomly selected answer using comparison operators such as > and <. There are multiple ways to approach this program, and your solution might look different from the example. Break the problem down and focus on one part at a time. Example solution: Introduction & Round One Round Two ⬅ Extended Task 6 (Word Game)