Week 4 - Internal Memory & Digital Logic Flashcards

1
Q

Name 5 components of von Neumann Architecture

A

processing unit, control unit, memory unit, input unit(s), output unit(s)

  1. The processing unit executes program instructions.
  2. The control unit drives program instruction execution on the processing unit. Together, the processing and control units make up the CPU.
  3. The memory unit stores program data and instructions.
  4. The input unit(s) load program data and instructions on the computer and initiate program execution.
  5. The output unit(s) store or receive program results.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What is a bus?

A

a communication chanel that transfers binary values between communication endpoints

Buses connect the units, and are used by the units to send control and data information to one another. he units use the control bus to send control signals that request or notify other units of actions, the address bus to send the memory address of a read or write request to the memory unit, and the data bus to transfer data between units.

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

Difference between Hardvard and von Neumann Architecture?

A

In the Harvard architecture, data and instructions have separate memory spaces, enabling simultaneous access to both. In contrast, the Von Neumann architecture uses a single memory space for both data and instructions, fetching and executing them sequentially.

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

Which units together make up the CPU?

A

control and processing unit

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

What is processing unit composed of?

A

ALU (arithmetic/logic unit) and a set of registers

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

What is a register?

A

A register is a small, fast unit of storage used to hold program data and the instructions that are being executed by the ALU.

Each register is capable of holding one data word.

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

What does the control unit do?

A

The control unit drives the execution of program instructions by loading them from memory and feeding instruction operands and operations through the processing unit.

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

What registers are there?

A

PC, IR, MAR, MDR, SP, ACC

Program Counter - memory address of the next instruction
Instruction Register - stores the current instruction 4
Memory Address Register - memory address of data
Memory Data Register - data currently accessed
Stack Pointer - memory address of the last item placed on stack
Accumulator - holds the result of computations

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

What is word size?

(generally, but also for 8-bit, 16-bit, 32-bit, 64-bit architecture)

A

Word size is the number of bits of the standard data size that a processor handles as a single unit.

8, 18, 32, 64 bits

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

What are input and output units (I/O)?

A

Output units refer to devices that retrieve and display information stored in memory, such as monitors or printers. Input units are devices that allow users to input data into memory, like keyboards or mice.

The input unit consists of the set of devices that enable a user or program to get data from the outside world into the computer. The most common forms of input devices today are the keyboard and mouse. Cameras and microphones are other examples.

The output unit consists of the set of devices that relay results of computation from the computer back to the outside world or that store results outside internal memory. For example, the monitor is a common output device. Other output devices include speakers and haptics.

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

Explain the process of a von Neumann Machine executing a program.

A

fetch-decode-execute-store

  1. The control unit fetches the next instruction from memory, takes it from PC and places it on the address bus and places a ‘read’ command on the control bus. The memory unit then reads it and sends the bytes stored at that address on the data bus. IR stores the bytes of the instruction received and the control unit increments the PC’s value.
  2. The control unit decodes the instruction stored in IR. It then fetches data operand values from their lcoations, as input to the processing unit.
  3. The processing unit executes the instruction. The ALU performs the instruction operation on instruction data operands.
  4. The control unit stores the result to memory. Places the result on data bus, address of the storage location on the address bus and a ‘write’ command on the control bus. When received, memory unit writes the value to memory at the address.
    The I/O units are not directly involed in the execution of program instructions, they load program’s instructions and data and store or display the results.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

Name categories of circuit building blocks:

A

arithmetic/logic, control and storage circuits

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

Draw an equality circuit:

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

Draw an 1-bit Adder circuit:

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

Attempt at drawing a 1 bit 2-way MUX:

A

https://diveintosystems.org/book/C5-Arch/_images/1bitmux.png

Truth table is A,B,S then out is (BBBBAAAA)

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

ATTEMPT at drawing a 1 bit 4-way MUX

personally i wouldn’t bother, but you do you

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

Write down the table for a two-way 1-bit demultiplexer, and a 2-bit decoder, along with their truth tables.

18
Q

Draw the computer memory hierarchy:

A

Genuinely believe this question will be skipped, you KNOW this

CPU, L1/2 cache, main memory, disk storage

19
Q

Downsides of von Neumann architecture:

A

Program can be written to view itself as data, thus enabling a self-modifying program. Also, if an instruction calls for (reading/writing) data from memory, the next instruction cannot be read from memory over the same bus until the current instruction has completed the data transfer (von Neumann bottleneck).

VNB is solved by the Hardvard architecture, but it’s far more expensive.

20
Q

What is a hit?

A

the requested data is found in a given level of memory

21
Q

What is a miss?

A

the requested data is not found in the given level of memory

22
Q

What’s a hit rate?

A

the requested data is not found in the given level of memory

23
Q

What’s a miss rate?

A

the percentage of memory accesses not found in a given level of memory.
Miss Rate = 1 - Hit Rate

24
Q

What’s a hit time?

A

the time required to access the requested information in a given level
of memory.

25
Q

What’s a miss penalty?

A

the time required to process a miss

Why it takes longer:
Replacing a block in an upper level of memory,
Additional time to deliver the requested data to the CPU
Significantly larger than the time to process a hit

26
Q

What is temporal locality?

A

Programs tend to access the same data repeatedly over time. If a program has used a variable recently, it is likely to use that variable again soon

27
Q

What is spatial locality?

A

accesses clustered in the address space (e.g. as in arrays, or loops): programs tend to access data that is nearby to the other previously accessed data.

If a program accesses data at N and N+4, it is likely to access N+8 soon

28
Q

What is capacity?

obviously in reference to this course

A

The amount of data a device can store.

Measured in bytes.

29
Q

What is latency?

A

the amount of time it takes for a device to respond with data after it has been
instructed to perform a data retrieval task

Measured in fractions of a second (ms, ns) or CPU cycles.

30
Q

What is transfer rate?

A

the amount of data that can be moved between the device and main memory
over some period of time, also known as throughput

Measured in bytes per second.

31
Q

Name arithmetic/logic circuits:

A

equality circuit, adders

32
Q

Name control circuits:

A

MUX, DEMUX, decoder

33
Q

Name storage circuits:

A

latches, flip flops

34
Q

What are edge and level triggered circuits?

A
  • Edge triggered circuit: allowed to change state on either the rising or falling edge of the clock signal
  • Level triggered: allowed to change state whenever the clock signal is either high or low.

Feedback: to remember a past state -> the output of a circuit is fed back as an input to the same circuit

35
Q

(S,R)->(0,0)
(S,R)->(1,0)
(S,R)->(0,1)
(S,R)->(1,1)

whatever this is? SR Flip Flop (draw it and the characteristic table?)

A

(S,R)->(0,0): keep current state
(S,R)->(1,0): Set (Q=1)
(S,R)->(0,1): Reset (Q=0)
(S,R)->(1,1): not allowed

36
Q

D Flip-Flop

give me inputs, type triggered, how many bits it stores?

A

2 inputs are data (D) and clock (C), it’s a positive edge-triggered flip-flop, used to store a single bit, the value oonly changes at the rising edge of a clock cycle.

37
Q

How many AND gates does an
n x 2^n decoder require? How many for 2 decoders?

such a random ass question

A

2^n, 2 x 2^(n/2)

38
Q

Combinational circuits lore?

A

A combinational logic circuit has output that depends only on the inputs given at any specific time and not on any previous inputs.
Combinational circuits are memoryless.

- Adders
- Decoders
- Multiplexers
- Programmable logic devices

39
Q

Sequential circuits are?

A

Sequential circuit has outputs that depend on previous and current inputs
They have the storage element (to remember previous outputs) and clocks as a way to order events.

- Flip flops
- Latches

Clock = circuit that emits a series of pulses of precise width and interval between consecutive pulses
Interval between consecutive pulses = clock cycle time
(1 - x100 MHz)
Clock speed measured in MHz, mills pulses per second

40
Q

How many external connections requires 8x4 memory chip?

A

3 for addressing, 4 for data links, 1 for power supply, 2 for control signals (chip selection and read/write).

11 external connections