Presentation on theme: "Computer Memory and Data Transfer"— Presentation transcript:
1Computer Memory and Data Transfer Computer StudiesComputer Memory and Data Transfer
2Computer Studies Hardware A General Overview What is a computer? A computer is a machine that processes data and produces information.How does it function?Before it can do anything, programs must be installed to give the computer the instructions on how to process the information.This is done using an input device.What happens then?When the computer is finished processing, it produces results.This is shown through an output device.
5Computer Studies Organisation of Data KILOBYTE 1024 bytes The main memory of a computer is used to store programs and data. The memory size is measured in kilobytes, megabytes, or gigabytes.KILOBYTE bytesMEGABYTE x 1024 bytesGIGABYTES x 1024 x 1024 bytesDifferent types of MemoryROM Once programmed it cannot be erasedEPROM Can be erased by exposure to UV light.EAPROM Can be partially programmed or ‘flashed’which changes the original coding.
6Computer Studies Organisation of Data Data is organised in a number of different units of storage.BIT the smallest unit of storage can store a 0 or 1BYTE a collection of 8 bitsNIBBLE a group of 4 bits or half the length of a byteWORD a group of bits stored by the computer as a single unit – usually multiples of 8 bits.A 16 bit computer will work with words 16 bits long.Most modern computers will work with words 32 bits long or higher.
7Computer Studies Hardware – data organisation Word Length A group of bits that can be transferred and manipulated as a single unit by the CPU.The amount of bits the CPU can send or receive at once.An 8 bit CPU will send or receive 8 bits of data.A 16 bit CPU will send or receive 16 bits of data.A computer with an 800 mhtz which has a word length of 2 bytes (16 bit) is twice as fast as the same processor with 8 bit data transfer rate so it performs functions in half the time.
8Computer Studies Hardware The Data and Address Bus - A series of copper strips that act as highways along which data travels between the CPU, Memory, and peripherals.Anything that requires the transfer of data is connected to the bus.It is the method by which information moves across the computer system:Data Bus:It’s width determines the amount ofinformation that can be transferred.Address Bus:Travels with the data along the bus.
9Computer Studies Hardware – General Overview The Data and Address Bus act like a letter. The address part is the envelope, and the data section consists of the letter The address bus helps the computer find the correct location – and deliver the information inside the envelope.They travel together.
10Computer Studies The Basic Computer Central Memory - WHAT DOES RAM DO?Central Memory -Made up of two main parts:Random Access MemoryRead Only MemoryRAMIt is the working ‘desk’ of the computer.Programs run in RAM.Used for temporary storage of Data and programs.It is volatile – information is lost when power is lost.Because of this backing storage is needed.
11Computer Studies The Basic Computer Central Memory - WHAT DOES ROM DO? Made up of two main parts:Random Access MemoryRead Only MemoryWHAT DOES ROM DO?ROMStores data required permanently.Programs run in RAM.Instructions are normally encoded during the manufacture of the chip.The contents cannot be changed.Because of this backing the Rom normally contains the booting instructions needed to start the computer.
12Computer Studies The Basic Computer Storage WHAT DOES BACKING STORAGE DO?Backing StorageMuch higher Capacity than RAM or ROM.Stores data for a permanent period.Different forms such as:Hard DisksMagnetic TapeFloppy DisksCD Roms.
13Computer Studies Hardware – The CPU Machine Code - Assembly Language The CPU only understands machine code – binary digits – a series of 0’s and 1’s.An ‘instruction set’ is a group of instructions understood by the CPU.Different generations of CPU’s have their own instruction sets.Assembly LanguageA separate programming language called ‘assembly language’ was created which is easier to understand.These are called ‘low level languages.Programmers need to learn these languages before they can program a computer.Uses abbreviated words to give the computer commands - Mnemonics
14Computer Studies Hardware - The CPU CPU - Made up of two main parts: Arithmetic Logic UnitControl UnitALUPerforms mathematical calculationsCUManages and controls all movements to and from all peripherals to the CPU
15Computer Studies Hardware - Speed The CPU Speed Depends on the internal clock of the CPU?Sometimes referred to as ‘clock speed’Measured in MHz or MIPS (millions of instructions per second).Hertz is one cycle per secondMHz is one million cycles per second(megahertz)MIPs are millions of instructions per secondToday’s computers operate at millions of cycles per second (e.g.. Pentium IV – 266)There are other factors that effect the computer’s speed.
16Computer Studies Hardware - Speed The Cache A type of very fast Memory It can be part of the CPU or it can be external – e.g.. Placed on the motherboard near the CPU.Used to carry out calculations and repetitive actions.These are then passed back to the CPU.Cache allows the CPU to perform other functions at the same time.Different sizes of cache: 128k, 256k, 512k.
17Computer Studies Hardware - The CPU Control Unit - The manager of the computer. It’s primary functions are:Carry out the instructions stored in memoryContains theInstruction registerStores a copy of the current instruction that is being processed.Program counterStores the location of the next instruction to be executed.
18Computer Studies Hardware Arithmetic Unit - Two main sections: The Accumulator:Stores the current results of a calculationThe Shift Register:Moves it’s contents one or more positions to the right or left in order to carry out arithmetic operations.
19Computer Studies Hardware – The CPU Arithmetic Unit - The calculator of the computer. It’s primary functions are:Carries out the instructions that require mathematical calculationsCarries out Mathematical Functions:Addition, Subtraction, Multiplication and DivisionGreater than>, Less than<, Equal to=Greater than or equal to>=, Less than or equal to<=,Not equal to<>,The three logical Functions:NOTANDOR
21Computer Studies Fetch Execute Cycle A) Set the value of the program to the address of the 1st instruction.B) Fetch the instruction from the location specified by the program counter.C) Store a copy of this instruction in the instruction register.D) Increment the program counter by 1.E) EXECUTE the instruction:Fetch any data required by the instructionPlace it in storage locations within the ALU called Data Registers.Activate the correct circuits for the instruction to be carried out.Move any results from the data registers back to main memory.F) Repeat process from step B.
23Computer Studies Sample Machine / Assembly (Programming) Code 0000 END Stop the Execution of a program0001 ADD Add the contents of the memory location to the accumulator.0010 SUB Subtract the contents of the memory location to the accumulator0011 MULT Multiply the contents of the ML to the accumulator0100 DIV Divide the contents of the ML into the accumulator0101 LDA Copy the contents of the ML into the accumulator0110 STO Copy the contents of the Accumulator to the ML0111 IN Input from Input Unit to the ML1000 OUT Output Contents of the ML to the Output Unit1001 JMP Transfer control to the Instruction in a Named Location.1010 JNZ Jump (skip) if contents of the accumulator is not zero
24Computer StudiesA simple program to add two numbers input from the keyboard100 IN Accept a number from the KB and store it in ML 100101 IN Accept a number from the KB and store it in ML 101100 LDA Load the number stored in ML 100 in to the accumulator101 ADD Add the number stored in ML 101 into the accumulator102 STO Store the value currently in the accumulator into ML 102102 OUT Output the value stored in ML 102 into an output device
25Computer StudiesA simple program to add two numbers input from the keyboard100 IN Accept a number from the KB and store it in ML 100101 IN Accept a number from the KB and store it in ML 101100 LDA Load the number stored in ML 100 in to the accumulator101 ADD Add the number stored in ML 101 into the accumulator102 STO Store the value currently in the accumulator into ML 102102 OUT Output the value stored in ML 102 into an output device
26Computer Studies Peripherals Input and Output devices The computer receives instructions from the input peripherals.Displays results on the output peripherals.Holds information on secondary storage peripherals.