Binary Shift: (P) Practical (T) Theory (3) Denotes Number of Lessons

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 9

The purpose of binary shift is so we can easily multiply and divide binary numbers by powers of 2

Binary Shift
When you shift a number left you are multiplying, when you shift it right you are dividing.

Year: 9 8 4 2 1 The binary grid


Topic: Binary Addition & 1 1 0 Our original number 4 + 2 + 0 = 6
Binary Shift 1 1 0 0 When you shift left, any gaps left are filled with a 0, this leaves us with 8 + 4 = 12

(P) Practical Shifting left once multiplies the original number by 2, shifting left twice * 4, shifting left by three * 8
(T) Theory
(3) Denotes number of lessons 8 4 2 1 The binary grid
1 1 1 0 Our original number 8 + 4 + 2 + 0 = 14
Lesson Sequence 1 1 1 When you shift right, any numbers that have nowhere to go are deleted. 4 + 2 + 1 = 7
(T) Binary Addition and Binary
Shift (3) In this example the digit in the far right hand column originally is deleted as we shift the number to the right. If you start with
an even number and shift right once you will be diving by 2, shift right twice and you are dividing by 4, shift right 3 times and
Key Assessment: You are dividing by 8. Note: if you start with an odd number the division will not be exact.
Key Assessment 4
Binary Addition
Remember the magic grid
Core Texts
AQA Computer Science, Alison
Page, 2013 0+0=0 Only add two digits at any one time and work from the right-hand column top to bottom.
0+1=1
AQA Computer Science, 1+0=1
Robson & Heathcote, 2016 1 = 1 = 10

http://www.Visualstudio.com
(free software download)

Binary Addition (2 numbers)


https://www.youtube.com/wa
tch?v=ypqYoFbPfTk

Binary Addition (3 numbers)


https://www.youtube.com/wa
tch?v=rUC_L4_xL1M
Cloud Storage
 Cloud storage refers to saving data in an off-site storage system maintained by a third party
 Instead of saving data on your computer’s hard drive or other local storage device, you save it in a remote storage facility and
access it via the internet.
Examples of cloud storage: Dropbox, iCloud, Google Drive, Microsoft One Drive

Advantages:
Year: 9  Access data from anywhere in the world (as long as you have an internet connection).
Topic: Cloud Storage &  You can share the data with people in different locations.
Embedded Systems  Backing up of data is no longer an issue for the user as it is the responsibility of the cloud service provider to keep the data safe.
 Avoids working with many different copies across multiple users.
 Do not have to rely on carrying around files on a removable disk (e.g. USB stick / External hard drive).

Core Texts Disadvantages


AQA Computer Science,  You are dependent on having an internet connection in order to access your data.
Robson & Heathcote, 2016  Some users are concerned about security of their data in the cloud and whether it is vulnerable to cyber-attacks.
 Most cloud service providers only give a limited amount of storage for free before they start charging users.
GCSE Computer Science for
 When you use cloud based services you are giving up some control over your assets (such as data or program source code) in
AQA, Kevin R Bond, 2018
exchange for other benefits (such as flexibility or lower costs).

Embedded Computer Systems Cloud storage facility example


 Many devices use microprocessors / CPUs to control their functions.
 An embedded system has a dedicated purpose, has a limited or non-existent user interface, and is designed to operate
completely or largely autonomously within other machinery.
 The control devices are usually on a single microprocessor stored within the device.
 They very often don’t need an operating system since the tasks are usually simple and repeated and the input is usually done by
pressing a button or setting a control.
 Usually embedded systems will not have a GUI (Graphical user interface) will not support a wide range of peripherals,
 The system is held in non-volatile memory such as ROM and is rarely if ever changed during the lifetime of the device
 It is not usually possible to upgrade the hardware.
 Many embedded systems can connect to the internet (usually via Wi-Fi) and can exchange data with the manufacturer’s website
or with the user. E.g. allowing our satellite box to start recording remotely, setting your heating via an app on your smart phone.
 Smart electricity and gas meters are being installed across Britain, these devices allow automatic readings to be sent to the
energy company and allow the user to see via a small display how much energy they are using.

Examples are:
Car Engine management systems, Washing machines, dishwashers, microwaves, MP3 players, Video cameras, traffic lights, hospital
scanning equipment, Smart energy meters, Smart phones, DVD / Blu-Ray players, Games consoles.
Key Words:
Colour The number of bits per pixel required to store Sample Rate The amount of samples taken from a sound file
Depth the data per second, measured in hertz (Hz)
Pixel The smallest area of a bitmap image, a single Sample Resolution The amount of bits used to store each sample
point (dot)

Year: 9 Bits per pixel Highest amount Bits per pixel Highest amount
Topic: Images & Sound Formula for calculating file size of an image:
(Colour depth) of possible (Colour depth) of possible
colours colours
Answer in bits =
1 2 7 128
Core Texts 2 4 8 256 image width x image height x
AQA Computer Science, Alison 3 8 … colour depth
Page, 2013
4 16 16 65,536
AQA Computer Science, 5 32 … Answer in bytes =
Robson & Heathcote, 2016 6 64 24 16.7million (image width x image height x
colour depth) / 8
Image example
Conversions
Bits to Bytes /8 An image with 256 colours with a size of 2,100 pixels by 1500 pixels is Formula for calculating file size of a sound file:
saved. What is the size in bytes of the file?
Bytes to Kilobytes (KB)
/1000 256 Colours means a colour depth of 8 pixels
Sample rate (Hz) x sample
resolution x number of seconds
Kilobytes to Megabytes (2,100 x 1,500 x 8) /8 = 3,150,000 bytes
(MB) /1000 This will give you an answer in bits
Remember we have divided by 8 at the end to convert the file from bits into
bytes. Remember:
If the sample rate is in Khz then you must
Sound example multiply it by 1000 to get it into Hz

Calculate the file size in bytes of a 10 second radio jingle using a sample rate If the time is in minutes you must multiply by
of 8,000Hz and a 16 bit sample resolution. 60 to have it in seconds

(8000 x 16 x 10) / 8 = 160,000 bytes

Remember we have divided by 8 at the end to convert the file from bits into
bytes.
Key Words:
Lossy A data encoding method where files are Run Length A simple form of lossless data compression in
compressed by removing some of the detail Encoding which runs of data are stored using frequency pairs
Lossless A data encoding method where files are Huffman Coding A compression technique used to reduce the
compressed but no data is lost number of bots used to represent each letter.

Year: 9 Compression is the reduction in file size to reduce download times and storage requirements.
Topic: Compression Compression examples
Type File suffix Compression Type Explanation
Core Texts Bitmap .bmp - Uncompressed still image file
AQA Computer Science, Alison JPEG .jpg Lossy Good for photographs
Page, 2013 Colour depth = 24 bits, RGB,
16.7 million different colours
AQA Computer Science, Graphic .gif Lossless Colour depth = 8 bits (only 256 colours)
Robson & Heathcote, 2016 Interchange Good for images with large areas of solid colour
Format Ideal for web graphics
MP3 .mp3 Lossy Audio files: Designed for downloading music form the
Run Length Encoding (RLE)
internet, In MP3 format you could fit 120 songs on a CD

Huffman Coding: Complete a frequency table of the letters in the sentence, include ‘space’

He ties the tether

1. Distribute the characters based on their frequency, Smallest at the top


2. Add the two smallest numbers together to create a new node, place the new node in order
within the list Add the two smallest numbers together to create a new node
3. Add the two smallest numbers together to create a new node, Note that this node now = 6
Instead of a long list of 1’s so must be placed in order at the bottom as it is the biggest
and 0’s we can put these 4. Add the two smallest numbers together to create a new node
into runs. The image above 5. Note that this node now = 7 so must be placed in order at the bottom as it is the biggest
would be: 6. Add the two smallest numbers together to create a new node, = 11 so must be placed at
the bottom
91, 10, 61, 60, 21, 60, 21, 7. This only leaves us with 2 numbers, add them together to give you a final total (this total
240, 11, 20, 21, 20, 11 should match the frequency total from earlier)
8. Add 1 and 0 to the branches (arrows), any arrow going up is 1, any arrow going down is 0
Core Texts
Year: 9 AQA Computer Science, Steve Cushing, 2016
Topic: Computer Networks AQA Computer Science, Robson & Heathcote, 2016

Key Words:
PAN Personal Area Network, used to connect WAN Wide area network (e.g. Internet, NHS, FTP File Transfer Protocol
one device to another, usually via Lots of LANs connected together) Used when transferring files between a client
Bluetooth and a server on a computer network.
Packet Around 512 bytes, contains: IP address SMTP Simple Mail Transfer Protocol Bluetooth A Wireless protocol that uses short range radio
(source & Destination), Sequence Used for the transfer of emails from one waves over distances up to 10meters.
number of the packet, number of total email server to another
packets, error checking data
LAN Local Area Network (e.g. School) IMAP Internet Message Access Protocol Protocol A set of rules which determine how two devices
2 or more computers connected Stores email messages on a server but communicate with each other
together over a small geographical area allows users to view and manipulate the
messages as if they were stored on their
own computers
TCP Transmission Control Protocol IP An identifying number for a piece of HTTP Hyper Text Transfer Protocol
Defines how messages are broken up Address network hardware. Every device that is Defines how messages are formatted and
into packets and reassembled at the connected to a network must have one transmitted and what actions web servers and
destination, also detects errors and e.g. 192.168.0.1 browsers should take when they receive one.
resends lost packets
Wi-Fi Wireless Fidelity UDP User Datagram Protocol HTTPS Hyper Text Transfer Protocol Secure
A protocol that determines how two Maintains an open connection between Same as above but the communications
devices communicate with each other users on the network, often used in between the web server and browser are
wirelessly online gaming sessions encrypted
Ethernet A protocol that determines how two Router A networking device that forwards data Network Two or more computers connected together for
wired devices communicate with each packets between computer networks. the purpose of sharing resources
other.

Bus TCP/IP Model Star


Adware Analyses which internet sites a user visits and then presents adverts for products which the user is likely to be
interested in. Sometimes integrated into free software so that the developer can recoup some costs.
Social Engineering Is the art of manipulating people so they give up personal/confidential information
Viruses Self-replicating piece of software attached itself to another program/file. If the program /file isn’t accessed in any
way, then the virus won’t run and won’t copy itself
Pharming Redirecting web traffic to fake websites that have been designed to look authentic to gain personal information.
Shouldering Directly observing someone enter personal details e.g. PIN number, password.
Year: 9 Blagging Obtaining personal information by pretending that you need it for a specific purpose like a colleague’s password.
Topic: Impact of digital Encryption Mathematically converts data into a form that is unreadable without a key.
technology on society, Malware A term used to refer to a variety of forms of hostile or intrusive software.
Cyber Security Phishing Emails designed to steal personal details / money / identity.
Spyware Software that gathers information about a person or organisation without their knowledge
Core Texts Biometrics Uses your body as a ‘password’: fingerprint, iris, retina, facial, voice.
AQA Computer Science, Alison Misconfigured Important that users only have access rights to files and systems that they need to.
Page, 2013 access rights
MAC address Every computing device has a unique MAC address; you can use this to filter what devices are allowed on your
AQA Computer Science, Filtering network.
Robson & Heathcote, 2016 Trojans Masquerades as having a legitimate purpose but actually has another. Normally spread via email. Trojans can be
programmed to carry out a variety of malicious activities.
CAPTCHA Completely Automated Public Turing Test To Tell Computers and Humans Apart: A picture or piece of text is
displayed on screen that is indecipherable by text recognition software
Authentication The process or action of verifying the identity of a user or process.
Penetration Testing a network/program for vulnerabilities.
testing: Black Box Black: very little or no information is given to the tester. White Box: Basic access may be granted
/ White Box
Automatic Allows any vulnerability that has been discovered in the program to be patched by the developers. Outdated
Software Updates software can be an easier target for those wish to gain unauthorised access

Legislation: Ethical & Cultural issues Legal issues


1. Copyright Designs and patents act 1988: Privacy Cyber Security
Designed to protect creators of books, music, video, software from having their work illegally copied Social Media Patent
2. GDPR 2018: Employment Copyright
(General Data Protection Regulation – replaces the Data Protection Act 1998 on the 25th May 2018) Globalisation Software Licences
How data should be stored/accessed and how the user should be protected from any business or institution that
stores data about them.
3. Computer Misuse Act 1990: Environmental issues
Introduced three new criminal offences, all require the use of a computer. (Hacking) Health
Unauthorised access to computer material, unauthorised access to commit a crime. Unauthorised modification Energy Use
of computer material. Resources
Computer Waste
Key Words:
Denary (Base 10) Our number system, 10 numbers, 0-9 ASCII Charcter set 7 bit = 128 characters
Binary (Base 2) Bi = 2 , only two numbers 0 & 1 Extended ASCII 8 bit = 256 characters
Hexadecimal (Base 16) Hex = 6 Decimal = 10, 16 numbers, 0-9 & A-F Unicode Between 8 bit and 32 bit

Year: 9 Denary to Binary


Topic: Data Representation 27 26 25 24 23 22 21 20
128 64 32 16 8 4 2 1
(P) Practical
(T) Theory
(3) Denotes number of lessons Draw the grid; take the number you need to convert and find the largest number from the grid that will go into your original. Take that number away
from your original leaving you with a remainder. Find the next number along the column that goes into your remainder. Every time you can put a
number into your original or remainder you place a 1 in that column, if you can’t place the number in you place a 0. Once you have a remainder of zero
Lesson Sequence you have completed your binary conversion, if you have any columns left to fill place a 0 in them.
(T) Data Representation (4)
Binary to Denary
Draw the grid; place your binary number from right to left into your grid. For every column where you have a 1 from your binary number then add the
Key Assessment denary value to all the 1’s and you will have your number.
3. Data Representation
Binary to Hexadecimal
0123456789ABCDEF A =10 B=11 C=12 D=13 E=14 F=15
8 4 2 1 8 4 2 1
1 0 0 1 1 1 0 0
8 + 1 = 9 which equals 9 in hex 8+4 =12 which equals ‘C’ in Hex This binary number = 9C

Draw the grid; label each section of four numbers 1,2,4,8 from right to left. Place your binary number in the grid (from right to left) add up the values
where there is a 1 present and convert that section into its corresponding hexadecimal number

Hexadecimal to Binary
Draw the grid; place your hex value above a block of four empty cells, work out what your value is in denary and then using each block of four make
that number out of 1,2,4,8. Once you have placed 1’s in the blocks that make up your number you will have converted it to a binary number

Denary to Hexadecimal
Core Texts Take your number, if it is under 16 then just replace the number with its hex equivalent. If it is under 256 then divide the number by 16. Round down
AQA Computer Science, Alison the answer, this will be your first hex digit. Take that answer and multiply by 16 and subtract from the original number to get your remainder. This can
Page, 2013 then be converted to its hex equivalent. Example: 183, under 256 so divide by 16 = 11.423 round down to 11 this is your first digit = B. 11*16 = 176
subtract from 183 gives your remainder = 7. 183 is therefore B7.
AQA Computer Science,
Robson & Heathcote, 2016 Hexadecimal to Denary
Take your hex number. If you have 2 digits then take the left hand digit and multiply by 16. Take the 2 nd digit and add that on to your first answer.
http://www.Visualstudio.com Example CA: C = 12, 12 * 16 = 192. A = 10, 192+10 = 202
(free software download)
Key Words:
Form A software window that holds Object An item in the window e.g. Property A characteristic of an object e.g
objects button / text box / label size / font
Debug Check the program for errors and Event driven Programs that react to external Validation Checking data that has inputted
correct them programming events such as user inputs based upon a series of rules
IDE Integrated Development Constant A name area of storage where Variable A named area of storage that can
Year: 9 Environment e.g. Visual Studio the value does not change hold different values
Syntax A mistake in the program that breaks Runtime A mistake in the program that Logic Error A mistake that does not prevent
Term: 1a
Error the rules of the computer language Error prevents the computer from the program from running but
Topic: VB.Net running the machine code produces unexpected results e.g.
1+1=3
(P) Practical
Topic: Scope Where the program can recognise Arithmetic +(add) / (divide) Verification Double checking data inputted to
(T) Theory where the constant or variable is operator * (Multiply) ensure errors are not included
(3) Denotes number of lessons located in the code – (Subtract)

Lesson Sequence
(P) Introduction to VB.Net (2)
End Ends the App
(P) My First Program (2)
lblMessage.Visible = True Shows the Label lblMessage
(P) VB Evidence / Code List lblMessage.Visible = False Hides the Label lblMessage
(P) Constants / Variables (2) Const UserName As String = "Mr Hicks" Defines a constant called UserName
(P) Data Types (2) lblMessage.Text = "Greetings " & UserName What text should the label lblMessage contain
(P) Arithmetic Operators (2) MsgBox("Goodbye " & UserName) Message box with the text Goodbye and the text contained in the constant
(P) If…Then….Else (3) UserName
(P) Key Assessment 2 (2) Const MyAddress As String = "Ebbsfleet Academy" & Sends the text onto a new line within the label lblMyAddress. MyAddress is
(T) Data Representation (4) vbNewLine & "Southfleet road" the constant
Dim UserName As String Declare a variable called UserName
UserName = InputBox("Enter Your Name") Input box to appear with message
lblMessage.Text = "Your Name is " & UserName
Key Assessments Dim bill, tip, total As Decimal Declare variables of a different data type
1, VB.Net Dim tipamount As Integer
(Work assessed to date) FirstName = txtFirstName.Text Assign value to a variable
2. VB.Net practical task Surname = txtSurname.Text
tip = bill * tipamount / 100 Assigns value to a variable and carries out calculation and assigns total to a
total = tip + bill label
Core Texts lblTip.Text = "The amount of the tip is £" & Str(tip)
AQA Computer Science, Alison If NumberSold < 0 Then Using an if…Then statement with relational operator and msg box alert
Page, 2013 MsgBox("Error: Number sold cannot be a
negative value.")
End If
AQA Computer Science, If IsNumeric(txtNumberSold.Text) Then If….then…. else statement using msg box alert
Robson & Heathcote, 2016 NumberSold = txtNumberSold.Text
Else
http://www.Visualstudio.com MsgBox("Error: Number sold must be a numeric
value")
(free software download)
End If
Key Words:
Primary Storage RAM & ROM Cloud Storage Dropbox / One drive /Google Drive
ROM Read only Memory Solid State Flash Memory includes solid state
drives /SD cards etc
RAM Random Access Memory Virtual Memory Uses part of secondary storage as
extra RAM
Year: 9 Magnetic Hard disk drive / Magnetic tape Optical CD / DVD / Blu-ray
Topic: Primary & Secondary BIOS Basic input output system
Storage

(P) Practical Primary Storage


(T) Theory
(3) Denotes number of lessons RAM is volatile – information is lost when the device loses power (the computer is switched off)
ROM is non-volatile – no new information can be written to ROM – contains BIOS information
Lesson Sequence
(T) Primary & Secondary Secondary storage is required so that data can be stored permanently
Storage (3)
Three main types: Magnetic, Optical, Solid State

All types have advantages and disadvantages


Optical – Read by a laser (reads the pits and lands on the surface of the disk
Magnetic – An arm places magnetic charges onto the platter (positive or negative)
SSD – Reads the electronic signals within microscopic transistors

Quantity Size Comment

1 kilobyte (kB) 1024 bytes Even a short typed document will use several kilobytes of
Core Texts memory.
AQA Computer Science, Alison
Page, 2013 1 megabyte (MB) 1024 kilobytes One digital photo may use several megabytes of memory,
depending on how large and detailed it is.
AQA Computer Science,
1 gigabyte (GB) 1024 megabytes Could hold a large collection of images and documents, 16 hours
Robson & Heathcote, 2016
of MP3 songs (1mb per minute)
http://www.Visualstudio.com 1 terabyte (TB) 1024 gigabytes 16500 hours of MP3 (690 days)
(free software download)

You might also like