100% satisfaction guarantee Immediately available after payment Both online and in PDF No strings attached
logo-home
CS 250 Midterm 2 Correct Answers Latest Update $12.99
Add to cart

Exam (elaborations)

CS 250 Midterm 2 Correct Answers Latest Update

 1 view  0 purchase

CS 250 Midterm 2 Correct Answers Latest Update

Preview 2 out of 12  pages

  • October 23, 2024
  • 12
  • 2024/2025
  • Exam (elaborations)
  • Questions & answers
All documents for this subject (4)
avatar-seller
Schoolflix
Solution 2024/2025
Pepper

CS 250 Correct Answers Latest Update

IEEE float ANS✔✔ +/- 1.YYYYYY * 2^(exp - 127)

1 bit sign, 8-bit exp, 23-bit mantissa (Y)



memory layout ANS✔✔ stack - local

heap - dynamic (new/malloc)

data - global

text - instructions

note - if you malloc, the pointer is on the stack; the thing it points to is in
the heap



ISA ANS✔✔ instruction set architecture

"contract between hardware and software"

specifies WHAT - what instructions? how many registers?



microarchitecture ANS✔✔ how you implement ISA in hardware



Von Neumann ANS✔✔ fetch -> decode -> read -> execute -> write -> next



program counter ANS✔✔ memory address of current instruction



register ANS✔✔ data storage on processor for fast operations

, Solution 2024/2025
Pepper
MIPS format ANS✔✔ 6-bit opcode, 26-bit operand

I-type, J-type, R-type

rd, rs, rt except for sw



stack pointers ANS✔✔ used to specify stack frame of a procedure call -->
every time you JAL (before calling and/or when called)

addi $sp, $sp, -(# of things saved * 4)

sw $reg, x($sp)

DO THINGS

lw $reg, x($sp)

addi $sp, $sp, +(# of things * 4)

basically mirror image



RISC ANS✔✔ reduced instruction set architecture

simplified (limited?) set of instructions to make implementation & compiling
easier

MIPS is a RISC



some logic stuff:

MUX

decoder

tri-state

register file ANS✔✔ MUX - 2^x inputs + x-bit selector --> output 1 thing

decoder - x-bit input, 2^x outputs, only xth is 1

tri-state - output 0, 1, or Z (no-effect) --> use with a decoder

The benefits of buying summaries with Stuvia:

Guaranteed quality through customer reviews

Guaranteed quality through customer reviews

Stuvia customers have reviewed more than 700,000 summaries. This how you know that you are buying the best documents.

Quick and easy check-out

Quick and easy check-out

You can quickly pay through credit card or Stuvia-credit for the summaries. There is no membership needed.

Focus on what matters

Focus on what matters

Your fellow students write the study notes themselves, which is why the documents are always reliable and up-to-date. This ensures you quickly get to the core!

Frequently asked questions

What do I get when I buy this document?

You get a PDF, available immediately after your purchase. The purchased document is accessible anytime, anywhere and indefinitely through your profile.

Satisfaction guarantee: how does it work?

Our satisfaction guarantee ensures that you always find a study document that suits you well. You fill out a form, and our customer service team takes care of the rest.

Who am I buying these notes from?

Stuvia is a marketplace, so you are not buying this document from us, but from seller Schoolflix. Stuvia facilitates payment to the seller.

Will I be stuck with a subscription?

No, you only buy these notes for $12.99. You're not tied to anything after your purchase.

Can Stuvia be trusted?

4.6 stars on Google & Trustpilot (+1000 reviews)

53340 documents were sold in the last 30 days

Founded in 2010, the go-to place to buy study notes for 14 years now

Start selling
$12.99
  • (0)
Add to cart
Added