CS 271 - Intro to Computer Architectures (Module 1)

0.0(0)
studied byStudied by 0 people
0.0(0)
full-widthCall Kai
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
GameKnowt Play
Card Sorting

1/71

encourage image

There's no tags or description

Looks like no tags are added yet.

Study Analytics
Name
Mastery
Learn
Test
Matching
Spaced

No study sessions yet.

72 Terms

1
New cards

Assembly Language programs are 'higher level' than C programs. (T/F)

False

Assembly Language programs are lower level than C program. A C program will compile into assembly on its way to Machine Code.

2
New cards

(True/False) Assembly Language instructions have a nearly 1:1 correspondence with Machine Code.

True

Some Assembly Languages and architectures have a 1:1 correspondence from Assembly to Machine.

3
New cards

(True/False) A single computer architecture may have programs written for it using more than one Assembly Language (x86, RISC-V, ...).

False

An Assembly Language is defined by an ISA (Instruction Set architecture), and is the only Assembly Language defined for that computer architecture.

4
New cards

(True/False) A single computer architecture may have programs written for it using more than one assembler (MASM, NASM, FASM, ...)

True

Different assemblers give software developers different capabilities in the way their assembly language programs are written, assembled, and debugged. MASM and NASM can both be used to author x86 Assembly for IA32 processors, for example. Assemblers have a many-to-one correspondence to assembly languages; that is, even though there is only one assembly language for a particular ISA, there may be several assemblers available to choose from.

5
New cards

What is an instruction?

An instruction is a control phrase for the computer which will be translated (with its operands) into a op code (Machine Language)

6
New cards

(True/False) High-level language (HLL) programs are portable to a variety of computer architectures.

True

HLL programs require compilers to create architecture-specific code.

7
New cards

(True/False) Assembly Language programs are portable to a variety of computer architectures.

False

Assembly Languages are architecture-specific.

8
New cards

System Endianness

Impacts the ordering of BYTEs in memory for data types consisting of more than 1 BYTE.

9
New cards

Little-Endian

The least significant BYTE is stored at the lowest memory address.

10
New cards

Big-Endian

The most significant BYTE is stored at the lowest memory address.

11
New cards

What are the smallest and largest values which can be represented with an unsigned DWORD

Smallest: 0

Largest: 232-1 = 4,294,967,295

12
New cards

What are the smallest and largest values which can be represented with an signed SDWORD

Smallest: -2^31 = 2,147,483,648

Largest: 2^31-1 = 2,147,483,647

13
New cards

How many bytes does it take to represent the following set of characters in ASCII: HELLO

Five.

One byte per ASCII character, five ASCII characters.

14
New cards

How many bits are there in 35 MB (note: bytes, so binary prefixes apply)

293,601,280 bits35 220 Bytes 8 bits/Byte = 36,700,160‬ Bytes * 8 bits / Byte = 293,601,280 bits

15
New cards

Define "Bus"

A set of parallel "wires" for transferring a set of electrical signals simultaneously.

16
New cards

What is the Address Bus used for?

To communicate a specific memory location for reads or writes, e.g. Read from "this address on the address bus"

17
New cards

Which register holds the opcode of current instruction being executed?

IR - Instruction Register

18
New cards

Which register points to the address of the next instruction to be executed?

IP - Instruction Pointer (EIP in IA32)

19
New cards

Which register holds the current machine instruction?

The Instruction Register (IR)

20
New cards

Which register holds the current micro-instruction?

The Control Register

21
New cards

What is the main purpose of caching?

Moving information from slower storage to faster storage, where it can be accessed more quickly.

22
New cards

In a vonNeumann architecture, how are programs organized?

Programs are stored in memory and executed according to an instruction execution cycle.

23
New cards

On a computer, where is simple integer math computed?

ALU - Arithmetic/Logic Unit

24
New cards

What component's primary duty is synchronizing processes inside a computer?

System clock

25
New cards

What storage unit is the closest/fastest on the chip?

Registers

26
New cards

How is data pulled from memory?

First, the address where the data resides is put in MAR, then on the address bus, then a 'memory read' is triggered and the data is pulled from that particular memory cell, put on the data bus, and then into the MDR.

27
New cards

What would you call an ordered list of organized instructions existing somewhere in memory, and associated with a data structure for storage of data?

A program!

28
New cards

Where is a major data transfer bottleneck in a computer, and what helps resolve it?

The data bus, because both the program instructions and the data must be retrieved from the same memory to be executed or used. Caching helps reduce the impact.

29
New cards

Place the following steps of the instruction execution cycle into the proper order

Fetch the instruction at the address in the Instruction Pointer into the Instruction Register.

Increment the Instruction Pointer to point to next instruction's address.

Decode the instruction in the Instruction Register.

If the instruction requires memory access, determine the memory address, and fetch the operand from memory into a CPU register, or send the operand from a CPU register to memory.

Execute the instruction.

Store resultant operands.

30
New cards

Why does protected mode prevent programs from changing the EIP register directly?

EIP contains the memory address of the next instruction to be fetched. Since the programmer ordinarily will not know the absolute address where any of the instructions are stored, protected mode restricts access to EIP, and allows it to be changed only by the operating system.

31
New cards

What is the width of the address and data buses?

32 bits

32
New cards

What is the size of the general-purpose registers?

32 bits

33
New cards

Name at least four CPU status flags.

Carry, Overflow, Parity, Auxiliary Carry, Sign, Zero

34
New cards

In 32-bit mode, aside from the stack pointer (ESP), what other register points to stack addresses?

Stack Segment (SS), possibly EBP depending on usage

35
New cards

Which flag is set when an arithmetic or logical operation generates a negative result?

Sign Flag

36
New cards

Which flag is set when the result of an unsigned arithmetic operation is too large to fit into the destination?

Carry Flag

37
New cards

Which flag is set when the result of a signed arithmetic operation is either too large or too small to fit into the destination?

Overflow Flag

38
New cards

If the AH register is modified by the software engineer, is there any change in the EAX register? Why or why not?

Yes, the AH register is part of the EAX register. Specifically, the bits 0-7 of the AH are exactly bits 8-15 of EAX.

39
New cards

What best describes the relationship from assembly language instructions to machine language instructions?

nearly one to one

40
New cards

Language Hierarchy: The purpose of a Compiler is to...

Convert High/Low level Program Code to Assembly/Machine Code

41
New cards

The linker combines object files into an executable file.

True

42
New cards

What type of tool can convert ARM Assembly to x86 Assembly?

Cross Assembler

43
New cards

What is the range of decimal values for an unsigned DWORD?

0 to 4,294,967,295

44
New cards

The ASCII code values for alphabetic letters (e.g. 'a') are smaller than for decimal digits (e.g. '1').

False

45
New cards

How many bytes long is a QUADWORD on x86 systems?

8

46
New cards

The two's complement of a binary value is formed by which process?

reversing (inverting) the bits and adding 1

47
New cards

How many bits long is a WORD on x86 systems?

16

48
New cards

How many binary digits are represented by a series of 4 hexadecimal characters?

16

49
New cards

What are components of the Control Unit?

Instruction Pointer

Instruction Register

Status Register

50
New cards

The CPU clock cycle length is the only contributing factor to the speed of operations on a computer.

False

51
New cards

During which phase of the instruction execution cycle is the instruction pointer incremented?

fetch

52
New cards

Please place the following steps of the instruction execution cycle in their proper order. Step 1 is?

Fetch the instruction at the address in the Instruction Pointer into the Instruction Register

53
New cards

Please place the following steps of the instruction execution cycle in their proper order. Step 2 is?

Increment the instruction pointer to point to the next instruction.

54
New cards

Please place the following steps of the instruction execution cycle in their proper order. Step 3 is?

Decode the instruction in the instruction register

55
New cards

Please place the following steps of the instruction execution cycle in their proper order. Step 4 is?

If the instruction requires memory access, determine the memory address, and fetch the operand from memory into a CPU register, or send the operand from a CPU register to memory

56
New cards

Please place the following steps of the instruction execution cycle in their proper order. Step 5 is?

Execute the instruction

57
New cards

Please place the following steps of the instruction execution cycle in their proper order. Step 6?

If the output operand is in memory, the control unit uses a write operation to store the data.

58
New cards

The status flags are implemented as individual bits within the Status Register.

True

59
New cards

What is the size of the EAX register?

32 bits

60
New cards

What is the size of the AX register?

16 bits

61
New cards

What is the size of the AH register?

8 bits

62
New cards

Which Operation Mode provides compatibility for legacy 8086 programs?

Real-Address mode

63
New cards

What is the name of the lowest 8 bits of the EDX register?

DL

64
New cards

The datatype of BYTE is what?

8-bit unsigned integer

65
New cards

The datatype of WORD is what?

16-bit unsigned integer

66
New cards

The datatype of SWORD is what?

16-bit signed integer

67
New cards

The datatype of DWORD is what?

32-bit unsigned integer

68
New cards

The datatype of SDWORD is what?

32-bit signed integer

69
New cards

The datatype of REAL4 is what?

32-bit IEEE short real

70
New cards

The datatype of REAL8 is what?

64-bit IEEE long real

71
New cards

What does AL refer to (8 bit register references)

Bits 0-7 of EAX

72
New cards

What does DH refer to (8 bit register references)

Bits 8-15 of EDX