High Level Architecture Flashcards

To learn computer parts

1
Q

What does a computer consist of?

A
  • Central Processing Unit (CPU)
  • System Clock
  • Primary Clock (RAM)
  • Secondary Memory (HDD)
  • Peripheral input and output devices (keyboard & mouse)
  • Bus (Parallel wires to connect everything)
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What does the CPU do?

A
  • is the “brain” of the computer
  • Executes instructions
  • Controls the transfer of data across the bus
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What 3 main parts does a CPU consist of?

A
  • Control Unit (CU)
  • Arithmetic Logic Unit (ALU)
  • Registers
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What does the Control Unit do?

A
  • Directs execution from instructions by loading an operation code (opcode) from primary memory into the Instruction Register
  • Decodes opcode to identify the operation
  • If needed, transfers data between primary registers and memory
  • If needed, directs ALU to operate on data in registers
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

What does the ALU do?

A
  • Preforms arithmetic and logical operations on data stored in registers
  • Examples include adding numbers stored in 2 source registers and storing them in a third, destination register or using 2 source registers for bitwise AND
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

What are registers?

A
  • Binary storage units within the CPU
  • May contain data, addresses, Instructions and Status Info
  • Examples: General purpose registers to hold data and addresses
  • Program Counter (PC) register contains the address in memory of the currently executing instruction, is incremented to execute next instruction
  • Status Register(SR) contains information(flags) about the result of a previous instruction
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

How does the System Clock work?

A
  • Generates a clock signal to synchronize the CPU and other clocked devices by using a square wave at a particular frequency. Devices are synched using the rising or falling edges of the wave.
  • Example 2016 iMac has 3.2GHz
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

What is primary memory?

A
  • Often called RAM
  • Any byte in Memory can be directly accessed if you know its address
  • Can be written to and read from
  • Is said to be volatile (data disappears when powered off)
  • Is used to store program instructions and data(variables)
  • Consists of a sequence of addressable memory locations
  • Each location is typically one byte long
  • von Neumann Architecture contains both data and programs (instructions)
  • Harvard Architecture uses separate memories for data and programs
    Example Sizes: iMac 2016 8GB
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

What do busses do?

A
  • Is a set of parallel data/signal lines
  • Is used to transfer information between computer components
  • Often subdivided into address, data and control boxes
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

What does the Address Bus do?

A
  • Specifies a memory location in RAM or sometimes a memory - mapped I/O device
  • basically specifies where to transfer data
  • common sizes are 32 and 64 bit
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

What does the Data Bus do?

A
  • Used for bidirectional data transfer between locations in the architecture
  • Common sizes 23 and 64 bytes per bit
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

What does the Control bus do?

A
  • Used to control or monitor devices connected to the bus
  • this manages the information flow between components indicating whether the operation is a read or a write and ensuring that the operation happens at the right time.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

What does secondary memory do?

A
  • Is used to hold a computer’s file system (stores files containing programs or data)
  • Is non-volatile read/write memory (Its contents persist through a power cycle)
  • Usually embodied on a hard disk drive(HDD)
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

What do peripheral I/O devices do?

A
  • Allow communication between the computer and the external environment
  • Input examples: joystick, mic, scanner
  • Output examples: speakers, printers
  • I/O examples: Modem, connections to networks
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

How does accumulator-based architecture work?

A
  • Register for short term, intermediate storage of arithmetic and logic data in a computer’s CPU
  • accumulator can be loaded from or stored to RAM
  • Operands for an instruction come from the accumulator and a single location in RAM
  • ALU results are always stored in ACC
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

How does register-based architecture work?

A
  • Only load and store instructions can access RAM
  • Other instructions operate on specified registers in the register file, not on RAM
  • Registers are more quickly accessed than RAM, so this is faster than accumulator (allows instructions to run in parallel)
17
Q

What is the typical program sequence for register-based architecture?

A
  • Load registers from primary memory

- Execute an instruction using 2 source registers, putting the result back into the memory

18
Q

What is important about the RISC Architecture?

A
  • stands for: Reduces instruction set computer
  • uses only simple instructions that can be executed in one machine cycle
  • Enables faster clock rates and thus faster overall execution
  • makes programs larger, more complex
  • Machine instructions are always the same size (makes decoding faster and simpler)
19
Q

What is important about the CISC Architecture?

A
  • stands for Complex Instruction Set Computer
  • May have instructions that take many cycles to execute (easier for programmers but slows down execution speed)
  • Machine operations may vary in length and may be followed by immediate data (makes data difficult and slow to decode)
20
Q

What is the instruction cycle?

A
  • AKA the fetch-execute or fetch-decode-execute cycle
  • The process of the CPU executing instructions in a series of small steps
    1) Fetch instruction from memory into the instruction register(IR) - the program counter register(PC) contains its address
    2) Increment PC to point to the next instruction
    3) Decode the instruction
    4) If the instruction uses an operand in RAM calculate its address
    5) Fetch the operand
  • repeat last 2 steps if necessary
    6) Executes the instruction
    7) If the instruction produces a result that is stored in RAM, calculate its address
    8) Store the result
  • repeat last 2 steps if necessary
21
Q

What does each armv8 statement consist of?

A
  • An opcode and variable number of operands
  • optional labels can proceed the statement
  • pseudo opcodes can be aligned with opcodes
  • comments come after
22
Q

How does an assembler work?

A
  • Translates assembly source code into machine code
  • we use GNU (contains gcc compiler suite)
  • to assemble source code use gcc my-dog.s -o myprog
  • gcc invokes the assembler as, then links the code producing an executable called my-dog
  • Assumes files in .s contain assembly source code