Logic and Architecture Flashcards

1
Q

What are the two ways we can interpret sequences of bits?

A

Instructions telling the computer what to do

Addresses identifying particular pieces of memory

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

Describe the Difference Engine

A
  • Designed by Babbage
  • Built 1930s
  • Aim : Compute log and trig tables
  • Programmed by setting mechanical wheels in positions
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Describe the Colossus

A
  • Used in Bletchley Park
  • Used valves (vacuum tubes)
  • Programmed by plugboard and paper tape
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Describe IBM 407

A
  • Accounting machine, used in 1949

- Programmed by manual writing of control panel

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

What made the EDVAC a big step for computers?

A

Same storage can be used for numbers and instructions to say what do to do with the numbers

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

State the steps in the fetch execute cycle

A
  1. Load data from memory address in ip (instruction pointer)
  2. Adjust ip to refer to next instruction
  3. Control unit decodes data as an instruction
  4. Instruction is carried out by ALU
  5. (some instructions may change ip)
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

What does the CPU consist of?

A

Registers
ALU
Control
Instruction Pointer

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

What is Instruction Set Architecture?

A

Set of instructions actually understood by the CPU (Their encodings into bits and their meanings)

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

How many implementations can a single ISA have?

A

Multiple

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

What lasts longer ISAs or CPU hardware designs?

A

ISAs

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

Describe assembly language

A

Text representation of individual instructions, very low level and totally ISA specific

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

What are some features that are present in assembly language?

A
  • Conditional branches
  • Unconditional branches
  • Labels
  • Data moves
  • Arithmetic
  • Some support for subroutines
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

What are some features that are not present in assembly language?

A
  • Loop and conditional constructs
  • Method call and return
  • Variable names
  • Data types
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

State the function of a compiler

A

Converts high level program into low level instructions for a specific machine, not usually needed at run time

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

State the function of an interpreter

A

Program that reads a high level program and carries it out. Done at run time.

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

What does a linker do?

A

Combines object code files together to make an executable program that can actually run.

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

What does a loader do?

A

Loads programs and libraries into memory to prepare them for execution.

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

What are the key issues in ISA design?

A
  • Registers
  • Operands
  • Memory addressing
  • CISC vs RISC designs
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
19
Q

Describe a register

A
  • very fastest form of memory

- only form of local variable you have in assembly language

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

State some types of registers

A
  • General Purpose Registers
  • Floating Point Registers
  • Instruction Pointer
  • Flags
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
21
Q

Describe General Purpose Registers

A
  • store one word and are used in integer operations
  • most versatile and common type
  • typically a small number
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
22
Q

What part of the general purpose registers allows for backwards compatibility?

A

Often possible to use part of a register to access smaller units

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

What does it mean for an ISA to be orthogonal?

A

If each instruction performs a unique task without overlapping with other instructions

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

State a critical ISA design decision

A

Where arguments can come from and where results are stored to

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

Describe register memory

A
  • At least one argument can come straight from memory
26
Q

Advantage of register memory

A

More expressive, less need to find registers to store things in

27
Q

Describe load store (register-register) memory

A
  • All operations work between registers

- Only data transfer operations access memory

28
Q

Advantages of register register memory

A

Separation of memory access and arithmetic functions makes design simpler

29
Q

Give an example of an operation that requires three operands

A

Add x to y, storing result in z

30
Q

Give an example of an operation that requires two operands

A

Add x to y, changing y

31
Q

Give an example of an operation that requires one operand

A

All operations modify an accumulator

32
Q

Give an example of an operation that requires no operands

A

Replace the top two numbers of stack by their stack

33
Q

Describe word addressed

A

One address for each word, extra info to refer to specific byte within word

34
Q

Describe byte addressed

A

One address for each 8 bit byte, now standard

Lowest address in a word stands for the word

35
Q

Big Endian

A

Most significant byte comes first

36
Q

Little Endian

A

Least significant byte comes first

37
Q

Describe immediate mode

A
  • Value is specified in instruction itself

- Used for constants

38
Q

Describe direct mode

A
  • Value is at fixed address specified in instruction
39
Q

Describe indirect mode

A
  • Value is at fixed address that is in register

- Extra power relative to immediate and direct modes

40
Q

Describe index mode

A
  • Value is at fixed address plus index obtained from register
41
Q

What are immediate, direct, indirect and index modes all examples of

A

How ISAs allow instructions to access memory

42
Q

Benefits of Orthogonality

A
  • Simplifies code development
  • More powerful instructions
  • Fewer instructions required to do the same thing
43
Q

Drawbacks of Orthogonality

A
  • Chips need to be bigger and more complex
  • Slower if multiple memory access done in single instruction
  • Longer instructions if more operands
44
Q

What does CISC stand for

A

Complex Instruction Set Computer

45
Q

Describe CISC

A
  • No orthogonality
  • Lots of addressing modes desired for human programmers and adding BCD (Binary Coded Decimal)
  • Variable length instructions
46
Q

What does RISC stand for

A

Reduced Instruction Set Computer

47
Q

Describe RISC

A
  • Most instructions have three operands
  • Many registers
  • Often register-register and few addressing modes
48
Q

Benefit of RISC

A

More instructions done per second

49
Q

Drawback of RISC

A

More instructions needed for any task

50
Q

AX

A

Primary accumulator

51
Q

BX

A

Base accumulator

52
Q

CX

A

Counter

53
Q

AL/AH

A

Low and high bytes of AX

54
Q

SI

A

Source Index

55
Q

DI

A

Destination Index

56
Q

SP

A

Stack Pointer

57
Q

BP

A

Base Pointer

58
Q

RIP

A

Instruction pointer aka program counter

59
Q

rflags

A

Binary flags e.g. for comparisons

60
Q

Describe the flags register

A

64 bits, not available as general purpose register
Individual bits reflect execution of preceeding instruction
Conditional jumps executed based on these flags