Foundation Course for Advanced Computer Studies
204 pages
English

Vous pourrez modifier la taille du texte de cet ouvrage

Foundation Course for Advanced Computer Studies , livre ebook

-

Obtenez un accès à la bibliothèque pour le consulter en ligne
En savoir plus
204 pages
English

Vous pourrez modifier la taille du texte de cet ouvrage

Obtenez un accès à la bibliothèque pour le consulter en ligne
En savoir plus

Description

In the modern world, computer systems are playing a greater and greater part in everyday life. From office work, to entertainment, to providing information, the personal computer is quickly becoming a more integral part of the home. However, most PC users have no idea how most of the parts which make up their computer work internally. I am one of those who find that the framework provided by the school curriculum in the United Kingdom is of great assistance in planning lessons and learning plans but the curriculum does not plan out the work for us. We therefore need to invest a lot of time and effort into developing schemes of work that will suit the people we are going to teach. For me, it is a fantastic opportunity to employ our imagination and creativity to make lessons useful and interesting for children of different abilities. It is why I wrote this book. This book is a foundation course for Advanced Computer Studies and designed as a blueprint to teach users with a basic knowledge of computer science. Computer science is a subject that combines the use of technology which is ICT (Information Communication Technology) and the creation of technology. To use ICT (the subject about how to use technology to communicate information) more effectively, we need to know how technology works. Computing or computer science will create a generation of young people able to work at the forefront of technology change. It is the umbrella term for the subject that comprises 3 elements: computer science, information technology and digital literacy. It is helpful to think of these as the foundations, applications and implications of digital technology. The new focus on computer science will provides a well-defined and rigorous academic discipline and a unique lens through which pupils can understand the world. Children must therefore be taught computing if they are to be ready for tomorrow technology challenges. Our ingenuity to invent new means of communicating with each other, our very human compulsion to communicate have driven the technological innovations of the past two centuries however still a lot remain to be done with the arrival of quantum computing. A more rigorous approach to computer science teaching will help compete across the full spectrum of digital industries. This can only be achieved by equipping ourselves with the foundation skills, knowledge and understanding of computing do the necessity to introduce “computational thinking” at school via the new national curriculum (programmes of study and targets), the 2014 national curriculum that introduces computing which will replace ICT.

Sujets

Informations

Publié par
Date de parution 13 novembre 2015
Nombre de lectures 18
EAN13 9782312039503
Langue English
Poids de l'ouvrage 4 Mo

Exrait

Franck Ismael Djédjé
Foundation Course for Advanced Computer Studies



























Learn tomorrow’s computer today

To project our self in the next generation of computers (quantum computers), in the next era of computing, it is important to understand how today’s computers (silicon-based computer) works.

A quantum computer is a computer design which uses the principles of quantum physics to increase the computational power beyond what is attainable by a traditional computer.




This book is a foundation course for Advanced Computer Studies and designed as a blueprint to teach users with a basic knowledge of computer science. Computer science is a subject that combines the use of technology which is ICT (Information Communication Technology) and the creation of technology. To use ICT (the subject about how to use technology to communicate information) more effectively, we need to know how technology works.





















© Les Éditions du Net, 2015
ISBN : 978-2-312-03950-3
Table of Contents

PC - Peripheral Devices
PC Internal Architecture, CPU & CPU Socket
Personal Microcomputer
The Processor Unit
Lesson 1
The Fetch Execute cycle & the Processor
Matrices and Digital Images
The components of the simplified processor
Lesson 2
The ‘fetch’ section of the instruction execution cycle
Lesson 3
The Fetch execute cycle - C programming language as example
What Are Pointers?
How to use Pointers?
NULL Pointers in C
Pointers and string
A variable's address vs a variable's value
Lesson 4
Logic gates
De Morgan’s Laws
Lesson 5
Binary Mathematics
Lesson 6
Binary number and transportation cables (USB and PS2 cables as example)
Lesson 7
Introduction to SSADM (Structured Systems Analysis and Design Method).
Lesson 8
Tree Diagrams
The tree Diagram, example of a search engine
The tree Diagram, in software testing
Lesson 9
Programming
Lesson 10
The atomic world
Lesson 11
The photovoltaic effect
Moore’s law (transistor as example)
Lesson 12
Introduction to a Personal Computer or PC
How to clean a PC (Personal Computer)?
Indexes
Index 1
Algorithm: adding and subtracting binary numbers using JavaScript
Algorithm: adding and subtracting binary numbers using Python
Index 2 (CPU and CPU fan)
Index 3 (exercises sheet)
Index 4 - from a DVD to a computer screen
Index 5 - Learn tomorrow’s computer today
Index 6 - Computer Programming Board Game
Livres du même auteur
PC - Peripheral Devices
Integrated Peripherals






Printer






Scanner


PC Internal Architecture, CPU & CPU Socket





Power Supply


Sound card



Video card

Memory card




Cooling fun

Central Processing Unit (CPU)







Personal Microcomputer Raspberry Pi

Raspberry Pi 3 is a micro-computer. It is a micro-motherboard of a PC (Personal Computer).

Raspbian is the Foundation’s official supported Operating System.
Noobs is an easy installer for Raspbian.



Raspberry Pi 3



The microcontroller

The microcontroller is an even micro-computer than the Raspberry Pi is. I can also be seen as a micro-motherboard of a PC (Personal Computer).


Good practices:

Turn off your PC, remove the power cable and the monitor cable, wear an antistatic wrist strap or ground yourself, and take the case off your PC.

IT IS IMPORTANT TO GET RID OF ANY STATIC ELECTRICITY BY TOUCHING THE POWER SUPPLY, BECAUSE YOU DON’T WANT TO HARM ANY OF YOUR COMPUTER’S INTERNAL COMPONENTS.





Microcontrollers




Microcontrollers are widely used in everyday items such as washing machines, remote controls, microwave ovens, mobile phones and vending machines. A modern car can contain around 40 of them. Several different types are commonly used in school electronics projects, including PICs, PICAXE and GENIE microcontrollers.
They are a type of IC and range in size from 8 to 40 pins. They can be programmed to respond to one or more inputs and to control one or more outputs. At their most simple,
they can be programmed to act as a series of logic gates.

Some microcontrollers also have the capability to accept and process analogue inputs, play ringtones and run parallel programs at the same time.

Advantages of using a microcontroller
size of a circuit can be reduced significantly - one microcontroller can replace several other ICs
allows greater flexibility - can be reprogrammed to change its function

Disadvantage of using a microcontroller
they are often more expensive than other ICs

Programming a microcontroller

Microcontrollers have different amounts of memory to hold the program that controls them. They read this program in a form called machine code. This looks like a long string of numbers and letters and is very difficult to understand. For this reason, their programs are normally written in other languages and converted into machine code using computer software.

In schools, programs are normally written on a computer as flowcharts, although sometimes a programming language called BASIC is used. The program might be transferred from the computer to the microcontroller in a number of different ways, depending upon the type of microcontroller used and the design of the circuit:
By placing the microcontroller into a piece of hardware known as a programmer. This is normally only used if the circuit includes an IC socket to allow the microcontroller to be easily removed and replaced.
Through a jack socket connected to the computer USB port.
Through a USB port connected to the computer USB port.
The Processor Unit
The CPU (Central Processing Unit) is the part of a computer system that is commonly referred to as the "brains" of a computer.
The CPU is responsible for interpreting and executing a sequence of stored instructions called a program ( commands from the computer’s hardware and software ) .
This program will take inputs from an input device, process the

input in some way and output the results to an output device .

CPUs are not only found in desktop or laptop computers, many electronic devices now rely on them for their operation. Mobile phones, DVD players and washing machines are examples of equipment that have a CPU.
Lesson 1
The Fetch Execute cycle & the Processor
The fetch cycle takes the address required from memory, stores it in the instruction register, and moves the program counter on one so that it points to the next instruction.



Briefly describe what happens in the fetch-execute cycle.
In the fetch phase an instruction is copied into the control unit and decoded.
In the execute phase the instruction is obeyed.






A simplified model processor
The diagram shows the basic processor, along with memory for storage of data and instructions.
The model processor is able to process one byte of data during the execution of one instruction – called an 8 bit processor.
A fetch-execute machine, which must perform the following: ‘pick out’ the correct memory location Fetch the instruction from that memory location Store the instruction temporarily ‘understand’ the instruction Repeat the sequence as long as there are instructions to be executed


The format of instructions

You are familiar with complex instruction in a high level language typically consisting form of assignment statements, control structures and selection structures. Below is an example in JavaScript.

<!DOCTYPE html>
…..<html>
…..….. <body>
…..…..….. <script>
…..…..…..….. cars =[ "BMW" , "Volvo" , "Saab" , "Ford" ];

…..…..…..….. for ( var i = 0 ; i < cars.length ; i ++)
…..…..…..…..….. {
…..…..…..…..…..….. document.write ( cars [ i ] + "<br>" );
…..…..…..…..….. }
…..…..….. </script>
…..….. </body>
…..</html>

Result:
BMW Volvo Saab Ford

Typical instructions from a high level language:
Enable the programmer to achieve large amounts processing using a few reserved words.
Have variable format and length.
At the processor level, instructions perform much more elementary operations such as addition or comparison of two values. The format and length of such instructions are much more uniform. When a high level language is compiled (translated into machine code that the processor can understand and execute), each line of the program can become many lines of machine code.





Example: The GW-BASIC programming language (one of most first-generation BASIC versions) is not a low level language but I like to use it to explain, to give an idea of that a low level language look like.

Below a GW-BASIC program

10 INPUT "What is your name: " ; U$
20 PRINT "Hello " ; U$
30 INPUT "How many stars do you want: " ; N
40 S$ = ""
50 FOR I = 1 TO N
60 S$ = S$ + "*"
70 NEXT I
80 PRINT S$
90 INPUT "Do you want more stars? " ; A$
100 IF LEN ( A$ ) = 0 THEN GOTO 90
110 A$ = LEFT$ ( A$ , 1 )
120 IF A$ = "Y" OR A$ = "y" THEN GOTO 30
130 PRINT "Goodbye " ; U$
140 END




What is your name: Mike
Hello Mike
How many stars do you want: 7
*******
Do you want more stars? yes
How many stars do you want: 3
***
Do you want more stars? no
Goodbye Mike

Below the above GW-BASIC program written in JavaScript

<!DOCTYPE html>
<html>
<head>
<script type = "text/javascript" >
function MAIN ()
{
var U = prompt ( "What is your name: " , "" );
document.write ( 'Hello ' + U + '<br>' );
do
{
var N = prompt ( "How many stars do you want: " , "" );
document.write ( '<br>' );
for ( var i = 0 ; i < N ; i ++)
document.write ( '*' );
var A = prompt ( "Do you want more stars? " , "" );
}
while ( ( A == "yes" ) || ( A == "y" ) || ( A == "YES" ) || ( A == "Y" ) );
document.write ( '<br>' );
document.write ( 'Goodbye ' + U + '<br>' );
}
</script>
</head>
<body onload = "MAIN();" >
</body>
</html>

Looking at the GW-BASIC programming language, we find it more or less structured like ‘Machine Language’.

The list of instructions are numbered and they are in order and
the instructions or are divided into 2 fields:


- The job that needs to be done ( opcode ) followed by
- The data that needs to be acted on ( operand ).

An opcode is short for 'Operation Code'. An opcode is a single instruction that can be executed by the CPU. The opcode specifies the operation that is to be performed. Example: add numbers or store data in a register.

Operands are manipulated by the opcode. The operand stores the data that is to be used or the register in which it can be found or has to be stored.

Example of Machine Language code for the above GW-BASIC and JavaScript programs

Instruction set


Instruction set number
Opcode
Operands
00001010
001 1
000101
00010100
010 0
001111
00011110
001 1
000000
00101000
101 0
001111
00110010
110 1
000110
00111100
111 0
000000
01000110
011 1
000001
01010000
110 1
000011
01011010
111 1
111111
01100100
001 0
100110
01101110
010 1
111000
01111000
001 0
000101
10000010
110 0
101011
10001100
011 0
001101
We use Hexadecimal instead of binary because It makes it easier for humans to read and understand it.



Matrices and Digital Images
The images you see on internet pages and the photos you take with your mobile phone are examples of digital images. It is possible to represent this kind of image using matrices. For example, the small image of Felix the Cat can be represented by a matrix whose elements are the numbers and . These numbers specify the color of each pixel (a pixel is the smallest graphical element of a matricidal image, which can take only one color at a time): the number indicates black, and the number indicates white. Digital images using only two colors are called binary images or boolean images. Below we got a matrix of pixels.









MATRIX OF PIXELS



MATRIX OF PIXELS

Color images , in turn, can be represented by three matrices. Each matrix specifies the amount of red, green and blue that makes up the image. This color system is known as RGB (There are many other color systems that are used depending on the application: CMYK (for printing), Y’IQ (for TV analog transmission in NTSC), etc). The elements of these matrices are integer numbers between and , and they determine the intensity of the pixel with respect to the color of the matrix. Thus, in the RGB system, it is possible to represent different colors.






Amount of red, green and blue
Red: 225, Green: 153, Blue: 153




Amount of red, green and blue
Red: 225, Green: 153, Blue: 225




Amount of red, green and blue
Red: 204, Green: 204, Blue: 0




COLOR IMAGE REPRESENTATED BY 3 MATRICES

CT (Computed Tomography) image, conventional X ray Image



The structure of machine code in the simplified processor
Each instruction consists of 2 bytes, an OP-CODE and OPERAND: Op-code: instruction name Operand: data or address



The first three bits represent the op-code and the final six bits represent the operand. The middle bit distinguishes between operands that are memory addresses and operands that are numbers. When the bit is set to '1', the operand represents a number.






Addressing modes
You might notice that some instructions use a # and others don't, you might even have an inkling as to what the difference is. Well here is the truth:

# = number
[no hash] = address

There are many types of codes addressing modes. But we only need to know 3, they are:
Addressing Mode
Symbol
Example
Description

Memory Location

LOAD 15
15 is treated as an address

Integer

LOAD #15
15 is treated as a number

Nothing

HALT
Some instruction don't need operands such as halting a program

The components of the simplified processor
There are 5 components in the simplified processor:
REGISTERS
BUSES
ARITHMETIC LOGIC UNIT
CONTROL UNIT
CLOCK


1) The Registers

A register is a unit which can store one word of data until is overwritten by another word. In the simplified processor, the word size is a byte.


DATA INPUT LINES

DATA OUTPUT LINES
Each bit of the byte is stored in a separate ‘cell’ – the processor manipulates the eight cells as a unit. From our work on logic gates, we know how a simple memory cell is built.
Each register is a storage element – we transfer data into them (a write operation), or out of them (a read operation) by using the data lines connected to the register.

Normal state


DATA INPUT LINES

DATA OUTPUT LINES


Inthe normal state, the register is ‘disconnected’ from both sets of wires.

A read operation:

Apply a “Read enable” control signal.
Information inside the register flows out onto the bus:




Apply a “Read enable” control signal

Note that when the word is carried away on the bus, the value remains inside the register.

Types of registers in CPU
Many different types of registers are common between most microprocessor designs. These are:
In a computer's central processing unit (CPU), an accumulator is a register in which intermediate arithmetic and logic results are stored.
Program Counter (PC)
This register is used to hold the memory address of the next instruction that has to be executed in a program. This is to ensure the CPU knows at all times where it has reached, that is able to resume following an execution at the correct point, and that the program is executed correctly.

Instruction Register (IR)
This is used to hold the current instruction in the processor while it is being decoded and executed, in order for the speed of the whole execution process to be reduced. This is because the time needed to access the instruction register is much less than continual checking of the memory location itself.

Memory Address Register (MAR)
Used for storage of memory addresses, usually the addresses involved in the instructions held in the instruction register. The control unit then checks this register when needing to know which memory addresses to check or obtain data from.

Memory Buffer Register (MBR)
When an instruction or data is obtained from the memory or elsewhere, it is first placed in the memory buffer register. The next action to take is then determined and carried out, and the data is moved on to the desired location.



Integrated Drive Electronics (IDE) hard disks are accessed in one of two ways:
PIO (Programmed Input/Output) or DMA (Direct Memory Access).

DMA is newer and better.


PIO (Programmed Input/Output) mode requires CPU processing for every few bytes sent to the device, so that CPU utilization becomes very high when trying to burn at high speeds.

DMA (Direct memory access) mode is a high performance mode for transferring data to and from devices, in particular, to CD and DVD burner devices.







2) The Buses
One of simplest processor operations is the transfer of data between memory cells and registers. When data moves along the wires it does so in parallel, all bits in the byte leaving the source and arriving at the destination together.





Each register is connected to a common highway so the operation: “transfer the contents of the MRB to the ACC (written as MRB ->- ACC)”is a three stage process:

ACTION
RESULT

Open MRB for output
R (output): source

Open ACC for input
W (input): destination

Close both registers


Data from MRB is copied onto the common highway

Data from the common highway is copied into the ACC

Release the common highway






Assuming that the MRB hold the value 15 (hex) shown as follows:

Transfer MRB to ACC

Summary of action
Result
Open MRB for output 15 (hex) from MRB is copied onto the common highway
15 (hex) from the common highway is copied into the ACC
Release the common highway


ACC now hold the value 15 (hex)

Open ACC for input

Close MRB and ACC












3) The Arithmetic Logic Unit – ALU

All arithmetic and logic operations take place in the ALU. Operations like:

Arithmetic
Logical

RESET (reset 00000000)

ADD (two input)

INCREMENT (add 00000001)

SET (set to 11111111)

NOT (invert all bits)

AND (two inputs)

OR (two inputs)
Example: How the processor would use the registers, buses and ALU to add two numbers together.
Assumption – the numbers to be added are in the ACC and the MRB, result to be stored in the ALUB.

ADD the contents of ACC and MRB registers.
The result to be STORED in the ALUB register.



Summary of the action

Open ACC for output


The content of both registers ACC and MRB is available at the Arithmetic and Logic Unit (ALU).

Open MRB for output


Signal given to ALU to ADD .

ALU perform the arithmetical operation addition of the data now available in the ALU .

Open ALUB for input


Write the result to ALUB .

Close ALUB, ACC, MRB

Release data bus.

Release control bus.

Remove add signal from ALU




ANOTHER WAY OF DRAWING THE ABOVE CHART. INDEX PAGES REFERS.

Use the below chart to show the following instruction given in a program:

Open ALUB for output
Open ACC for input
Close ACC, ALUB

  • Accueil Accueil
  • Univers Univers
  • Ebooks Ebooks
  • Livres audio Livres audio
  • Presse Presse
  • BD BD
  • Documents Documents