tcsjinnahcampus.files.wordpress.com€¦  · web view01/03/2016  · 1.3 hardware and software....

41
Hardware and software Work Book with practice Questions

Upload: others

Post on 08-Oct-2020

0 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: tcsjinnahcampus.files.wordpress.com€¦  · Web view01/03/2016  · 1.3 Hardware and software. 1.3.1 Logic Gates. Many electronic circuits have to make decisions. They look at two

Hardware and software Work

Book with practice

Questions

Page 2: tcsjinnahcampus.files.wordpress.com€¦  · Web view01/03/2016  · 1.3 Hardware and software. 1.3.1 Logic Gates. Many electronic circuits have to make decisions. They look at two

Computer Science Page 2

ContentsSyllabus content & assessment at a glance ............................................................................................3

1.3 Hardware and software ............................................................................................................................5

1.3.1 Logic Gates .........................................................................................................................................5

Examination Questions ...........................................................................................................................9

1.3.2 Computer architecture and the fetch-execute cycle ...................................................................... 20

Examination Questions ........................................................................................................................ 25

1.3.3 & 4 Input & Output Devices ............................................................................................................ 31

Examination Questions ........................................................................................................................ 45

1.3.5 Memory, storage devices and media.................................................................................................. 60

Examination Questions ........................................................................................................................ 74

1.3.6 Operating systems ........................................................................................................................ 101

Examination Questions ...................................................................................................................... 104

1.3.7 High- and low-level languages and their translators .................................................................... 107

1.2.2 ........................................................................................................................................................... 109

Page 3: tcsjinnahcampus.files.wordpress.com€¦  · Web view01/03/2016  · 1.3 Hardware and software. 1.3.1 Logic Gates. Many electronic circuits have to make decisions. They look at two

Computer Science Page 3

Syllabus content & assessment at a glanceSections TopicsSection 1 Theory of Computer Science

1.1 Data representation1.1.1 Binary systems1.1.2 Hexadecimal1.1.3 Data storage1.2 Communication and Internet technologies1.2.1 Data transmission1.2.2 Security aspects1.2.3 Internet principles of operation1.3 Hardware and software1.3.1 Logic gates1.3.2Computer architecture and the fetch-execute cycle1.3.3 Input devices1.3.4 Output devices1.3.5 Memory, storage devices and media1.3.6 Operating systems1.3.7High- and low-level languages and their translators1.4 Security1.5 Ethics

Section 2 Practical Problem-solving andProgramming2.1 Algorithm design and problem-solving2.1.1 Problem-solving and design2.1.2 Pseudocode and flowcharts2.2 Programming2.2.1 Programming concepts2.2.2 Data structures; arrays2.3 Databases

Assessment at a glanceComponents WeightingPaper 1 Theory 1 hour 45 minutes This written paper contains short-answer and structured questions. All questions are compulsory.No calculators are permitted in this paper. 75 marksExternally assessed.Paper 2 Problem-solving and Programming 1 hour 45 minutes This written paper contains short-answer and structured questions. All questions are compulsory. 20 of the marks for this paper are from questions set on the pre-release material. 1No calculators are permitted in this paper. 50 marksExternally assessed.

60%

40%

Page 4: tcsjinnahcampus.files.wordpress.com€¦  · Web view01/03/2016  · 1.3 Hardware and software. 1.3.1 Logic Gates. Many electronic circuits have to make decisions. They look at two

Paper 1Theory of Computer Science

Page 5: tcsjinnahcampus.files.wordpress.com€¦  · Web view01/03/2016  · 1.3 Hardware and software. 1.3.1 Logic Gates. Many electronic circuits have to make decisions. They look at two

1.3 Hardware and software

1.3.1 Logic GatesMany electronic circuits have to make decisions. They look at two or more inputs and

Candidates should be able to:• Use logic gates to create electronic circuits• Understand and define the functions of NOT, AND, OR, NAND, NOR and

XOR (eor) gates, including the binary output produced from all the possible binary inputs (all gates, except the NOT gate, will have 2 inputs only)

• Draw truth tables and recognise a logic gate from its truth table• Recognise and use the following standard symbols used to represent logic

gates:•

• Produce truth tables for given logic circuits, for example:a b c output0 0 00 0 10 1 00 1 11 0 01 0 11 1 01 1 1

• Produce a logic circuit to solve a given problem or to implement a given written logic statement, such as IF (switch A is NOT on) OR (switch B is on

use these to determine the outputs from the circuit. The process of doing this uses electronic logic, which is based on digital switches called L o g i c al G a t e s . Logic gates are devices that can combine multiple inputs at independent logic levels and come up with an output accordingly. They are used by implementing Boolean algebra. Logic gates have two or more input and one output except NOT Gate which has one input and one output.The most common Logical Gates are given below:

For example, The most obvious use is for simple control. Imagine designing a washing machine so that the water only turns on when the washing is loaded (logic-1), the door is closed (logic-1) but the clothes are not yet wet (logic-0). This can be done by ANDing the first two conditions, and inverting the third. Now, AND these together, and you get a high only when all three conditions are satisfied.

Page 6: tcsjinnahcampus.files.wordpress.com€¦  · Web view01/03/2016  · 1.3 Hardware and software. 1.3.1 Logic Gates. Many electronic circuits have to make decisions. They look at two

Two or more logic gates can be connected to produce a logic circuit with one or more outputs from two or more inputs.

T ruth T a b l e s : “A truth table is used to show the output of a logic gate or circuit for all possible combinations of input values.”Usually the binary values are used , 1 and 0, as shorthand for True and False.The truth table for a two-input gate needs four rows (22=4) while for 3-input gate needs eight rows (23=16).

1) NOT G a te ( I n v e r t e r ) : A NOT gate or an inverter is the simplest kind of logic gate. Its function is to give theopposite output to its input - if it gets a high(1), it gives a low (0), and vice versa. This is equivalent to saying that the output is not the input.

NOT GateInput A Output A

0 11 0

The output (called X) is true (i.e. 1 or ON) when the INPUT A is NOT TRUE (i.e. 0 orOFF).2) AN D G ateAn AND gate gives an output 1 only when both inputs are 1. If one or more inputs are 0,then the output is also 0.

AND GateInput A Input B Output x

0 0 00 1 01 0 01 1 1

The output (called X) is only true (i.e. 1 or ON) if the (INPUT A AND INPUT B) are bothtrue (i.e. 1 or ON).3) O R GateAn OR gate gives a high (1) output if any input is high (1). If all inputs are low (0), thenthe output is low (0).

OR GateInput Input Output x

Page 7: tcsjinnahcampus.files.wordpress.com€¦  · Web view01/03/2016  · 1.3 Hardware and software. 1.3.1 Logic Gates. Many electronic circuits have to make decisions. They look at two

A B0 0 00 1 11 0 11 1 1

The output (called X) is true (i.e. 1 or ON) if the (INPUT A OR INPUT B) are true (i.e. 1or ON).4) AN D G ateThis NOT AND combination is shortened to just NAND. A NAND gate gives a 0 outputonly when both inputs are 1. If one or more inputs is 0, then the output is 1.

NAND GateInput A Input

BA AND B OUTPUT X

The output (called X) is true (i.e. 1 or ON) if (INPUT A AND INPUT B) are NOT both true (i.e. 1 or ON).

5) NOR G ate

0 0 0 10 1 0 11 0 0 11 1 1 0

This NOT OR combination is shortened to just NOR. A NOR gate gives a 1 output only if no inputs are 1. If an input is 0, then the outputis 0.

NOR GateInput

AInput

BA OR B OUTPUT

X0 0 0 10 1 1 01 0 1 01 1 1 0

6) XOR GateThe 'Exclusive-OR' gate is a circuit which will give a 1 output if either, but not both, ofits two inputs are 1. If both inputs are same then output will be 0 else output will be 1

XOR GateInput

AInput

BOutput x

0 0 00 1 1

Page 8: tcsjinnahcampus.files.wordpress.com€¦  · Web view01/03/2016  · 1.3 Hardware and software. 1.3.1 Logic Gates. Many electronic circuits have to make decisions. They look at two

1 0 11 1 0

Truth tablesA truth table is used to show the output of a logic gate or circuit for all possible combinations of input values; we usually use the binary values, 1 and 0, as shorthand for True and False.The truth table for a two-input gate needs four rows.Combinational logic circuits with two inputsTwo or more logic gates can be connected to produce a logic circuit with one or more outputs from two or more inputs. A logic circuit can process logical expressions and binary numbers.When producing a truth table for a logic circuit:• it is helpful to add a column for each intermediate output as well as for the final output• as for a single logic gate with two inputs, a logic circuit with two inputs needs four rows.Combinational logic circuits with three inputsWe only need to be able to produce a truth table for a logic circuit with a maximum of three inputs and six gates.The truth table for a three-input logic circuit needs eight rows.Designing simple logic circuitsSometimes, it is cheaper to design and hard-wire a logic circuit for a simple automated system that only requires a fixed pattern of output depending on the current values of the inputs, than to program a microcontroller or computer.We can use the words AND, OR, NOT, NAND and NAND as operators in a logical equation, such as L = (A AND B) OR NOT B. We use brackets to indicate that the logical operation within the brackets takes priority.We can design a logic circuit to solve a written statement of a logical problem. First, we rewrite the statement using brackets to clarify the binary value of each variable and the priority of the logical operations. Then we can write the logical equation. From the logical equation, if not an earlier stage in the rewriting process, it should be possible to draw the required logic circuit and a truth table to confirm that it has the required behaviour.Testing logic circuitsWe have seen how to use a truth table to check whether a logic circuit has solved a given problem, rather as we use a trace table for dry running a fl owchart or pseudocode algorithm. We can also check that a logic circuit solves the problem by building the circuit using logic simulation soft ware or electronic circuitry, with appropriate attention to safety.

Page 9: tcsjinnahcampus.files.wordpress.com€¦  · Web view01/03/2016  · 1.3 Hardware and software. 1.3.1 Logic Gates. Many electronic circuits have to make decisions. They look at two

INPUT 1 INPUT 2 OUTPUT0 0 00 1 11 0 11 1 1

INPUT 1 INPUT 2 OUTPUT0 0 10 1 11 0 11 1 0

Examination QuestionsQ1) Identify each of the following gates from truth table:

INPUT 1 INPUT 2 OUTPUT0 0 00 1 01 0 01 1 1

INPUT 1 INPUT2

OUTPUT

0 0 10 1 01 0 01 1 0

INPUT OUTPUT0 11 0

Q2) Complete the following truth table

INPUT 1 INPUT 2 OUTPUT0 00 11 01 1

INPUT 1 INPUT 2 OUTPUT0 00 11 01 1

Page 10: tcsjinnahcampus.files.wordpress.com€¦  · Web view01/03/2016  · 1.3 Hardware and software. 1.3.1 Logic Gates. Many electronic circuits have to make decisions. They look at two

Q3) Draw the logic circuit required to fulfil the following statements:a Output C = (NOT(A AND B)) AND (A OR B)

b Light (L) is on if Switch A is on OR (Switch B is on AND Input C is off.

Q4)Copy and complete the truth tables for the following logic circuits:

INPUT 1 INPUT 2 OUTPUT0 00 11 01 1

INPUT 1 INPUT 2 OUTPUT0 00 11 01 1

Page 11: tcsjinnahcampus.files.wordpress.com€¦  · Web view01/03/2016  · 1.3 Hardware and software. 1.3.1 Logic Gates. Many electronic circuits have to make decisions. They look at two

INPUT 1 INPUT 2 OUTPUT0 00 11 01 1

Q 5 ) Sp e c i m en 2015 P 1 (Q 3 ) An alarm, Y, sends a signal (Y = 1) when certain fault conditions in a chemical process are detected. The inputs are:

The alarm, Y, returns a value of 1 if:either temperature >= 120oC AND stirrer bar is OFFor acidity > 5 AND temperature < 120oC

(a)Draw the logic circuit for the above system using these logic gates. [5]

A T S Y1 1 11 1 01 0 11 0 00 1 10 1 00 0 10 0 0

Page 12: tcsjinnahcampus.files.wordpress.com€¦  · Web view01/03/2016  · 1.3 Hardware and software. 1.3.1 Logic Gates. Many electronic circuits have to make decisions. They look at two

(b)Complete the truth table for this alarm system. [4]Q6) Winter 2014 P12-13

13 (a) Complete the truth table for the following logic circuit:

A B C Working X

0 0 00 0 10 1 00 1 11 0 01 0 11 1 01 1 1

(b) Re-draw the logic circuit shown opposite, using NAND and NOR gates only

(c) Write a logic statement that describes the following logic circuit:

...................................................................................................................................................

...................................................................................................................................................

...............................................................................................................................................[3](c) Write a logic statement that describes the following logic circuit:

A B C Working X0 0 00 0 10 1 00 1 11 0 01 0 11 1 01 1 1

...........................................................................................................................................................

................................................................................................................................................ [3]

Page 13: tcsjinnahcampus.files.wordpress.com€¦  · Web view01/03/2016  · 1.3 Hardware and software. 1.3.1 Logic Gates. Many electronic circuits have to make decisions. They look at two

Q 7 ) Summ e r 2 0 1 4 P 1 1 ( Q7) (a) Draw the logic circuit for the logic statement:X = 1 if (L is NOT 1 AND F = 1) OR (F is NOT 1 AND A is 1) [5]

(b) Complete the truth table for the above system [4]L0

F0

A0

Working X

0 0 10 1 00 1 11 0 01 0 11 1 01 1 1

Q8) Summer 2014 P12 (Q17)17 (a) Complete the truth table for the following logic circuit: [4]

A B C Working X0 0 00 0 10 1 00 1 11 0 01 0 11 1 01 1 1

(b) Write the logic statement to describe the following logic circuit: [3]

Page 14: tcsjinnahcampus.files.wordpress.com€¦  · Web view01/03/2016  · 1.3 Hardware and software. 1.3.1 Logic Gates. Many electronic circuits have to make decisions. They look at two

Q 9 ) W in t e r 2 0 1 3 P12 ( Q 1 0 ) (a) (i) Complete the truth table for the following logic circuit which is made up of NORgates only.

A B Working X0 00 11 01 1

(ii) What single logic gate has the same function as the above circuit? [1]

(b) Complete the truth table for the following logic circuit.

Page 15: tcsjinnahcampus.files.wordpress.com€¦  · Web view01/03/2016  · 1.3 Hardware and software. 1.3.1 Logic Gates. Many electronic circuits have to make decisions. They look at two

A B C Working X1 1 11 1 01 0 11 0 00 1 10 1 00 0 10 0 0

Q 1 0) S u m mer 2 0 13 P 1 1 ( Q 1 0 ) (a) (i) Complete the truth table for the logic circuit which is made up of NAND gates

only.

A B Working X1 11 00 10 0

(ii) What single logic gate has the same function as the above logic circuit? [1] (b) (i) Complete the truth table for the logic circuit.

A B C Working X1 1 11 1 01 0 11 0 00 1 10 1 00 0 10 0 0

Page 16: tcsjinnahcampus.files.wordpress.com€¦  · Web view01/03/2016  · 1.3 Hardware and software. 1.3.1 Logic Gates. Many electronic circuits have to make decisions. They look at two

(ii) What could replace the whole logic circuit?.............................................................................................................................................................................................................................................................................................................. [1]

Q 1 1 ) Summ e r 2 0 1 3 P 12 ( Q 1 5 ) (a) Draw the logic circuit represented by the logic statement:X = 1 if (B is NOT 1 AND S is NOT 1) OR (P is NOT 1 AND S is 1)

[6]

b) Complete the truth table for the above logic statement. [4]

Q12) Winter 2012 P12 (Q11)An alarm sounds when certain conditions occur in a nuclear reactor.The output, X, of a logic circuit that drives the alarm must have a value of 1 if:either carbon dioxide pressure too low and temperature < = 300°Cor water pressure > 10 bar and temperature > 300°C The inputs to the system are:

Page 17: tcsjinnahcampus.files.wordpress.com€¦  · Web view01/03/2016  · 1.3 Hardware and software. 1.3.1 Logic Gates. Many electronic circuits have to make decisions. They look at two

(a) Draw the required logic circuit using AND, OR and NOT gates only.

[5] (b) Complete the truth table for the above system. [4]

P T W X1 1 11 1 01 0 11 0 00 1 10 1 00 0 10 0 0

Q13) Winter 2012 P13 (Q15)15 (a) Complete the truth table for the following logic circuit: [4]

A B C X1 1 11 1 01 0 11 0 00 1 10 1 00 0 10 0 0

(b) The above logic circuit uses AND, OR and NOT gates.Name another logic gate and complete its truth table. [3] Name :

\

Page 18: tcsjinnahcampus.files.wordpress.com€¦  · Web view01/03/2016  · 1.3 Hardware and software. 1.3.1 Logic Gates. Many electronic circuits have to make decisions. They look at two

Q 1 4) S u m mer 2 01 2 P 1 1 (Q1 2 ) (a) (i) Complete the truth table for the following logic circuit, which is made up of NANDgates:

(ii) What single logic gate has the same function as the above logic circuit?

..................................................................................................................................................... [1]

b) Complete the truth table for the following logic circuit:

A B C X1 1 11 1 01 0 11 0 00 1 10 1 00 0 10 0 0

Q15) Specimen 2011 P1 (Q11)Draw the truth table for the following logic network: [4]

A B C X1 1 11 1 01 0 11 0 00 1 10 1 00 0 10 0 0

Page 19: tcsjinnahcampus.files.wordpress.com€¦  · Web view01/03/2016  · 1.3 Hardware and software. 1.3.1 Logic Gates. Many electronic circuits have to make decisions. They look at two

Q 1 6) S p e cim e n 20 1 1 P1 (Q 1 2) Draw a logic network and truth table for the following logic problem:

“A sprinkler (S) is ON ifeith e r temperature alarm (T) is ON a n d cooler alarm (C) is ONor vent alarm (V) is OFF and cooler alarm (C) is O N” [9]

W orking:

Logic Network:[2]

Truth Table:T C V S1 1 11 1 01 0 11 0 00 1 10 1 00 0 10 0 0

Page 20: tcsjinnahcampus.files.wordpress.com€¦  · Web view01/03/2016  · 1.3 Hardware and software. 1.3.1 Logic Gates. Many electronic circuits have to make decisions. They look at two

1.3.2 Computer architecture and the fetch-execute cycle

1.3.2 Computer architecture and the fetch-execute cycle• show understanding of the basic Von Neumann model for a computer system and the storedprogram concept (program instructions and data are stored in main memory andinstructions arefetched and executed one after another)• describe the stages of the fetch-execute cycle

Courtesy to http:/ / w e b . e e cs . utk . ed u /r e s e a r c h / cs 1 0 0m o d ules / m odul e 1 / i n d e x . html Von Neumann ArchitectureThe idea about how computers should be built was proposed by John von Neumann in1945. This idea is called the von Neumann Architecture or Model. This is still the basis for computers today. Using these four components, a von Neumann computer will execute a series of instructions, called a program, which are stored in the computer's memory. This is called the “stored program concept”.The components of von Neumann Architecture is:

1. Input/Output (I/O)2. Memory3. A Control Unit4. An Arithmetic Logic Unit (ALU)

Input/Output (I/O) DevicesThe Input/Output (I/O) components of a computer are hardware devices that are responsible for getting data from the computer to the user or from the user to the computer.Data going from the user to the computer is called "input." The two main input devices are the mouse and the keyboard.Output devices are used to transmit data from the computer'smemory to the user. The two output devices almost every computer system has are the monitor and the printer.Memory UnitComputer has several types of memory. Memory unit in the Von Neumann model is the main memory, also called RAM or Random Access Memory.Main memory is used by the computer for storing a program and its data while the program is running. What distinguishes a computer from a calculator is the ability to run a stored program; main memory allows the computer to do that.RAM can be thought of as a sequence of boxes, called cells, each of which can hold a certain amount of data.The remaining three components of the von Neumann model of a computer are found inside the Processor.

Page 21: tcsjinnahcampus.files.wordpress.com€¦  · Web view01/03/2016  · 1.3 Hardware and software. 1.3.1 Logic Gates. Many electronic circuits have to make decisions. They look at two

Control UnitThe control unit controls the sequencing and timing of all operations. It contains a "clock," that is actually a quartz crystal that vibrates million times per second. The clock emits an electronic signal for each vibration. Each separate operation is synchronized to the clock signal. For example 1st pc operates at 4.7 MHz means 4.7 million instructions per second.The functions of CU are given below:

Interprets and carries out instruction of program. Selects program statements from memory. Moves these instructions to instruction registers Carries out instructions Directs flow of data between components of CPU and to and from other

devices.Arithmetic & Logic Unit (ALU)Arithmetic unit perform arithmetical operations like+, -, *, and / while logical unit are to compare two quantities. Logical operations are important in computer programming.ALU can be thought of as being similar to a calculator, except that, in addition to normal math, it can also do logical (true/false) operations.The functions of ALU are given below: The arithmetic unit carries out arithmetic like

addition, division. The logic unit enables the processor to make

comparison like =, <, > and logical decisions like AND, OR, NOT.

The arithmetic logic unit carries out communication with peripheral devices.

It also carries out bit shifting operation.Register:Registers are Immediate Access Store (IAS) located on the CPU, and used temporarily for storing data. Because the registers are close to the ALU, they are made out of fast memory, efficiently speeding up calculations.There are 14 registers. Some examples are

a) P r ogr a m Count e r (PC) - an incrementing counter that keeps track of the next memory address of the instruction that is to be executed once the execution of the cu r r e n t i n s tr u c t i o n is c om p le t e d .

b) M emory A d d r e ss R e g i s t er ( M A R) - the a dd r e ss in main m e m ory t h at is cur r e n t l y being read or written

Page 22: tcsjinnahcampus.files.wordpress.com€¦  · Web view01/03/2016  · 1.3 Hardware and software. 1.3.1 Logic Gates. Many electronic circuits have to make decisions. They look at two

c) M emory B u ff e r /D a ta R e g is t er (MBR/MBR) - a two-way register that holds data f e t c h ed f r o m m emo r y ( a n d re a dy f or t h e CPU to proc e s s ) o r d a t a w a iting to be s t ored in memory

d) Curr en t In struc tion regi st er (CIR ) - a temp orar y hol di ng grou nd f or th e instructi ont h at has just b e en f e t c h e d from m emo r y

e) A c cumulat o r R e g i s t e r ( A C ) is u s ed f or st o r ing da t a for A L U t o p rocess a n d the r e s u l t s t h o s e a r e prod u ced by t he AL U .

Buse s : ' ' T he s et of w i r e s u s ed t o tr a v el sign a ls t o a nd f r o m CPU a n d dif f e r e n t components of computer is called Bus.''

Bus is a group of parallel wires that is used as a communication path. As a wire transmits a single bit so 8-bits bus can transfer 8 bits (1 byte) at a time and 16-bits bus can transfer 16 bits (2 bytes) and so on. There are three types of buses according to three types of signals, these are:a) Data Bu s: ''The buses which are used to transmit data between CPU, memory and

peripherals are called Data Bus.''b) A dd r e ss B u s: ''The buses which are connecting the CPU with main memory and

used to identify particular locations (address) in main memory where data is stored are called Address Buses.''

c) Contro l Bu s: The wires which are used to transmit the control signals (instructions)generated by Control Unit to the relevant component of the computer.

Fetch-Execute Cycle:At its core, all the computer ever does is, execute one instruction in memory after another, over and over. Although there are manydifferent possible (assembly language) instructions that the computer can execute, the basic steps involved in executing an instruction are always the same, and they are called the instruction cycle.1. Fetch the instruction (transfer the instruction frommain memory to the decoder)2. Decode the instruction (from machine language)3. Execute the instruction (e.g., add, divide, load,store...)4.Store the result (for instructions like ADD, place the 'answer' in the specified register.)

The control unit guides the computer's components through this cycle to execute one instruction.When that instruction is done, the cycle starts all over again with the next instruction.

Page 23: tcsjinnahcampus.files.wordpress.com€¦  · Web view01/03/2016  · 1.3 Hardware and software. 1.3.1 Logic Gates. Many electronic circuits have to make decisions. They look at two

Registers/circuits involved

The circuits used in the CPU during the cycle are:

P r ogr a m Count e r (PC) - an incrementing counter that keeps track of the next memory address of the instruction that is to be executed once the execution of t h e cur r e n t i n s t r u c t i o n i s com p le t e d .

M emory Addre ss Re gister (M AR) - the add res s in main m em ory t hat is curre ntl y being read or written

M emory Bu ffer Regi s ter (MBR) - a tw o- wa y regist er t hat h ol ds dat a f etched f romm emo r y ( a n d re a dy f or the CPU to p r o c ess) o r d a t a w aiti n g to b e s t o r e d i n m emo r y

Curr en t In struc tion register (CIR ) - a temp orar y hol di ng grou nd f or th einstruction t h a t h as j ust be e n f e t c h e d from m emo r y

Ac cumulat or R eg is ter ( AC ) is us ed f or stor ing dat a for ALU t o process a nd the r e s u l t s t h o s e a r e prod u ced by t he AL U .

Contro l Uni t (CU) - d ecod es th e progr am inst ruct ion i n th e CI R, selectingm ac h i n e reso u r c es such a s a d a t a sour c e register a n d a parti c u l a r a ri t hm e t i c op e r atio n , a n d c oordi n a t e s a c tivat i on o f t h ose r e s o u r c es

Ar ithm eti c lo gic unit ( AL U) - perf orms m at hematical and logi cal operations

Regi s t e r n o t a t ion To d e scr i be t h e c y c l e we can u s e re g is t er notation. T h is is a v e r y s i m p le way of noting all the steps involved. In all cases where you see brackets e.g. [PC], this means that the contents of the thing inside the brackets is loaded. In the case of the first line, the contents of the program counter is loaded into the Memory Address Register.MAR [PC] MBR [ Mem o ry] ; PC [PC] +1 (Incr eme nt t he PC f or next c ycle at the sam e time) CIR [MBR]CIR ex e c u t e s

Page 24: tcsjinnahcampus.files.wordpress.com€¦  · Web view01/03/2016  · 1.3 Hardware and software. 1.3.1 Logic Gates. Many electronic circuits have to make decisions. They look at two
Page 25: tcsjinnahcampus.files.wordpress.com€¦  · Web view01/03/2016  · 1.3 Hardware and software. 1.3.1 Logic Gates. Many electronic circuits have to make decisions. They look at two

Detailed description of Fetch-Decode-Execute CycleT o b e t ter u n derst a n d wh a t is g o i ng o n a t ea c h sta ge we'll now look at a detailed description: