Intro Flashcards

(47 cards)

1
Q

Machine Cycle (3)

A

Fetch -> Decode -> Execute (loop)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q
  • Retrieve the instruction from memory
  • Increment the program counter
A

Fetch

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

Decode the bit pattern in the instruction register

A

Decode

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

Perform the instruction in the Instruction register

A

Execute

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

Each instruction is stored in memory as a __________

A

bunch of bits

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

The ___ decodes the bits to determine what should happen

A

CPU

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

Instructions are from a language called _______________

A

machine language

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

A/An _______ is a sequence of these simple instructions

A

executable program

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

The sequence is stored in ___________

A

memory

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

The CPU processes the simple instructions _________

A

sequentially

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q
  • This is what the computer actually sees and deals with
  • Every command is given as a number or sequence of numbers
A

Machine Language

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

The command numbers have been replaced by letter sequences which are easier to memorize

A

Assembly Language

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q
  • middle-level language
  • maps human-readable mnemonics to machine instructions
  • allows machine-level programming without writing in machine language
A

Assembly Language

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q
  • are there to make programming easier
  • allows you to describe the program in a more natural language
A

High-Level Language

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

Assembly gives you direct control of the system resources such as (3)

A
  • setting processor registers
  • accessing memory locations
  • interfacing with other hardware elements
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

Reasons NOT to use assembly (3)

A
  • development time
  • maintainability
  • portability
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
17
Q

Reasons to use assembly (8)

A
  • to understand how CPUs and compilers work
  • developing compilers, debuggers, and other tools
  • hardware drivers, system code and low level tasks
  • embedded systems
  • reverse engineering
  • address critical performance issues
  • creating/fighting malware
  • improve algorithm development skills
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
18
Q

a collection of the computer’s electrical lines where signals pass through

A

bus

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
19
Q
  • the computer’s processor
  • engine that interprets instructions stored in main memory
A

central processing unit

20
Q
  • a logic circuit in the CPU
  • responsible for performing mathematical and logical operators
A

arithmetic and logic unit (alu)

21
Q

a set of flip-flops treated as a single unit

22
Q

a digital logic circuit capable of storing a single bit

23
Q

temporary storage device that holds both a program and the data it manipulates

24
Q

can be accessed with all 64-bits or some portion or subset accessed

A

general purpose register (gpr)

25
register that is used to point to the current top of the stack
stack pointer register (rsp)
26
register that is used as a base pointer during function calls
base pointer register (rbp)
27
register that is used by the cpu to point to the next instruction to be executed
instruction pointer register (rip)
28
register used for status and cpu control information
flag registers (rflags)
29
what does a little-endian architecture mean
- least significant byte is stored in the lowest memory address - most significant byte is stored in the highest memory location
30
general memory layout
stack heap BSS data text reserved
31
where the machine language is stored
text (code)
32
where the initialized data is stored
data
33
where uninitialized declared variables are stored
BSS
34
where dynamically allocated data will be stored
heap
35
starts in high memory and grows downward
stack
36
what is the goal of a memory hierarchy
balance performance with cost
37
all initialized variables and constants are placed in this section
section .data
38
all uninitialized variables are placed in this section
section .bss
39
includes some headers or labels that define the initial program entry point
section .text
40
modifies the original C program according to directives that begin with the # character
preprocessing
41
translates the output text file of the pre-processor into a text file which contains an assembly language program
compilation
42
translates compiler output to machine language instructions, generating a relocatable object program
assembly
43
handles the merging of other necessary precompiled object files with the assembler's output, generating an executable file
linking
44
program that will read an assembly language input file and convert the code into a machine language binary file
assembler
45
combines one or more object files into a single executable file
linker
46
will load the program from secondary storage into primary storage
loader
47
- used to control execution of a program - allows for testing and debugging activities to be performed
debugger