Search Header Logo
[igCS] Computer Architecture Revision

[igCS] Computer Architecture Revision

Assessment

Presentation

Computers

9th - 10th Grade

Practice Problem

Medium

Created by

Andy tsui

Used 8+ times

FREE Resource

20 Slides • 8 Questions

1

[igCS] Computer Architecture Revision

Slide image

2

Topics Covered

  • Von Neuman's Architecture

  • CPU Architecture

  • Fetch-Decode-Execute Cycle

  • High and Low Level Languages

3

Early Computers

  • Difference Engine - Charles Babbage

  • https://www.youtube.com/watch?v=BlbQsKpq3Ak

  • Machine is purposely built, only able to perform certain tasks

4

Open Ended

Question image

The picture showing a "Game and Watch" machine which is some of the earliest game console made by Nintendo. What is the problem if a machine is built to perform one specific task?

5

General purpose computer

  • ENIAC - First general purpose computer

  • https://www.youtube.com/watch?v=bGk9W65vXNA

  • Allows reprogram (through hardware) the computer for different tasks

6

Von Neumann architecture

  • Stored-program computer - not only data is stored in memory, but also instructions

  • Modern computer stores instructions as well as data in RAM

7

Open Ended

Suggest and explain one major benefit of Von Neuman Architecture compare to those early computer systems.

8

Core of Modern Computer System

  • CPU

  • Memory (mainly refer to primary storage)

  • Input and Output devices

Slide image

9

Parts in CPU

  • Control Unit - Control flow of data and different parts of CPU

  • Arithmetic Logic Unit (ALU) - Carries out calculation and logic

  • Registers - Internal, temporary storage used within CPU

  • Buses - connects parts in CPU and outside CPU for data exchange

10

Bus

  • Bus is a connection type where a central communication channel is connected to multiple nodes (like bus stops)

  • Control bus - Carries control instructions

  • Address bus - Carries information about address of, e.g. RAM

  • Data bus - Transmits Data retrieved / write to addresses

Slide image

11

Registers

  • PC - Program Counter, store the memory address of NEXT instructions

  • CIR - Current Instruction Register

  • ACC - Accumulator stores the result of logic and calculation

  • ACC also refers as an example of "General Purpose Register" where programmers can access to

12

Fetch-Decode-Execute Cycle

  • Processor Fetch one instruction by one

  • Decode the instruction

  • Execute the instruction

  • Repeat the cycle

13

Open Ended

Question image

Use textbook p.49 to help, write down the correct sequence.

14

Slide image

Overview of some programming language levels

15

Machine Code

  • Machine code is the instruction provided directly to CPU (more specificly, Control Unit)

  • Usually represented in Binary numbers

  • Note: CPU can only understand machine code thus all languages need to be "translated" into this

16

Assembly Languages

  • Often refer as Low level language

  • Contains mnemonic code that is machine dependent (i.e. your code can only work with specific machine)

  • Assembler is needed to translate assembly into machine code

17

Slide image

Machine code (Left) vs Assembly (right)

18

Open Ended

Low level language looks so complicated and not intuitive to program. Why do some people still need to use them?

19

Why low level?

  • Program specifics to platform, e.g. writing device drivers

  • Performance - programmer can highly optimize code in assembly

20

Higher level languages

  • The higher level of the language, the less dependent on specific machine

  • High level languages has two types of translators:

  • Compilers

  • Interpreters

21

Multiple Select

Check all the high level languages

1

Assembly

2

Java

3

C

4

Python

5

SQL (Structural query language)

22

Open Ended

Explain 2 benefits of programming in high level compare to low level.

23

Higher level language compare to low

  • Easier to understand, since it is closer to human language, so that:

  • Development takes less time

  • Easier to debug and trace problems

  • Code is more manageable and allows developing more complex program

24

Compiler

  • C, C++ are example of compiled language

  • The code is compiled into machine code in one go

  • Results in an executable file (e.g. exe), after that, compiler is no longer needed to run

  • If there's error in compilation, a summary of all errors will be displayed to the programmer

25

Slide image

26

Interpreter

  • Example include Python, Javascript

  • Code is translated, executed one line by one

  • The interpreter is always required to run the program

  • When error is found, the interpreter is

27

Multiple Choice

Which of the following is NOT true?

1

Interpreter is required to run a program

2

Compiler is needed only when compiling a program

3

A summary of syntax error can be shown after compiling

4

A summary of logical error can be shown after compiling

28

Multiple Select

Check all the True statements:

1

Low level language are easier for human to understand

2

Machine code can be understand by computer natively

3

Assembly languages need to be translated before computer can understand

4

High level languages need to be translated before computer can understand

[igCS] Computer Architecture Revision

Slide image

Show answer

Auto Play

Slide 1 / 28

SLIDE