Day 9 Flashcards

1
Q
  • Recall the process of multiplication.*
  • Note that with signed integers, we use sign extension and the last number becomes its 2’s complement and than being added to the accumulator*
A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Recall signed multiplication.

Compute it yourself

A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Compute -5/8 * 6/8

A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q
  • Recall the method for integer division*
  • Now slove 45/6*
A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q
A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Describe the exponent of 32 bit machine

A

8 bits are reserved for the exponent.

23 bits are reserved for the mantisa.

1 bit is reserved for sign.

because we’re using 2’s complement we have a range of -127<=x<=128.

We add 127 to x to have positive numbers.

Zero is taken by x = -127, and mantisa all zeros.

x = 128 implies infinity, so..

-126<=x<=127 -> (+127) -> 1<=x<=254

That is, exponent can shift from -126 to 127.

If the number is normalized, it starts with 1, thus the smallest mantisa is 1.0, and largest is 2-2^-23.

If the number is not normalized, it starts with 0, thus the smallest mantisa is 2^-23 and largest is 1-2^-23

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q
  • With addition, you want the two numbers to have the same exponent - 1/2*
  • With substraction, you want the two number to have the same exponent -1/2*
  • 1) the greater one of the two*
  • 2) the smaller one of the two*
A

1

2

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

Explain associative cache

A

Address: 13|3 =>BlockNumber|LineInBlock

Size of block = size of line in cache.

Tag memory = an array in the cache in which block numbers are saved

Valid bits = 1 if block is present in the cache.

Time of search O(n), where n is the number of blocks in the cache.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

Write about cache:

  • Average read time
  • Average write time
  • Average memory-access time
A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q
  • With miss-hit there are two approches.*
  • Name them and explain.*
A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q
  • With miss-hit there are two write approaches*
  • Name them and explain*
A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q
  • With hit there are two write approaches*
  • Name them and explain*
A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

What are the advantages of mapping system for both I/O and memory?

A
  • Data transfer to/from CPU is the same for both I/O and memory.
  • Number of board connections is smaller
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q
  • What is the size of the I/O space?
  • How a device is identified?
  • How many device can be connected?
  • How can we know whether address refers to I/O or Memory?
  • Where are the control bits are stored?
A
  • 2^10 addresses
  • by two addresses(registers)
    • data register
    • status register
  • 20 MSB’s in the address tell us if it belongs to memory or I/O
  • Control bits going from CPU to I/O are stored in the command register
  • Control bits going from I/O to CPU are stored in the status register.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly