















































Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
Various topics related to the national 5 computing science curriculum in scotland. It provides an overview of extended ascii character representation, bit depth and color depth, the differences between bitmap and vector graphics, data buses, energy consumption of computer components, power management settings, data types, arithmetic operations, conditional statements, loops, input validation, and running totals. It also discusses software development documentation, fitness for purpose, efficient code using arrays and fixed loops, database design concepts, the data protection act, sql queries, and web design principles like cascading style sheets (css) and javascript. The document aims to prepare students for the national 5 computing science examination by covering a wide range of relevant topics in a concise manner.
Typology: Exams
1 / 55
This page cannot be seen from the preview
Don't miss anything!
















































Positive Numbers in Binary - 128 64 32 16 8 4 2 1 0 1 1 0 0 0 1 1 This shows the number 99 in binary. A one is 'on' or 'used' and a 0 is 'off' or 'not used' The numbers that are on in this example are: 64 + 32 + 2 + 1 = 99 Real Numbers - Real numbers allow the computer to store decimal values. The Mantissa dictates the precision of numbers and the Exponent dictates the range Mantissa - The number of bits allocated to the Mantissa dictates the precision of a real number. More bits to the Mantissa leads to greater precision. Less bit leads to less precision. Exponent - The number of bits allocated to the Exponent dictates the range of a real number. More bits to the Exponent leads to greater range. Less bit leads to less range.
(Extended) ASCII - Extended ASCII is one way to represent a character set. Extended ASCII code uses 8 bits to represent a character meaning that you can represent up to 256 different characters. Printable Characters(ASCII) - Printable characters are those that you will be able to see on screen. They have an 8 bit ASCII code. Examples are: A, s, !, @ Control Characters (ASCII) - Control Characters are those that do not appear on screen but that carry out a task. They have an 8 bit ASCII code. Examples are: Shift, Delete, Backspace, F2, Ctrl Bit Mapped Graphics - Bit Mapped graphics are made up of a 2D array of pixels. Every single pixel is saved. JPEG, PNG and GIF are bit mapped graphic formats. Bit Depth(Colour Depth for Graphics) - Every pixel is stored as a binary code. Bit depth is the number of bits used to store each pixel. A bit depth of 8 bits allows the pixel to be one of 256 colours, a bit depth of 16 bits allows for 65,536 colours
Vector - Rectangles - Rectangle is a type of polygon but given the frequency of its use, most vector graphic file formats support a specific rectangle object. Squares could be created using either the rectangle or polygon objects. Attributes: x, y, fill, line, height, length. x and y define the top left corner position Vector - Ellipse - Ellipse objects are like circles, but you can alter the radius of the X co-ordinate so that it is a different value to that of the Y co-ordinate. This allows for the creation of oval shapes rather than circles. Attributes: cx and cy define the centre, rx and ry the radius. Fill and line. Vector - Line - The line object allows for the creation of lines. More complex lines with different points can be created using an object called a polyline. Attributes: x1 and y1 define the start of the line, x2 and y2 define the end of the line. Line is used for the colour of the line. Fill IS NOT NEEDED for lines. Vector - Polygon - The polygon object can be any shape that has at least three sides and allows for a wide variety of common shapes to be stored in vector form. At every angle, x and y coordinates are needed, so a shape with five angles would have:
Fill, line, x1, y1, x2, y2, x3, y3, x4, y4, x5, y ALU - Part of the processor/CPU that handles all arithmetic, logic and calculations. Stands for Arithmetic and Logic Unit. Floating point (mantissa and exponent) calculations and decisions involving AND, OR, NOT are made on the ALU. Registers - Temporary Storage Location on the processor. Data, instructions and addresses can be held in registers. Have the fastest access time as they are on the processor unlike RAM or backing storage. Control Unit - Part of the processor/cpu. Different lines have different roles. The main line is the clock line, which dictates the speed of fetching data from RAM. Clock, Read, Write, Reset and Interrupt are the different lines. Data Bus - A bi-directional bus (two way) that can carry data to and from RAM and the processor/CPU.
Machine Code - Machine Code is another name for binary, and is what programming code (high level languages) is turned into once it is translated using interpreters or compilers. Energy Use - Various computer components consume energy: Motherboard, Graphics Card, CPU, RAM, sound card, keyboard, network interface card, mouse, scanner, screen/touchscreen, printer etc. Monitor/Screen Settings - To save energy: Reduce brightness Activate efficiency mode Do not use a screen saver Use energy efficient labelled monitors/screens Power Down Settings - Operating systems include power down settings to let users: Power down the monitor, laptop or desktop after a period of inactivity
Control individual components e.g. turn hard disk off until needed, set processor state (high or low), alter wifi power settings Standby/Sleep Mode - RAM is still powered, and data held in RAM will still be stored until the user wakes the system. Power to all other components is significantly reduced or turned off. Hibernate Mode - Contents of RAM are moved to space on the Hard Disk or other backing storage, where they are saved permanently. RAM and all components have power cut or lowered to the lowest possible level. When the user wakes the system, the contents move from the hard disk/ backing storage back to RAM Firewalls - Data is split up and sent in packets when moving between networks. The firewall checks incoming and outgoing packets to make sure that they are sent/received from known IP addresses. Firewalls set rules about the IP addresses and ports that can be used to send and receive packets. Encryption - Encryption is designed to prevent intercepted data from being understood. A simple key encrypts data. Data is further encrypted using the public key of the receiving profile (computer). When it arrives, the receivers private key
Flowcharts Pseudocode - Pseudocode is a written list of steps used to design a program. Main steps are listed e.g. 1, 2, 3. Each main step is then refined e.g. 1.1, 1.2, 1.3, 1.4 etc. One line of pseudocode usually results in one line of code when implementing (creating the program). 42 User Interface Design - The functional and end user requirements are taken into consideration when designing the user interface. The user interface is the part of the program the user sees. A wireframe showing input and output areas as well as the location of media is often created when designing a program. Data Types - Data types identify the type of data held by a variable:
Character - A character is a single letter, number or symbol. Examples: A ! 7 The character data type is used to store one single character only. String - A string is a group of characters held together. To store more than one character, use the string data type. String is used more often than character. A firstname would be held as a string e.g. Hannah Integer - An integer is a whole positive or negative number. To store a whole number, use the Integer data type. E.g. 14
223 55
In reference language SET total TO total + score Concatenation - Joining two or more strings or substrings IF Statements - An If statement IS NOT A LOOP. IF statements allow the program to make decisions. Conditions, such as score < 10 are used within IF statements. IF score < 10 OR score > SEND 'Try Again' TO DISPLAY END IF This IF statements checks to see if a score is less than 10 or higher than 50 Nested IF Statements - Nested IFs are IF statements inside IF statements. The nested parts only run if needed. IF score < 100 THEN SEND "Low Score" to DISPLAY ELSE IF score < 150 THEN SEND "Mid level score" TO DISPLAY
SEND "High score" TO DISPLAY END IF END IF Logical Operators (AND, OR, NOT) - Logical operators can be used in IF statements and conditional loops. AND - Both conditions must be true OR - One condition must be true NOT - The opposite outcome to what would logically apply (negation) Simple Condition - A simple condition has only one condition e.g. IF firstname = "Betty" The condition is = "Betty" Complex Condition - A complex condition has two or more conditions e.g. IF firstname = "Betty" OR firstname = "Trevor" The two conditions are = "Betty" , = "Trevor" AND / OR are used as part of complex conditions
ROUND Function - ROUND is a pre-defined function, meaning the code to make it work already exists. If you use the ROUND function, the computer will round a value to a certain number of decimal places: SET size TO ROUND (measurement, 1) This takes the value of the measurement variable and rounds it to one decimal place. It then returns this new value to the size variable RANDOM Function - RANDOM is a pre-defined function, meaning the code to make it work already exists. If you use the RANDOM function, the computer will generate a random number: SET bonusBall TO RANDOM(1, 59) This would generate a random number between 1 and 59 and returns this number to the bonusBall variable. LENGTH Function - LENGTH is a pre-defined function, meaning the code to make it work already exists. If you use the LENGTH function, the computer will calculate the number of characters held in a string variable: SET numberOfCharacters TO LENGTH (firstname)
This would take the value in the first name variable, calculate its length and returns it to the numberOfCharacters variable. E.g. Jane would return 4 Input Validation Algorithm - This algorithm checks that input is valid: Line1 SEND "Enter a score between 1 and 99" TO DISPLAY Line 2 RECEIVE score FROM (INTEGER) KEYBOARD Line 3 WHILE score ˂ 1 OR score ˃ 99 DO Line 4 SEND "Error, enter valid number" TO DISPLAY Line 5 RECEIVE score FROM (INTEGER) KEYBOARD Line 6 END WHILE Running Total Algorithm - This algorithm keeps a running total: Line 1 DECLARE total INITIALLY 0 Line 2 FOR loop FROM 0 TO 4 DO Line 3 RECEIVE number FROM (INTEGER) KEYBOARD Line 4 SET total TO total + number Line 5 END FOR It asks for and keeps a running total of 5 values.
Exceptional Test Data - Exceptional test data is data that should not be accepted. E.g. If asking for a number between 1 and 99, 1001 and 'hello' are examples of exceptional data Syntax Error - A syntax error is an error caused by adding or missing characters when typing code. E.g. Dim firstname as SING The 'TR' is missing form STRING, so a syntax error has occurred Causes the program to crash. Execution Error - An execution error is when the program tries to do something that is impossible e.g.
Logic Error - A logic error does not cause a crash but causes unexpected output or results. Some examples of logic errors are: Using AND when you should have used OR Using > when you should have used < Program runs but the logic is wrong, therefore the results are unexpected/incorrect. Documentation - Various documents are created during software development: