2.1.2 Describe primary memory.

Distinguish between random access memory (RAM) and read-only memory (ROM), and their use in primary memory

  • Registers are the fastest form of memory, accessible every single clock cycle (that is, a 2.0 GHz processor can access registers two billion times a second). They are also the smallest, usually only containing the inputs and outputs for the current calculation.
  • There are then various levels of cache (L1, L2, etc.) that are increasingly slower and, on the flipside, increasingly larger and less expensive. This cache is located in a hierarchy: data that is needed immediately will be moved from the registers to L1 cache, for example; slightly less necessary data will be in L2, then L3, etc.
  • The next major part of the memory hierarchy is main memory, that is system RAM. While the amount of cache is dependent on the processor model, the amount of memory is up to the overall system builder. This memory is massively slower than cache, but it is also massively larger and far less expensive.
  • The last part of the memory hierarchy, at least on a single computer, is permanent storage — the hard drive. Solid-state drives (SSDs) have made a huge difference in speed here, but even then permanent memory is massively slower than main memory,
  • While not part of the traditional memory hierarchy, cloud applications often have permanent memory on a separate physical server on the same network; the usual trade offs apply — very slow access in exchange for other benefits, in this case keeping data separate from its application.

2.1.3   Explain the use of cache memory.

An important concept related to processor speed is keeping data flowing into the processor. Registers are a type of high-speed memory storage inside the processor. They are used to temporarily hold calculations, data, or instructions. The data or instruction the CPU needs to operate on is usually found in one of three places: cache memory, the motherboard memory (main memory), or the hard drive.

Students should be able to explain the effect of cache memory in speeding up the system as well as being able to explain how it is used.

Cache memory is a very fast type of memory designed to increase the speed of processor operations. CPU efficiency is increased when data continuously flows into the CPU. Cache provides the fastest access. If the information is not in cache, the processor looks for the data in motherboard RAM. If the information is not there, it is retrieved from the hard drive and placed into the motherboard memory or the cache. Hard drive access is the slowest of the three. Table 3.2 lists the types of cache.

TABLE 3.2 Types of cache

Type

Explanation

L1 cache

Cache memory integrated into the processor

L2 cache

Cache in the processor packaging, but not part of the CPU; also called on-die cache

L3 cache

Usually found in the more powerful processors and can be located in the CPU housing (on-die) or on the motherboard

An analogy best explains this. Consider a glass of cold lemonade, a pitcher of lemonade, and a can of frozen lemonade concentrate. If you were thirsty, you would drink from the glass because it is the fastest and most easily accessible. If the glass were empty, you would pour lemonade from the pitcher to refill the glass. If the pitcher were empty, you would go to the freezer to get the frozen concentrate to make more lemonade.

Usually, the more cache memory a system has, the better that system performs, but this is not always true. System performance also depends on the efficiency of the cache controller (the chip that manages the cache memory), the system design, the amount of available hard drive space, and the speed of the processor. When determining memory requirements, you must consider the operating system used, applications used, and hardware installed. The Windows XP operating system takes a lot less memory than Windows 10. High-end games and desktop publishing take more RAM than word processing. Free hard drive space and video memory are often as important as RAM in improving a computer’s performance. Memory is only one piece of the puzzle. All of the computer’s parts must work together to provide efficient system performance.

That infinite space “between” what we humans feel as time is where computers spend all their time. It’s an entirely different timescale. The book Systems Performance: Enterprise and the Cloud has a great table that illustrates just how enormous these time differentials are. Just translate computer time into arbitrary seconds:

1 CPU cycle0.3 ns1 s
Level 1 cache access0.9 ns3 s
Level 2 cache access2.8 ns9 s
Level 3 cache access12.9 ns43 s
Main memory access120 ns6 min
Solid-state disk I/O50-150 μs2-6 days
Rotational disk I/O1-10 ms1-12 months
Internet: SF to NYC40 ms4 years

The late, great Jim Gray…also had an interesting way of explaining this. If the CPU registers are how long it takes you to fetch data from your brain, then going to disk is the equivalent of fetching data from Pluto.


2.1.1 Outline the architecture of the central processing unit 

Students should be able to reproduce a block diagram showing the relationship between the elements of the CPU, input and output and storage. The memory address register (MAR) and memory data register (MDR) are the only ones that need to be included.


2.1.4 Explain the machine instruction cycle.

This should include the role of data bus and address bus.

Simple Layout of Fetch-Execute Cycle

ALU: The part of the CPU that will process the arithmetic and logical functions in data.

Control Unit: Will check that the ALU, MAR, and MDR are performing their functions properly. Memory Address Register: Connected to the address bus, this is how the CPU communicates with the address bus. The MAR either holds an instruction address or a data address 


Memory Data Register: The MDR is used to temporarily store data read from or written to memory. All transfers that happen from the memory to the CPU go through the MDR. Loads data from data bus (reading data) or one of the CPU registers (storing data).
Buses: High speed data transfer between the different areas of a computer.

Components of the Von Neumann Model:
Component
 Task
Memory
 Storage of data/programs
Processing unit  
 Computation/processing of data
Input
 Information on the computer
Output
 Getting information into the computer
Control Unit
 Ensures all parts perform tasks together 

The following two registers enable communication between the memory and processing unit

Memory Address Register: MAR
  • MAR is connected to the address bus
  • MAR is how the CPU communicates with the address bus
  • MAR can hold either an instruction address or a data address
Memory Data Register: MDR
  • MDR is connected to the data bus
  • Data can go in both to and from memory
  • MDR can load its data from:
    • the data bus (for reading data)
    • one of the CPU registers (for storing data)
  • Operation :  Fetch Decode Execute Store



    The instruction that the CPU fetches from memory is used to determine what the CPU is to do. In the decode step, the instruction is broken up into parts that have significance to other portions of the CPU. The way in which the numerical instruction value is interpreted is defined by the CPU's instruction set architecture.

    Often, one group of numbers in the instruction, called the op code, indicates which operation to perform.
    The remaining parts of the number usually provide information required for that instruction, such as operands for an addition operation.

    After the fetch and decode steps, the execute step is performed. During this step, various portions of the CPU are connected so they can perform the desired operation. If, for instance, an addition operation was requested, the arithmetic logic unit (ALU) will be connected to a set of inputs and a set of outputs.

    The final step, write back, simply "writes back" the results of the execute step to some form of memory.


    Question Section

    (a) Outline the function of the control unit [2 marks]

    (b) Describe how the size of the registers is related to the size of primary memory. [2 marks]

    Describe a disadvantage of the use of virtual memory. [2 marks]

    Use this resource click here

     2.1.5 Identify the need for persistent storage.

    Persistent storage is needed to store data in a non-volatile device during and after the running of a program.

    2.1.6 Describe the main functions of an operating system.

    This is confined to a single-user operating system. Technical details are not needed. For example, memory management should be described but how this is handled in a multitasking environment is not expected.

    Figure 1: The Operating System in a Hierarchy

    2.1.7 Outline the use of a range of application software.

    Application software should include word processors, spreadsheets, database management systems, email, web browsers, computer aided design (CAD) and graphic processing software.

    Applications are programs written to carry out a specific task or set of tasks, for example: word processorsspreadsheets, accounting packages, media players and games.

    Types of applications software

    Applications come in several different types:

    • Utility programs - examples include virus scannersdisk defragmentersand backup utilities.
    • Generic - general purpose software that is not written for any particular type of business. Examples of this include word processors and spreadsheets.
    • Integrated - a collection of software that has a common set of commands/icons. Usually they include word processors, spreadsheets and graphics software, but they can contain databases as well. They tend to be cheaper than purchasing each application separately.
    • Specific - software written for a defined purpose. Accountancy software is a good example of this that can be bought by anyone.
    • Bespoke - bespoke software is written when a company requires a piece of software to perform a very specific task or function and there's no existing software that does what they need. It can be very expensive.

    • Graphical User Interface (GUI) • Icons • Pointer • Windows • Menus • Toolbars – Button • Dialog Boxes • Spell checkers • Alignment • Font and Font Sizes • Tables • Reports

    2.1.8 Identify common features of applications.

    Including toolbars, menus, dialogue boxes, graphical user interface (GUI) components. Students should understand that some features are provided by the application software and some by the operating system.

    2.1.9 Define the terms: bit, byte, binary, denary/decimal, hexadecimal.

    2.1.10 Outline the way in which data is represented in the computer.

    To include strings, integers, characters and colours. This should include considering the space taken by data, for instance the relation between the hexadecimal representation of colours and the number of colours available

    Comparing the number of characters needed in the Latin alphabet with those in Arabic and Asian languages to understand the need for Unicode.

    Use this resource click here

    Computers are machines that do stuff with information. They let you view, listen, create, and edit information in documents, images, videos, sound, spreadsheets and databases. They let you play games in simulated worlds that don’t really exist except as information inside the computer’s memory and displayed on the screen. They let you compute and calculate with numerical information; they let you send and receive information over networks. Fundamental to all of this is that the computer has to represent that information in some way inside the computer’s memory, as well as storing it on disk or sending it over a network.

    To make computers easier to build and keep them reliable, everything is represented using just two values. You may have seen these two values represented as 0 and 1, but on a computer they are represented by anything that can be in two states. For example, in memory a low or high voltage is used to store each 0 or 1. On a magnetic disk it's stored with magnetism (whether a tiny spot on the disk is magnetised north or south).

    The idea that everything stored and transmitted in our digital world is stored using just two values might seem somewhat fantastic, but here's an exercise that will give you a little experience using just black and white cards to represent numbers. In the following interactive, click on the last card (on the right) to reveal that it has one dot on it. Now click on the previous card, which should have two dots on it. Before clicking on the next one, how many dots do you predict it will have? Carry on clicking on each card moving left, trying to guess how many dots each has.

    Click to load Binary Cards

    The challenge for you now is to find a way to have exactly 22 dots showing (the answer is in the spoiler below). Now try making up other numbers of dots, such as 11, 29 and 19. Is there any number that can't be represented? To test this, try counting up from 0.

    Spoiler Solution

    Spoiler: Solution to card puzzles

    You should have found that any number from 0 to 31 can be represented with 5 cards. Each of the numbers could be communicated using just two words: black and white. For example, 22 dots is "white, black, white, white, black". Or you could decode "black, black, white, white, white" to the number 7. This is the basis of data representation - anything that can have two different states can represent anything on a digital device.

    When we write what is stored in a computer on paper, we normally use “0” for one of the states, and “1” for the other state. For example, a piece of computer memory could have the following voltages:

    low low high low high high high high low high low low

    We could allocate “0” to “low”, and “1” to “high” and write this sequence down as:

    0 0 1 0 1 1 1 1 0 1 0 0

    While this notation is used extensively, and you may often hear the data being referred to as being “0’s and 1’s”, it is important to remember that a computer does not store 0’s and 1’s; it has no way of doing this. They are just using physical mechanisms such as high and low voltage, north or south polarity, and light or dark materials.

    Jargon Buster Bits

    Every file you save, every picture you make, every download, every digital recording, every web page is just a whole lot of bits. These binary digits are what make digital technology digital! And the nature of these digits unlock a powerful world of storing and sharing a wealth of information and entertainment.

    Computer scientists don't spend a lot of time reading bits themselves, but knowing how they are stored is really important because it affects the amount of space that data will use, the amount of time it takes to send the data to a friend (as data that takes more space takes longer to send!) and the quality of what is being stored. You may have come across things like "24-bit colour", "128-bit encryption", "32-bit IPv4 addresses" or "8-bit ASCII". Understanding what the bits are doing enables you to work out how much space will be required to get high-quality colour, hard-to-crack secret codes, a unique ID for every device in the world, or text that uses more characters than the usual English alphabet.

    This chapter is about some of the different methods that computers use to code different kinds of information in patterns of these bits, and how this affects the cost and quality of what we do on the computer, or even if something is feasible at all.


    2.1.12 Construct truth tables using the above operators.

    For example, Maria won’t go to school if it is cold and raining or she has not done her homework. Not more than three inputs are used.


    2.1.13 Construct a logic diagram using AND, OR, NOT, NAND, NOR and XOR gates

    Challenge 1  Logic Operators

    Translate the the following logical expression into both a Truth Table 

    (a OR b) AND ( a NAND b) 

    Q1 Identify a single logical operator  that is the equivalent 

    Q2 Create truth tables for the following sets of Boolean logic

    Precedence  NOT=high AND medium OR low 

    •  a AND b OR c    (a AND b) or c
    • NOT a AND b OR c
    • a AND b NOR c

    Challenge 2 logic gates

    Challenge 2  Logic Programming operators

    Problems will be limited to an output dependent on no more than three inputs. The gate should be written as a circle with the name of the gate inside it. For example: OR LINK Thinking logically

    Spend time changing the inputs to each gate, stop when you feel confident in what will happen based on the inputs for each gate ( practice  link below ) ( this may not work if not proceed to next step )

    Practice with Logic Gate Click Here


    2.1.11 Define the Boolean operators: AND, OR, NOT, NAND, NOR and XOR.

    Picture

    The Logic Gate can be expressed into X or Y.
    The YES = 1
    NO = 0

    For Example, a burglar came into the house and the alarm will go off EITHER WAY IF the door is open OR the window is smashed. 
    This can be constructed into a truth table;

    Picture

    Where X = The door is open
    and Y = The window is smashed.

    You can see that if one of the X Y is 1 (YES), the Alarm will go off. If 0 for both X and Y, the alarm will not go off.

    Define the boolean operators: (remember that everything has 2 Inputs, except the NOT boolean operator. They all have 1 output as well, just different possibilities of combinations.)

    1. AND
    • 2 Inputs, therefore 2^2 = 4 Possible Combinations
    • Output is TRUE if only BOTH of the Inputs are TRUE
    • Represented in a Semi Circle facing Right.
    2. NAND - NOT AND (Opposite of AND)
    • Diagram is same as AND but a bubble at the end 
    • When both Inputs are TRUE, the output is FALSE

    3. NOT (inverter)
    • Inverter (put things the opposite way) always has an INPUT and OUTPUT
    • If the Input is 1, Output is 0
    • If the Input is 0, Output is 1
    • Number of possible combinations equal to 2 to the power of Input.
    • Represented with a Triangle.


    4. OR
    • Same to the example stated above, if EITHER one is TRUE, output is TRUE.
    • Represented with a Triangle but with curvy edges on the side


    5. NOR
    • Opposite to OR. If either one is true, output is false.
    • Same diagram as OR but bubble at the end

    6. XOR (Exclusive OR)
    • If one of the other Input is TRUE, output is TRUE
    • If TWO input is TRUE, output is FALSE
    • A comparer
    • Represented the same as OR but with another line before input



    7. XNOR (Not Exclusive OR)
    • Invert of XOR. Complete Opposite
    • Same diagram as XOR, but a bubble at the output
    When solving a problem, the gates should be written as a circle with the name of the gate inside it.

    Enter your text here...

    Study guides and other resources

    Great concise resource for revision with lots of images click here

    Revision

    CPU ( Central Processing Unit)

    Clock


    ALU ( arithmetic Logic Unit )

    Control Unit

    Bus

    Cores






    Von Neumann Model


    Hardware Memory

    Primary

    Secondary

    Processed by CPU

    Long Term Storage

    Cache

    Optical

    RAM

    SSD

    ROM

    Magnetic ( typical Hard Drive)