ghaidait.files.wordpress.com · web viewprincess nora bint abdulrahman university net201-...

5
Princess Nora Bint Abdulrahman University NET201- Principles of Information & Technology Systems Faculty of Computer and Information Sciences First Semester 1438/1439 H Department of Information Technology Tutorial 2 - Microprocessors Q1) Fill in the blanks: 1. All of the machine language commands that the CPU understands make up the CPU’s instruction set. 2. A CPU does no work until it is told to, so it needs a buzzer, which is called the clock. 3. The maximum number of clock cycles that a CPU can handle in a given period of time is referred to as its Clock speed. Q2) Choose the correct answer: 1. What do registers provide for the CPU? a) Registers determine the clock speed. b) The CPU uses registers for temporary storage of internal commands and data. c) Registers enable the CPU to address RAM. d) Registers enable the CPU to control the address bus. 2. What function does the external data bus have in the PC? a) The external data bus determines the clock speed for the CPU.

Upload: others

Post on 10-Mar-2020

23 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: ghaidait.files.wordpress.com · Web viewPrincess Nora Bint Abdulrahman University NET201- Principles of Information & Technology Systems Faculty of Computer and Information Sciences

Princess Nora Bint Abdulrahman University NET201- Principles of Information & Technology Systems Faculty of Computer and Information Sciences First Semester 1438/1439 HDepartment of Information Technology Tutorial 2 - Microprocessors

Q1) Fill in the blanks:

1. All of the machine language commands that the CPU understands make up the CPU’s instruction set.

2. A CPU does no work until it is told to, so it needs a buzzer, which is called the clock.

3. The maximum number of clock cycles that a CPU can handle in a given period of time is referred to as its Clock speed.

Q2) Choose the correct answer:

1. What do registers provide for the CPU?

a) Registers determine the clock speed.

b) The CPU uses registers for temporary storage of internal commands and data.

c) Registers enable the CPU to address RAM.

d) Registers enable the CPU to control the address bus.

2. What function does the external data bus have in the PC?

a) The external data bus determines the clock speed for the CPU.

b) The CPU uses the external data bus to address RAM.

c) The external data bus provides a channel for the flow of data and commands between the

CPU and RAM.

d) The CPU uses the external data bus to access registers

Page 2: ghaidait.files.wordpress.com · Web viewPrincess Nora Bint Abdulrahman University NET201- Principles of Information & Technology Systems Faculty of Computer and Information Sciences

Princess Nora Bint Abdulrahman University NET201- Principles of Information & Technology Systems Faculty of Computer and Information Sciences First Semester 1438/1439 HDepartment of Information Technology Tutorial 2 - Microprocessors

3. What is the function of the address bus in the PC?

a) The address bus enables the CPU to communicate with the chipset.

b) The address bus enables the memory controller chip to communicate with the RAM.

c) The address bus provides a channel for the flow of data and commands between the CPU and RAM.

d) The address bus enables the CPU to access registers.

Q4) Solve the following :

a) Suppose that a CPU has a data bus with 30 wires, what is the maximum amount of RAM this CPU can handle?

The maximum amount of RAM =

The memory address space = 230

230 = 1073741824 which is 1 GB

b) If a CPU has a data bus with 44 wires, what is the maximum amount of RAM this CPU can handle?

The maximum amount of RAM =

The memory address space = 244

244 = 17592186044416 Bytes which is 16 TB

Or

The memory address space = 24 .240

Page 3: ghaidait.files.wordpress.com · Web viewPrincess Nora Bint Abdulrahman University NET201- Principles of Information & Technology Systems Faculty of Computer and Information Sciences

Princess Nora Bint Abdulrahman University NET201- Principles of Information & Technology Systems Faculty of Computer and Information Sciences First Semester 1438/1439 HDepartment of Information Technology Tutorial 2 - Microprocessors

The maximum amount of RAM = 16 TB

c) How many data bus wires needed to handle a 4 GB RAM ?

4 GB = 4294967296 Bytes

2 ? = 4294967296 Bytes

Log2 (4294967296) = 32 wire

Or 22 .230=232 32 wire

Q5) Suppose that :

There are 4 instructions: I1 , I2 , I3 and I4.I2 takes 2 clock cycles for execution I3 takes 3 clock cycles for decoding.

a) Draw the figure for 4-stage pipeline!

Clock cycle

1 2 3 4 5 6 7 8 9

I1 F1 D1 E1 W1

I2 F2 D2 E2 W2

I3 F3 D3 E3 W3

I4 F4 D4 E4 W4

Page 4: ghaidait.files.wordpress.com · Web viewPrincess Nora Bint Abdulrahman University NET201- Principles of Information & Technology Systems Faculty of Computer and Information Sciences

Princess Nora Bint Abdulrahman University NET201- Principles of Information & Technology Systems Faculty of Computer and Information Sciences First Semester 1438/1439 HDepartment of Information Technology Tutorial 2 - Microprocessors

b) How many cycles needed for the 4 instructions to be completed?

9 Cycles

c) Determine the latency for each instruction.(Hint: the instruction latency is the time to complete a single instruction from start to finish)

I1 fetched at time t1 and completed its execution at t4 4 clock cyclesI2 fetched at time t2 and completed its execution at t6 5 clock cyclesI3 fetched at time t3 and completed its execution at t8 6 clock cyclesI4 fetched at time t4 and completed its execution at t9 6 clock cycles

Notice: The instruction 4 latency is 4 cycles, but it took 6 cycles due to pipeline stall