Written by students who passed Immediately available after payment Read online or as PDF Wrong document? Swap it for free 4.6 TrustPilot
logo-home
Document preview thumbnail
Preview 2 out of 10 pages
Exam (elaborations)

CSE 2421 Final Exam Review | Verified with 100% Correct Answers

Document preview thumbnail
Preview 2 out of 10 pages

CSE 2421 Final Exam Review | Verified with 100% Correct Answers A 64 bit register the CPU uses to put addresses for memory accesses on the address bus Memory Address Register (MAR) A 64 bit register which the CPU uses to put data on the data bus for writes, or to retrieve data from the data bus for reads from memory Memory Data Register (MDR) A collection of intertwined hardware and systems software that must cooperate in order to achieve the ultimate goal of running application programs System A directive needed by the linker for symbol resolution, followed by the name of the function .globl A logic element that does not store state, the output depends only on the current input Combinatorial Logic Element A logic element that is capable of storing state, has memory and can store prior states Sequential (clocked) Logic Element A method of optimizing a processor by predicting what instructions will be computed next Speculative execution A requirement of the x86-64 ABI, should be satisfied prior to any call. stack alignment A value too large for representation overflow A value too small to be represented, not as serious because it's comparable to a loss of precision, which can be approximated by zero. underflow Address displacement syntax displacement (src, index, scale) Adds first argument to second argument add Allows a name to be assigned to the assembly language source code file .file Arithmic logic unit, sets the condition flags ALU .byte data size 1 byte (8 bits) Changes or sets the current section to the data section .data Changes or sets the current section to the text (or code) section .text changing a given bit pattern to a related one Data Transformation chips that reside on the motherboard Controller Computes address math, does not touch memory or affect condition codes lea Computes bitwise NOT not Computes bitwise OR or Computes bitwise XOR xor Computes biwise AND and Data called by the program that is likely to be called again, EX: indexes in for loops Temporal Locality Do displacements require dollar signs? No Does the stack grow towards higher or lower addresses? Lower Dynamic Ram, slow memory dense needs constant refresh DRAM faster than addq one inc faster than subq one dec Holds static variables in the file scope Heap How do you access a member of a structure? use leaq to find the address, imulq may be needed How do you access an array that is a member of a structure? use leaq to find the address, displacement is needed for index How do you allocate space on the stack? Subtract from rsp How do you call malloc in assembler? put size in rdi and call malloc How do you go to the value that a memory expression points to in x86-64 ASM? Use () (this is a memory reference) How does call figure out what the return address is? call pushes the return address of the next call instruction How does lea compute addresses? lea uses displacement(base,index,scale) formula How does someone allocate space on the stack? Move the stack pointer (subq $40, %rsp) How many registers are in a 64 bit architecture? 16 If a particular piece of data is accessed, nearby addresses are also likely to be accessed. Ex: arrays Spatial Locality If we don't ______, we don't know what. Measure If we don't ______, we don't know where. Profile In what order are multidimensional (nested) arrays created? Row major order increment a register inc Keeps track of what instruction being executed Program Counter (PC) Keyboards, mouse, etc I/O Devices Larger memory sizes take more time to access and vice versa. Memory Hierarchy .long data size 4 bytes Memory that can maintain its value without power Non-Volatile Memory Moves a value onto the stack, subtracts quad value to rsp push moving data from one system component to another, or within a given component Data Movement movq %rsp, %rbp; pop %rbp leave Needed by the linker to identify the label as one associated with a function, as opposed to data .type Needed by the linker to identify the size of the text for the program .size older version of call, not really all that useful because it's slower than other instructions that do the same thing enter opcode conditional move cmov opcode for unconditional jump jmp opcode to jump when equal je opcode to jump when not equal jne opcode to move and sign extend as it moves movs opcode to move and zero extend as it moves movz opcode to move data from one register to another mov opcode to shift in the sign bit sar opcode to shift left shl opcode to shift right shr opcode to shift right, add in 0's shr Parameter order for registers rdi, rsi, rdx, rcx, r8, r9 Pluggable slot on the motherboard Adapter .quad data size 8 bytes Registers that push values to the stack to be used later callee-saved register Removes a value from the stack, adds quad value to rsp pop Scratch pad register that will get trashed at function calls

Content preview

CSE 2421 Final Exam Review



A 64 bit register the CPU uses to put addresses for memory accesses on the address
bus
Memory Address Register (MAR)

A 64 bit register which the CPU uses to put data on the data bus for writes, or to retrieve
data from the data bus for reads from memory
Memory Data Register (MDR)

A collection of intertwined hardware and systems software that must cooperate in order
to achieve the ultimate goal of running application programs
System

A directive needed by the linker for symbol resolution, followed by the name of the
function
.globl

A logic element that does not store state, the output depends only on the current input
Combinatorial Logic Element

A logic element that is capable of storing state, has memory and can store prior states
Sequential (clocked) Logic Element

A method of optimizing a processor by predicting what instructions will be computed
next
Speculative execution

A requirement of the x86-64 ABI, should be satisfied prior to any call.
stack alignment

A value too large for representation
overflow

A value too small to be represented, not as serious because it's comparable to a loss of
precision, which can be approximated by zero.
underflow

Address displacement syntax
displacement (src, index, scale)

Adds first argument to second argument
add

, Allows a name to be assigned to the assembly language source code file
.file

Arithmic logic unit, sets the condition flags
ALU

.byte data size
1 byte (8 bits)

Changes or sets the current section to the data section
.data

Changes or sets the current section to the text (or code) section
.text

changing a given bit pattern to a related one
Data Transformation

chips that reside on the motherboard
Controller

Computes address math, does not touch memory or affect condition codes
lea

Computes bitwise NOT
not

Computes bitwise OR
or

Computes bitwise XOR
xor

Computes biwise AND
and

Data called by the program that is likely to be called again, EX: indexes in for loops
Temporal Locality

Do displacements require dollar signs?
No

Does the stack grow towards higher or lower addresses?
Lower

Dynamic Ram, slow memory dense needs constant refresh

Document information

Uploaded on
April 7, 2026
Number of pages
10
Written in
2025/2026
Type
Exam (elaborations)
Contains
Questions & answers
$21.99

Wrong document? Swap it for free Within 14 days of purchase and before downloading, you can choose a different document. You can simply spend the amount again.
Written by students who passed
Immediately available after payment
Read online or as PDF

Seller avatar
Reputation scores are based on the amount of documents a seller has sold for a fee and the reviews they have received for those documents. There are three levels: Bronze, Silver and Gold. The better the reputation, the more your can rely on the quality of the sellers work.
NurseHenny
4.4
(31)
Sold
173
Followers
75
Items
2088
Last sold
1 week ago



Why students choose Stuvia

Created by fellow students, verified by reviews

Quality you can trust: written by students who passed their tests and reviewed by others who've used these notes.

Didn't get what you expected? Choose another document

No worries! You can instantly pick a different document that better fits what you're looking for.

Pay as you like, start learning right away

No subscription, no commitments. Pay the way you're used to via credit card and download your PDF document instantly.

Student with book image

“Bought, downloaded, and aced it. It really can be that simple.”

Alisha Student

Working on your references?

Create accurate citations in APA, MLA and Harvard with our free citation generator.

Working on your references?

Frequently asked questions