top of page

Search CSNewbs

286 items found for ""

  • 2.3 - Units - OCR GCSE (2020 Spec) | CSNewbs

    2.3: Data Units Exam Board: OCR Specification: 2020 Why data must be stored in binary format How data needs to be converted into a binary format to be processed by a computer text file size = bits per character x number of characters All computer systems communicate , process and store data using binary . Binary is a number system consisting entirely of 0s and 1s . ​ Why do computers use binary? Computer systems consist of billions of tiny transistors which are switches that only have two values - on (1 ) or off (0 ). Therefore all data must be represented and processed in this way. ​ Everything that a computer needs to process must be converted into a binary format including text , images , videos and audio . 0010 1011 0101 0101 0110 0111 0101 0001 0101 0101 0101 0100 1010 1010 1010 1010 1111 1110 0010 1001 0100 1001 0010 0111 0111 0101 0011 1010 1000 0101 0110 0111 0000 1010 1010 0011 1101 1001 0010 1101 0010 0100 1001 0011 1010 1001 0101 0101 0010 0101 0111 0101 0101 1000 1011 0111 Units of Data Storage 0 / 1 All data in a computer system is made up of bits . ​ A single bit is a 0 or a 1 . 4 bits (such as 0101 or 1101) is called a nibble . 1,000 bytes is called a kilobyte . ​ A kilobyte can store a short email . A 8 bits is called a byte . A byte can store a single character . 1,000 kilobytes is called a megabyte . ​ A megabyte can store about a minute of music . 1,000 megabytes is called a gigabyte . ​ A gigabyte can store about 500 photos . 1,000 terabytes is called a petabyte . ​ A petabyte can store about 1.5 million CDs . 1,000 gigabytes is called a terabyte . ​ A terabyte can store about 500 hours of films . This video shows some real-world examples to help you understand the scale of the different data storage units . ​ Important note - this video was originally made for a different exam board and uses a scale of 1,024 between data units. ​ Technically 1,000 bytes is a kilobyte . 1,024 bytes is a kibibyte . ​ In the OCR GCSE exam you can use either 1,000 or 1,024 but as it is a non-calculator paper it makes sense to use 1,000 for simpler calculations . Calculating Data Capacity Requirements It is important to be able to calculate the required storage capacity for a given set of data . ​ Example: ​ A local DJ has a USB memory stick with a capacity of 32GB . There is currently only 9GB of space remaining . ​ Each song is 6MB . How many songs can be stored on the remaining space of the USB stick? ​ Solution: ​ Because each song is recorded in megabytes but the USB stick capacity is measured in gigabytes , the values must be converted into the same storage unit . ​ 9GB x 1000 = 9000MB ​ 9000MB ÷ 6MB = 1,500 songs Watch on YouTube Q uesto's Q uestions 2.3 - Data Units: ​ 1. Explain why computer systems use binary to represent data. [ 2 ] ​ 2. Put the following data storage units in order from smallest to largest : a . kilobyte - gigabyte - byte - megabyte - nibble - bit [3 ] b. gigabyte - petabyte - kilobyte - byte - terabyte - megabyte [ 3 ] ​ 3. A hard drive contains 25GB of remaining available storage space. Tim is an animator backing up video files. Each file is 200MB . How many files can he fit on the hard drive? [ 2 ] ​ 4. Samantha is a musician. She has compressed each song to 900KB . Her USB memory stick contains 1.2GB of free storage. How many songs can she fit on the USB stick? [ 2 ] ​ 5. A CD has a capacity of 650MB . How many 0.2GB audio files can be stored on the CD? [ 2 ] 2.2 - Secondary Storage Theory Topics 2.4a - Number Storage

  • HTML Guide 1 - Setup | CSNewbs

    1. Setting up a HTML document HTML Guide Watch on YouTube: This guide assumes that you have Notepad++ already installed. ​ If you are working at home and need to download Notepad++ then click here . Save as .html file Notepad++ assumes you are writing a text file so you must change the file type . ​ Open Notepad++ ​ Click File then Save As... ​ Change Save as type: from Normal text file (.txt) to Hyper Text Markup Language file (.html) ​ Change File name: to Fanpage Website.html ​ These steps are necessary to set up your HTML web page correctly. Open Notepad ++ and save your file as a .html document. Editor vs. Browser View In newer versions of Notepad++ click on View then View Current File in and choose a browser installed on your computer such as Chrome . Some versions of Notepad++ enable you to view the document in a web browser by selecting Run then an option such as Launch in Chrome . It is good practice to have both Notepad++ and a web browser open at the same time so that you can easily check if any changes have been made correctly. ​ Remember to press the save icon ( ) before you refresh your browser . ​ Don't expect your web browser to show anything yet. Next it is time to add our essential tags for the structure of the web page. HTML Guide 2. Essential Tags

  • HTML Guide 9 - Colours & Fonts | CSNewbs

    9. Style (Colours & Fonts) HTML Guide Watch on YouTube: Before you add any colours or font styles, you need to add tags. ​ The style tags must be written within your head of your HTML document! ​ Add them below your title tags: Add the

  • Python | 10c - Remove & Edit Lines | CSNewbs

    Python 10c - REMOVE & Edit LINES Splitting a File The split command is used to split up a line of a file into different parts . ​ The character or string in brackets after the split command is the value that will denote each split . ​ In the example below I have split the file at each comma . Remember that Python numbering starts at 0 so the first section is 0, not 1. 0 1 2 3 The program below splits each line of the file at each forward-slash ( / ). ​ The printed statement is the employee's first name, surname and job position. 0 1 2 3 4 Practice Task 1 Create a file (new txt document in Notepad) called movies. ​ Type in the movie name, main actor, genre (e.g. horror), year it was released and your rating out of 10. ​ Print just the movie name and year it released. Example solution: Deleting Lines in a File Exact Line Name The code below shows how to remove a line from a file using the exact name of the line , which will only work for short or simple files . ​ First open the file in read move to save each line in a variable I've named lines. Then ask the user to input the exact line they want to remove (e.g. 'plum' in my example). ​ Then open the file in write mode and use a for loop to read each line and only write it back into the file if it isn't equal to the line the user entered - such as 'plum'. ​ The line.rstrip() command is important as it removes any spaces or empty lines that may interfere with matching the line to the input. Deleting Lines in a File Word in the Line The code below shows how to remove a line from a file if a certain word appears in that line , although this could be dangerous with large files. In my example I have written apple which has also removed pineapple! ​ The difference from the previous program is to change the for loop so that it checks if the inputted word appears in the line . If it does appear then nothing happens (except a print statement to acknowledge it's been found). If the word doesn't appear then that line can be safely rewritten to the file . Practice Task 2 Download the trees text file. ​ Give the user a choice of removing a specific tree or a type of tree. ​ If they choose a specific tree then remove the line if it is an exact match (e.g. Field Maple). ​ If they choose to remove a type of tree remove all lines that contain the name of that tree (e.g. willow) ​ Make sure you actually check the file to see if the lines have been removed correctly! Example solution: Download the trees file: Sorting a File Sorting a file into alphabetical (or numerical ) order is a simple process. ​ Open the file in read mode and save the lines into a list . ​ The sort c ommand will automatically order the list of lines. If necessary, in the brackets type reverse = True to sort the list in reverse. Practice Task 3 Expand on your tree program from the previous practice task. ​ As well as SPECIFIC or TYPE, allow the user to enter SORT to sort the tree file either in alphabetical order or reverse alphabetical order. ​ Check the text file to see if it has been sorted correctly. ​ You may make this a separate program from task 2 if you wish. Example solution: Editing Lines in a File Overwriting data in a file is a tricky process. ​ The program below uses the same Employees.txt file as above but allows the user to change the address of an employee . ​ A temporary file is created to store the lines of the employee file, but the line with the changes is replaced specifically with the new address. I have explained each line of the program to the right: When I executed the program below I entered Thomas Wynne's details and changed his address. ​ When I opened the employees file the address had been updated : 1: Importing os allows me to rename and remove files later in the program. ​ 3: Opens the employee file in read mode . ​ 5 - 8: Input lines allow the user to enter the first name, surname and the person's new address. ​ 10: A found flag is set up and set to False . ​ 12: The for loop cycles through each line in the file. ​ 13: Each line is split into separate parts from each / . ​ 15: An if statement checks if the first name and surname match an employee in the file. ​ 16: A replacement line is created by putting the original line together but with the new address. ​ 18: The found flag is changed to True because the employee first name and surname matched . ​ 19: A temporary file is created and opened in write mode . ​ 20: The seek command restarts the file at line 0 . ​ 22: The for loop cycles through each line of the employee file from the beginning. If the first name and surname match it will write the new line to the file, otherwise it will rewrite the original line . ​ 28 & 29: Both files are closed . ​ 31 & 32: If the names didn't match , an appropriate message is printed. ​ 34 - 37: If the address was changed, the original file is renamed and deleted and the temp file is renamed as the original file. Practice Task 4 Use the movie file you created for practice task 1. ​ Ask the user to enter the name of a movie. Ask them to enter an updated rating out of 10. ​ Update the file to change the rating to the new value. Example solution: ⬅ 10b - Read & Search Files Section 10 Practice Tasks ➡

  • Key Stage 3 Python | Inputs | CSNewbs

    Python - #3 - Inputs 1. Asking Questions Input means to enter data into a program. ​ Use the input command to ask a question. ​ You must save the answer into a suitably named variable using the = symbol. Task 1 - Create a new Python program and save the file as 3-Inputs.py ​ Use the picture to help you ask what someone's name is. Run the program and type your name. When you run the program (F5) you can type your answer on any question line in the Python Shell . 2. Asking more Questions There is no limit to how many questions you can ask in Python. It is the most important way to interact with the user of your program. Task 2 - Ask two more questions on topics of your choice. 3. Using Variables in a Sentence When we have printed the answers so far, they have not been very informative! ​ You can print variables together with sentences so that they mean more. ​ Use a comma ( , ) between variables and sentences . Task 3 - Use the pictures to help you add commas and sentences to your program to be more informative. BONUS: After I took the screenshot of my code I added in print lines in the two blanks spaces that print a line of dashes. Try to do the same to make your program easier to read. 4. Using Integers An integer is a whole number . ​ When you are asking a question that you know will have a number for an answer , you need to add int ( before your input. ​ Don't forget to add double close brackets at the end of the question line ! Task 4 - Underneath your previous questions (don't delete anything) ask 2 questions that will have numbers for answers. You must use int ( - see the image for help. Challenge Programs Use everything that you have learned on this page to help you create these programs... ​ Challenge Task 1 - Funny Food Create a new Python program. Save it as ' 3-FunnyFood.py ' Add a comment at the top with your name and the date. Create a program that asks two questions, one for their favourite colour and one for their favourite food. Print a funny sentence using both of their answers. ​ BONUS : Try to use only one print line. ​ Remember: Break up variables in a print line by using commas. ​ When you run it, it could look something like this: Challenge Task 2 - Trivia Question Create a new Python program. Save is as ' 3-Trivia.py ' Add a comment at the top with your name and the date. Create a program that asks the user a trivia question of your choice. Print the correct answer AND their answer. ​ BONUS : Use only one print line. BONUS : Try to use only two lines in total . ​ Remember: Break up variables in a print line by using commas. ​ When you run it, it could look something like this: Challenge Task 3 - Getting to School Create a new Python program. Save it as ' 3-School.py ' Add a comment at the top with your name and the date. Create a program that asks two questions, one for how they get to school and one for how long it takes. Don't forget - use int( and then double close brackets for a number! Print an appropriate response that uses both of their answers. ​ BONUS : Use two separate input lines. BONUS : Try to use only one print line . ​ Remember: Break up variables in a print line by using commas. ​ When you run it, it could look something like this: <<< #2 Variables #4 Calculations >>>

  • Key Stage 3 Python | Calculations | CSNewbs

    Python - #4 - Calculations 1. Creating Calculations To add in Python use + ​ To subtract in Python use - ​ To multiply in Python use * ​ To divide in Python use / Task 1 - Create a new Python program and save the file as 4-Calculations.py ​ Print 4 different calculations - use each operator once.(add/subtract/multiply/divide) Python is very clever, so don't be afraid to make your own calculations using larger numbers and more than one operator . 2. Using Inputs and Calculations You can ask the user to enter numbers by writing input lines. ​ Python can then perform calculations using the numbers that the user has entered. ​ Don't forget to add int ( and double close brackets when using numbers ! Task 2 - Copy the new code from the picture. Change the text and num1 so you are dividing by 5 not 3. Don't delete your earlier code , just add this underneath. ​ I have cropped the images to make the new code clearer. 3. Using Calculations in a Sentence When we have printed the calculations so far, they have not been very informative! ​ You can print calculations together with sentences so that they mean more. ​ Use a comma ( , ) between calculations and sentences . Task 3 - Use the pictures to help you add commas and sentences to your program to be more informative. Challenge Programs Use everything that you have learned on this page to help you create these programs... ​ Challenge Task 1 - Multiplication Create a new Python program. Save it as ' 4 -Multiplication.py ' Add a comment at the top with your name and the date. Write an input line ( don't forget int ! ) that asks the user to enter number 1. Write an input line ( don't forget int ! ) that asks the user to enter number 2. Multiply number 1 and number 2 together and print the answer. ​ BONUS : Try to show number 1 and number 2 in the print statement (see practice task 3 to help you). ​ Remember: Break up variables in a print line by using commas. ​ When you run it, it could look something like this: Challenge Task 2 - Retirement Create a new Python program. Save is as ' 4-Retirement.py ' Add a comment at the top with your name and the date. Write an input line ( don't forget int ! ) that asks the user to enter their age. Print the year that they will turn 65. (This is slightly tricky. Hint : You need to know their age, and you need to know the current year. You need to subtract something, and you need to add something. Try using scrap paper to help you figure it out.) ​ BONUS : Use only one print line. BONUS : Try to use only two lines in total . ​ Remember: Break up variables in a print line by using commas. ​ When you run it, it could look something like this: <<< #3 Inputs #5 Selection >>>

  • Python | 5a - Random | CSNewbs

    top Python 5a - Random Importing Section 5 looks at additional commands that you can import and use from Python’s code libraries . ​ A library is a collection of different commands that automatically come with Python but are separate from the main file. They can be imported (brought in) to your program by using the import command at the start of your program . ​ Imagine Python’s library to be similar to an actual library. There are different sections in a real library (such as History, Geography, Reference) and different sections in Python’s library (such as random or time ). Each real library has many individual books in each section, just like commands in Python. randint() choice() sample() shuffle() random sleep() ctime() strftime() time from random import randint from time import ctime You can import a specific command from one of Python's libraries using the from and import commands at the top of your program . Random Numbers To generate random numbers , first import the randint command section from Python’s random code library on the first line of the program. ​ The randint command stands for random integer . In brackets, state the number range to randomly choose from. ​ The random value should be saved into a variable . from random import randint ​ number = randint(1,100) print ( "A random number between 1 and 100 is" , number) = A random number between 1 and 100 is 39 = A random number between 1 and 100 is 73 = A random number between 1 and 100 is 4 The randint range does not have to be fixed values and could be replaced by variables . ​ Below is a program where the user selects the upper and lower values of the range: from random import randint ​ lower = int ( input ( "What is the lowest number? " )) upper = int ( input ( "What is the highest number? " )) ​ number = randint(lower,upper) ​ print ( "A random number between" , lower , "and" , upper , "is" , number) = What is the lowest number? 1 What is the highest number? 50 A random number between 1 and 50 is 36 = What is the lowest number? 500 What is the highest number? 1000 A random number between 500 and 1000 is 868 Random Numbers Task 1 ( Ice Comet) A special comet made of ice passes the Earth only once every one hundred years , and it hasn't been seen yet in the 21st century . Use the randint command to randomly print a year between the current year and 2099 . Example solutions: Did you know it won't be until 2032 that the ice comet will next pass Earth!? Did you know it won't be until 2075 that the ice comet will next pass Earth!? Random Numbers Task 2 ( Guess the Number) Use randint to generate a random number between 1 and 5 . ​ Ask the user to enter a guess for the number with int and input . Print the random number and use an if statement to check if there is a match , printing an appropriate statement if there is and something different if there is not a match . Example solutions: Enter a number between 1 and 5: 4 Computer's number: 5 No match this time! Enter a number between 1 and 5: 3 Computer's number: 3 Well guessed! It's a match! Choice - Random Word Rather than just numbers, we can also randomly generate characters or strings from a specified range by using the choice command. ​ You must first import the choice command from the random library. Choice works well with a list of values , which require square brackets and commas separating each word . ​ Below is a program that randomly chooses from a list of animals : from random import choice ​ animals = [ "cat" , "dog" , "horse" , "cow"] ​ print ( "A random animal is" , choice(animals)) = A random animal is cat = A random animal is horse Choice - Random Character Instead of using a list you can randomly select a character from a string . ​ The program below randomly selects a character from the variable named 'letters ' which is the alphabet . from random import choice ​ letters = "abcdefghijklmnopqrstuvwxyz" print ( "A random letter is" , choice(letters)) = A random letter is e = A random letter is y Random Choice Task 1 ( Holiday Destinations ) Harriet can't decide where to go on holiday and needs help deciding. ​ Make a list of at least 6 destinations (see the animal example above ) and use the choice command (don't forget to import it from the random library ) to print a random destination . Example solutions: Why don't you go to Paris on holiday? Why don't you go to Barcelona on holiday? Random Choice Task 2 ( Vowels ) Use the choice command to randomly select a vowel (look at the alphabet example above ). ​ Ask the user to input a vowel and use an if statement to check if the user's letter matches the randomly selected letter . ​ Print a suitable statement if they match and something else if they don't . Example solutions: Enter a vowel: i Random vowel: i The vowels matched! Enter a vowel: o Random vowel: u The vowels didn't match! Sample - Random Strings To choose more than one value from a set of data, use the sample command. ​ Sample is used with a list of values and a number representing how many from that list to pick. The code sample(days,2) picks two random values from the list called days . Both examples below perform the same task but, as with most code, there is no one way to solve a problem. from random import sample ​ days = [ "Monday" , "Tuesday" , "Wednesday" , "Thursday" , "Friday" ] two_days = sample(days , 2) print ( "You will be set homework on:" , *two_days) A separate list and then a sample . = You will be set homework on: Thursday Monday = You will be set homework on: Friday Tuesday from random import sample ​ two_days = sample([ "Monday" , "Tuesday" , "Wednesday" , "Thursday" , "Friday" ] , 2) print ( "You will be set homework on:" , *two_days) The list and sample is combined on one line. The sample command actually makes a new list with the number of values selected (e.g. ["Tuesday" , "Thursday"] in the examples above). ​ You can use an asterisk - * - directly before the sampled variable to print just the list values , otherwise the brackets and apostrophes will be printed too. from random import sample ​ names = sample([ "Bob" , "Ben" , "Jen" , "Ken" ] , 2) ​ print ( "The names are:" , names) from random import sample ​ names = sample([ "Bob" , "Ben" , "Jen" , "Ken" ] , 2) ​ print ( "The names are:" , *names) The names are: ['Bob', 'Jen'] The names are: Bob Jen Sample - Random Numbers You can also use the sample command to choose several integers from a given range. By implementing the range command you don’t need to individually write out each number. from random import sample ​ numbers = sample( range (1,100) , 5) ​ print ( "Five random numbers between 1 and 100 are:" , *numbers) Five random numbers between 1 and 100 are: 53 42 11 8 20 Five random numbers between 1 and 100 are: 74 52 51 1 6 Random Samples Task 1 ( Frost Comets) The ice comet from a previous task has broken up into four smaller frosty comets that could pass the Earth anytime from next year to the year 2095 . ​ Print four random years in that range . Example solutions: I predict the frost comets will be seen in these years: 2093 2036 2027 2091 I predict the frost comets will be seen in these years: 2076 2033 2053 2085 Random Samples Task 2 ( Baby Boy ) Aunt Meredith is having a baby boy . Create a program that randomly selects 3 male names from a list of 10 possible names . Example solutions: Hey Aunt Meredith, how about these names: Charlie Eddie Frank Hey Aunt Meredith, how about these names: George Harold Bill ⬅ Section 4 Practice Tasks 5b - Sleep ➡

  • 1.3 - Embedded Systems - OCR GCSE (2020 Spec) | CSNewbs

    1.3: Embedded Systems Exam Board: OCR Specification: 2020 Example: A washing machine has a control chip that manages the different program cycles. An embedded system is a computer system built into a larger machine to provide a means of control . ​ Embedded systems perform a specific pre-programmed task which is stored in ROM . ​ An embedded system uses a combination of hardware and software . Example: A traffic light has a control chip that determines when to change to a green or red light. Q uesto's Q uestions 1.3 - Embedded Software: ​ 1. What is an embedded system ? [3 ] ​ 2a. Give two examples of an embedded system. [ 2 ] 2b. Research and describe another two examples of an embedded system. [ 4 ] 1.2 - CPU Performance 2.1 - Primary Storage Theory Topics

  • 5.1 - Computer Legislation | OCR A-Level | CSNewbs

    Exam Board: OCR 5.1 - Computer Legislation Specification: A-Level 2015 An instruction set is a list of all the instructions that a CPU can process as part of the FDE cycle . ​ CPUs can have different sets of instructions that they can perform based on their function. The two most common instruction sets are the simpler RISC (Reduced Instruction Set Computer ) and more complicated CISC (Complex Instruction Set Computer ). Instruction Sets This page is still being updated. Graphical Processing Unit What is cache memory? ​ Cache memory is temporary storage for frequently accessed data . ​ Cache memory is very quick to access because it is closer to the CPU than other types of memory like RAM . Multicore & Parallel Systems What is cache memory? ​ Cache memory is temporary storage for frequently accessed data . ​ Cache memory is very quick to access because it is closer to the CPU than other types of memory like RAM . Multicore & Parallel Systems What is cache memory? ​ Cache memory is temporary storage for frequently accessed data . ​ Cache memory is very quick to access because it is closer to the CPU than other types of memory like RAM . Q uesto's Q uestions 5.1 - Computer Legislation: ​ 1. What is cache memory ? [ 2 ] ​ 4.3b - Flip Flops, Adders, Laws & Maps Theory Topics 5.2 - Moral & Ethical Issues

  • 2.4a - Number Storage - OCR GCSE (2020 Spec) | CSNewbs

    2.4a: Number Storage Exam Board: OCR Specification: 2020 What is binary? By now you should know that computer systems process data and communicate entirely in binary . ​ Topic 2.3 explained different binary storage units such as bits (a single 0 or 1), nibbles (4 bits) and bytes (8 bits). ​ Binary is a base 2 number system. This means that it only has 2 possible values - 0 or 1 . What is denary? Denary (also known as decimal ) is the number system that you've been using since primary school. ​ Denary is a base 10 number system. This means that it has 10 possible values - 0, 1, 2, 3, 4, 5, 6, 7, 8, and 9 . How to convert from binary to denary: How to convert from denary to binary: Binary & Denary What is hexadecimal? Hexadecimal is a base 16 number system. This means that it has 16 possible values - 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, A, B, C, D, E and F . ​ Hexadecimal is used as a shorthand for binary because it uses fewer characters to write the same value . This makes hexadecimal less prone to errors when reading or writing it , compared to binary. For example, 100111101011 in binary is 9EB in hexadecimal. ​ Hexadecimal only uses single-character values. Double-digit numbers are converted into letters - use the table on the right to help you understand. How to convert from binary to hexadecimal: How to convert from hexadecimal to binary: Hexadecimal Converting from denary to hexadecimal / hexadecimal to denary To convert from denary to hexadecimal or the other way round you must convert to binary first . ​ Denary > Binary > Hexadecimal ​ Hexadecimal > Binary > Denary ​ Use the videos on this page if you need help converting to or from binary. ​ The most common number systems question in exams are from denary to hexadecimal or from hexadecimal to denary so make sure that you practice these conversions. Binary Addition Binary addition is a method of adding binary values without having to convert them into denary. How to add binary numbers: What is an overflow error? An overflow error occurs when a binary value is too large to be stored in the bits available . ​ With a byte (8 bits ) the largest number that can be held is 255 . Therefore any sum of two binary numbers that is greater than 255 will result in an overflow error as it is too large to be held in 8 bits . What is binary shift? Binary shift is used to multiply and divide binary numbers . The effect of shifting left is to multiply a binary number. The effect is doubled by each place that is shifted . x The effect of shifting right is to divide a binary number. ÷ Shifting by 1 has an effect of 2 . ​ Shifting by 2 has an effect of 4 . ​ Shifting by 3 has an effect of 8 . For example, shifting left by 2 places has an effect of multiplying by 4 . Another example: Shifting right by 3 places has an effect of diving by 8 . How to shift a binary number: Q uesto's Q uestions 2.4a - Number Systems: ​ 1. Explain why hexadecimal numbers are used as an alternative to binary . Use an example . [ 3 ] ​ 2. Convert the following values from binary to denary : a. 00101010 b. 11011011 c. 01011101 d. 11101110 e. 01011111 [1 each ] ​ 3. Convert the following values from denary to binary : a. 35 b. 79 c. 101 d. 203 e. 250 [1 each ] ​ 4. Convert the following values from binary to hexadecimal : a. 11110101 b. 01100111 c. 10111010 d. 10010000 e. 11101001 [1 each ] ​ 5. Convert the following values from hexadecimal to binary : a. C2 b. 8A c. DE d. 54 e. F7 [1 each ] ​ 6. Convert the following values from denary to hexadecimal : a. 134 b. 201 c. 57 d. 224 e. 101 [1 each ] ​ 7. Convert the following values from hexadecimal to denary : a. 32 b. A5 c. 88 d. C0 e. BE [1 each ] Binary Addition: ​ 1. Explain what an overflow error is. [ 2 ] ​ 2. Add together the following binary values. If an overflow error occurs you must state one has occurred. a. 010110012 and 010001012 [2 ] b. 110110112 and 010111012 [2 ] c. 001101102 and 011010112 [2 ] d. 110110112 and 010101112 [2 ] e. 011011012 and 110101102 [2 ] ​ ​ Binary Shift: ​ 1a. Draw a diagram to show the effect of multiplying and dividing a binary number . [2 ] 1b. Draw a diagram or table to show the effect a shift has for each place from 1 to 4 . For example, a shift of 1 place has an effect of 2. [4 ] ​ 2. State the effect of the following shifts: a. Shift right by 2 places. b. Shift left by 1 place. c. Shift left 3 places. d. Shift right by 4 places. [ 1 each ] ​ 3. Shift the following binary numbers and state the effect of the shift: a. 10101011 : Shift left by 2 places. b. 11101100 : Shift right by 3 place. c. 00001011 : Shift right by 2 places. d. 01101110 : Shift left by 1 place. [ 2 each ] Binary Shifts Watch on YouTube Watch on YouTube Watch on YouTube Watch on YouTube Watch on YouTube Watch on YouTube Click the banners below to try self-marking quizzes (Google Form) on these topics. Binary to Denary: Binary to Hexadecimal: Denary to Binary: Hexadecimal to Binary: 2.3 - Data Units Theory Topics 2.4b - Character Storage

  • 2.3.1d - Data Structures: Trees & Graphs | OCR A-Level | CSNewbs

    Exam Board: OCR 3.1d - Data Structures: Trees & Graphs Specification: A-Level 2015 An instruction set is a list of all the instructions that a CPU can process as part of the FDE cycle . ​ CPUs can have different sets of instructions that they can perform based on their function. The two most common instruction sets are the simpler RISC (Reduced Instruction Set Computer ) and more complicated CISC (Complex Instruction Set Computer ). Instruction Sets This page is still being updated. Graphical Processing Unit What is cache memory? ​ Cache memory is temporary storage for frequently accessed data . ​ Cache memory is very quick to access because it is closer to the CPU than other types of memory like RAM . Multicore & Parallel Systems What is cache memory? ​ Cache memory is temporary storage for frequently accessed data . ​ Cache memory is very quick to access because it is closer to the CPU than other types of memory like RAM . Multicore & Parallel Systems What is cache memory? ​ Cache memory is temporary storage for frequently accessed data . ​ Cache memory is very quick to access because it is closer to the CPU than other types of memory like RAM . Q uesto's Q uestions 3.1d - Data Structures: Trees & Graphs: ​ 1. What is cache memory ? [ 2 ] ​ 3.1c - Stacks, Queues & Lists Theory Topics 3.1e - Sorting Algorithms

  • Key Stage 3 Python | Selection | CSNewbs

    Python - #5 - Selection 1. Using if Statements Using if enables your program to make a choice . ​ There are a few things you need to remember : if is lowercase - it should turn orange. You must use double equals == You need a colon : at the end of your if line. The line below your if line must be indented . ​ Task 1 - Create a new Python program and save the file as 5-Selection.py ​ Use the picture to help you ask what your favourite food is . Run the program and test it works. To indent a line press the tab key on your keyboard. ​ Indentation is important as it tells Python what is within the if statement and what isn't. 2. Using elif elif stands for 'else if '. It is used to respond in a different way depending on the input. ​ elif works exactly the same as an if line so if you make a mistake look up at task 1 to help you. Task 2 - Write an elif line that responds differently to your favourite food question from task 1. e.g. "Yum!" if someone enters "pasta". 3. Using else It is impractical to have hundreds of elif lines to respond to different inputs. ​ else is used to respond to anything else that has been entered in a general way. ​ The else line works a bit differently, so look carefully at the picture . Task 3 - Write an else line that responds to anything else the user enters for your favourite food question. 4. Multiple elifs Despite what you did in task 3, programs can be expanded with more than one elif line. ​ Underneath your first elif line but before your else line, add at least two more elif sections that respond differently depending on what is entered. ​ Use the elif line from the task 2 picture to help you. Task 4 - Read the description above and use task 2 to help you. Challenge Programs Use everything that you have learned on this page to help you create these programs... ​ Challenge Task 1 - Spanish Translation Create a new Python program. Save it as ' 5-Translator.py ' Add a comment at the top with your name and the date. Create a program that asks for a number between 1 and 4. Use if and elif statements to see what the user has entered and print a statement that displays the chosen number in Spanish - use the image to help you understand. ​ BONUS : Add an else line for any numbers higher than 4. ​ ​ When you run it, it could look something like this: Challenge Task 2 - Able to Vote Create a new Python program. Save it as ' 5-Vote.py ' Add a comment at the top with your name and the date. Create a program that asks for their age. Use an if statement to see if the age is more than 17 (use > instead of ==). If the age is over 17, then print "You are old enough to vote!" Use an else statement to print a different message for everyone else. ​ ​ When you run it, it could look something like this: Challenge Task 3 - Totals Create a new Python program. Save it as ' 5-Totals.py ' Add a comment at the top with your name and the date. Use an int input line to ask the user for number 1. Use an int input line to a sk the user for number 2. Multiply the two numbers together and save it into a variable called total. If the total is over 9000, then print "It's over 9,000!!!" Use an else statement to print the total if it is less than 9000. ​ ​ When you run it, it could look something like this: <<< #4 Calculations #6 Turtle >>>

bottom of page