Tuesday 10 February 2015

Hardware in Detail






Hardware in Detail

Teach-ICT.Com

http://www.teach-ict.com/gcse_computing/ocr/211_hardware_software/types_hw/miniweb/index.htm

Learning Objectives

To describe the hardware components used in a digital computer (desktop)
To understand that t computers are made up of millions of electronic components, changing state hundreds of millions of times a second. T
That these components are reliably processing data at phenomenal speeds.

Task 1 Hardware Components
We going to explore how the digital computer works and the first step is to identify the hardware components that make up a digital computer.
As a class we will watch watch these videos which identify the parts of a computer and describe their functions:
Activity
Find a diagram of a desktop computer which has been labelled and add to your notes
Task 2 Architecture
The ways in which these hardware components relate to each other in a computer is called the computer architecture. The choice of hardware components affects the computer’s speed and power, as well as how much the computer costs and how it can be used.
The CPU is connected to the other components by wiring known as buses. There are three types of buses:
Data bus
Transfers binary data from place to place
Control bus
Sends and receives signals that control the CPU and other components
Address bus
Which carries the binary address of memory locations

The data, address and control buses send electronic signals between the CPU and memory, and also to other devices such as the hard disk drive:
A  bus is either a cable or tracks in a printed circuit board. Get pupils to complete a diagram representing how the hardware components are connected using buses, and to summarise what the different buses do.
Activity 1
This diagram represents the way in which buses connect the main hardware components in a digital computer. Copy and complete the diagram using these labels:
·           CPU
·           Memory
·           Input/output devices
·           Data, control and address bus
 



  


Activity 2
From the function given, identify and insert the name of the correct bus.
Function
Type of bus
Sends and receives signals that control the CPU and other parts of the computer system

Carries the address of memory locations used to store data and program instructions

Transfers the binary data around the computer

Activity 3

Label the following on the picture of the Raspberry Pi:
·           SD card (memory)
·           CPU processor and RAM memory
·           Ethernet network connection
·           2 USB connectors (mouse and keyboard)
·           HDMI connector for monitor
·           Audio
·           Power supply





Input, Process and Output Model





Input Process Output Model
Definition
Ensure that you have a definition and diagram of the INPUT – PROCESS – OUTPUT model.  Remember a computer will always conform to this model.
Task 1
Write a Python program that asks the user to enter three numbers, adds up the numbers and displays the answer on the screen. Then in your notes, explain the program using the input-process-output model.
Brainstorm
The input-process-output model can be used to model computer systems. Let's  brainstorm other examples.

Homework:
Think of three digital apparatus or tasks that you commonly undertake using them and describe them using the IPO model.  This is normally carried out at KS3 and some responses are quite strange.  Your task as GCSE students is to this very scientific and detailed.

Examples:
Phone call
Washing Machine
Bread Maker

Toothbrush 

The Central Processing Unit


Central Processing Unit (CPU) or (Microprocessor)

Learning Objectives

You will learn to:
·         Describe the purpose of the CPU
·         Describe the function of the CPU as fetching, decoding and executing instructions
·         Describe how common characteristics of CPU’s such as clock speed, cache size and number of cores affect performance.

Teach-ICT.com Link

Task 1 Definition
In your note book/electronic notes describe a CPU.  Make sure that you include the following:
All computers contain a processor (PC, mobile phone, tablet, Raspberry Pi, etc.) http://en.wikipedia.org/wiki/File:Intel_80486DX2_bottom.jpg
The CPU has lots of “legs” to provide connections to the rest of the computer and they often have a heat sink to remove the excess heat.  Why do CPUs get hot?
That processors are made of transistors. A transistor is an on/off switch controlled by an electric signal.
That inside the CPU there is a silicon sheet containing thousands of transistors.

Task 2 Manufacture
The manufacture of CPUs is a fascinating process involving photographic etching on a wafer of silicon. Manufacture of CPUs is not part of the specification but, is worthwhile watching the following videos:

Task 3 Clock Speed
You need a definition of clock speed.

The clock speed of a CPU is how fast the transistors are switched. The faster the clock speed the faster the computer can perform calculations.
Show the Royal Institution lecture ‘Breaking the speed limit’ which demonstrates just how fast computers are:
It is the processor clock that sends out a pulse at regular intervals. The clock speed is measured in frequency (cycles per second) using the units hertz.
One hertz is one cycle per second. CPUs are so fast they are measured gigahertz (GHz). A 2 GHz clock sends out 2 billion pulses per second. Explain that at each clock pulse an instruction is executed in a CPU.

Activity


Draw the “ON” and “OFF” sequence showing the clock cycles:




Task 4 Transistors

The number of transistors on CPUs has been increasing: http://en.wikipedia.org/wiki/Transistor_count.
That more transistors closer together mean that more calculations can be performed more quickly.
Point out that the switching of transistors generates heat. To help pupils understand how, run an unplugged whole class activity.
Activity
Your teacher will run this activity. The instructions are here for information only.
Resources
·           A class of pupils
·           A room such as a hall or an open space
·           On/off card

Explain that the class is going to act out the role of transistors in a CPU. When they are on they stand up (show ON) and when they are off they sit down (show OFF). (This works best if they are on the floor not on seats).
The pupils should stand apart from each other (stretch arms out so they cannot touch each other). Show the ON and OFF cards slowly to start with, then speed up. Ask how warm the class is feeling (they should be getting warmer just like a CPU).
Then explain that more and more transistors are being placed closer together to make computers faster and able to perform more calculations.
Get the class to stand closer to each other. Then repeat the process getting faster and faster. Ask how warm the class is feeling now.
This demonstrates how CPUs generate heat from the switching of thousands of transistors.
Task 5 Transistors

 Watch all of the Royal Institution lecture ‘Breaking the speed limit’: http://www.youtube.com/watch?v=FTpdAjre8LU and then answer the following  questions. (

1.     What is a semi-conductor?
2.     What is a transistor?
3.     Why are “bunny suits” used when manufacturing microprocessors?
4.     What is meant by parallel processing?







T4 Progress Test




A link to your progress test will be available below after the half-term holiday.  You are to copy the document over to which you will have been given editing rights.  You will have 45 minutes to complete the test electronically and post back to the blog for marking and feedback.  There will be 5 questions worth 30 marks


Click HERE for T4 progress test.


Revision

Over half-term make sure that you revise the following:

Data compression
  • Lossy compression
  • Caesar cipher algorithm
  • Binary digits and bitmap images
  • Flow charts
  • Variables
  • Binary counting

Friday 6 February 2015

February Python Challenge






1. Using the code below recreate the Caesar Cipher in Python
2. Add comments describing what each section does.
3. Test the cipher to ensure that it is working
4. Report your results in a word processed document with the following headings:


Introduction

-State user requirements for the Caesar cipher

Annotated Code

Output


N.B. You may use your own code if you wish but needs to have the same user requirements as the one below.  You may need to look at this code to work them out

DEADLINE MARCH 10th

def caesar_cipher(message, key, action):
    letters = ['A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z',
                 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z',
                '1', '2', '3', '4', '5', '6', '7', '8', '9']
    
    number_in_list = len(letters)
    output_message = ""
    for next_character in message:
        in_list = False
        i = 0
        while i < number_in_list:
            new_position = 0
            if next_character == letters[i]:
                in_list = True
                # What happens next determined by value of action.
                if action == 'E':
                    new_position = i + key
                else:
                    new_position = i - key                   
                if new_position >= number_in_list:
                    new_position -= number_in_list
                output_char = letters[new_position]
            i += 1
        if in_list:
             output_message += output_char
        else:
            output_message += next_character
    return output_message

   
#Main program
print("CAESAR CIPHER")
print("")
print("OPTIONS")
print("")
flag = True
while flag:
    print("")
    print("1. Encrypt a message")
    print("2. Decrypt a message")
    print("3. Exit the program")
    answer = input("Please select an option. ")
    if answer == "1":
        message = input("Enter the message you want to encrypt: ")
        key = input("Enter the key: ")
        action = "E"
        print("The encoded message is: ")
        print(caesar_cipher(message, int(key), action))
    elif answer == "2":
        message = input("Enter the message you want to decrypt: ")
        key = input("Enter the key: ")
        action = "D"
        print("The decoded message is: "),
        print(caesar_cipher(message, int(key), action))
    elif answer =="3":
        flag = False

print("Good bye")


























6th February

ctivity 2
Answer these questions to summarise what you have learned in this lesson.
What is a digital computer?




Define computer hardware.



Give an example of computer hardware.

Define computer software.



Give an example of computer software.


Activity 3
·           Write a computer program in Python that asks the user to type in three numbers, adds them up and then displays the answer on the screen.
·           Explain your program using the input-process-output model.



 Activity 4
Select two actions you complete regularly and describe them in terms of the input-process-output model.
Examples could be:
·           Running a mobile phone app
·           Uploading an image to a social networking profile











 Activity 2
Answer these questions to summarise what you have learned in this lesson.
What is a digital computer?




Define computer hardware.



Give an example of computer hardware.

Define computer software.



Give an example of computer software.


Activity 3
·           Write a computer program in Python that asks the user to type in three numbers, adds them up and then displays the answer on the screen.
·           Explain your program using the input-process-output model.

INPUT
  PROCESS  
OUTPUT




Activity 4
Select two actions you complete regularly and describe them in terms of the input-process-output model.
Examples could be:
·           Running a mobile phone app
·           Uploading an image to a social networking profile


INPUT 

PROCESS  
OUTPUT