New User Special Price Expires in

Let's log you in.

Sign in with Facebook


Don't have a StudySoup account? Create one here!


Create a StudySoup account

Be part of our community, it's free to join!

Sign up with Facebook


Create your account
By creating an account you agree to StudySoup's terms and conditions and privacy policy

Already have a StudySoup account? Login here

Computer Architecture

by: Nick Rowe

Computer Architecture CS 25000

Nick Rowe
GPA 3.68

Dongyan Xu

Almost Ready


These notes were just uploaded, and will be ready to view shortly.

Purchase these notes here, or revisit this page.

Either way, we'll remind you when they're ready :)

Preview These Notes for FREE

Get a free preview of these Notes, just enter your email below.

Unlock Preview
Unlock Preview

Preview these materials now for free

Why put in your email? Get access to more of this material and other relevant free materials for your school

View Preview

About this Document

Dongyan Xu
Class Notes
25 ?




Popular in Course

Popular in ComputerScienence

This 7 page Class Notes was uploaded by Nick Rowe on Saturday September 19, 2015. The Class Notes belongs to CS 25000 at Purdue University taught by Dongyan Xu in Fall. Since its upload, it has received 66 views. For similar materials see /class/208067/cs-25000-purdue-university in ComputerScienence at Purdue University.

Similar to CS 25000 at Purdue

Popular in ComputerScienence


Reviews for Computer Architecture


Report this Material


What is Karma?


Karma is the currency of StudySoup.

You can buy or earn more Karma at anytime and redeem it for class notes, study guides, flashcards, and more!

Date Created: 09/19/15
1 CS 250 Computer Architecture Midterm Exam October 25 2011 C10sed booknotesdiscussion TIME 90 minutes 800 PM 930 PM LOCATION PHYS 114 Sample Questions 10 True or False statements Sample statements are 1 f 5 bits are suf rynt to represent every state of the United States We 6 rt Wok 5 0 72784 2 T A demultiplexor has more output lines than input lines 3 i In both one s complement and signandmagnitude schemes there are two representations for zero 4 F In MIPS some Rtype instructions also access the data memory I0 We 7 2uc bn accexgaa do reWK 5 I In MIPS the 16 bit address eld of the beq instruction is treated as an i O 9 1 uns1gned1nteger j a j 61 f 114 6 In the simple MIPS processor the subset of datapath involved in the execution of an instruction can be predicted except the branching instructions 7 A stack grows from low address to high address 7 jZoud zm A717 maxa 0 My Mk 2 10 short QampA s Your answer to each question should have no more than three sentences Sample questions are 1 Name at least three hardware components inside the processor yaia fez 44 Medea sz quot 5 1 quot 2 Under two s complement what is the decimal value of binary number 1111 0000 What if this is a binary number under one s complement z w LmEK c372 w V W Jazzem 5 warW 5 3 What does the digital circuit below do lnpolS X Aof a E quot f0 1 mu j ZX Z 3 4 Translate the following C statement into MIPS assembly If x Y i j You can assume that the values of variables x y i and j are already in registers 1 2 10 20 respectively me am Me ado0 5501 990 sm 0 L390 Mel s add 20 2M SW 3620 f o 5 When the simple singlecycle MIPS processor executes instruction sw rt offsetrsrs instruction bits 25 21 rt bits 2016 what are the values of control signals RegDst RegWrite ALUSrc MemRead MemWrite and MemToReg Indicate the values in the gure Read Instruction address Si0139 39 Cane I 3255 2 Instruction MemRead 0 6 Highlight the subset of the MIPS datapath when executing instruction beq rs rt label assuming that the branch is taken Read Instmc on Memwme MemToReg address 3 3D Read Read address data Instruction memory 39 2 Write address Data memory MemRead write data 3 One digital circuit design problem Consider a singledigit full adder like the one on pp 28 of lecture notes Part 1 The full adder takes three inputs bit X bit Y and the carry in bit and generates two outputs sum of X and Y and the carry out bit 1 Show how to use three 3 of these single digit full adders to construct a three digit full adder Vekict ow 57 l S 0 BUTPWS 33 SI S 0 Cow HPU39TS 3 XZK I X 0 Ya Y Yo 2 We now use the three digit full adder constructed in 1 to perform addition operation between two threedigit signed integers represented under 2 s complement scheme What is the output of the threedigit full adder when computing 310 310 We call this an over ow situation because the sum 610 cannot be represented by three binary digits Please enhance the threedigit full adder to detect such an over ow You can show Your Zianges 2W gigam for1 Aquot verow yamy fa GM my 39g u I L I o 3 0 5 move a t e en f UaIA EJ norme Co f 3 u Cow 3103 3 c 75 oe fedoregfmg SIM oleJ an XOR gate as 5704 450 apple1272146 Gomez 3 In 2 if the two operands of the addition operation are of opposite signs namely one positive and the other one negative over ow will not happen Brie y explain why xvle foro 726wa m 4 c9f06Ji fgf 7M WenMe 71 WQJM MW MW 56 be enn WW0 WW hencew aWow MM o w zo 4 One MIPS assembly programming problem A recursive de nition of a function will be given and you will be asked to implement the recursive function in MIPS Study the factorial and Fibonacci examples in the lecture notes 5 One problem on simple singlecycle MIPS processor Sample problem The jump andlink instruction jal is used for making function calls in MIPS jal Label 0 M Epialra j 4M 0351 0 Before the function is called the return address PC4 will be written to ra namely 31 1 Modify the MIPS processor diagram on the next page to support the execution of jal 2 Highlight the subset of the modi ed datapath involved in the execution of jal 3 In the same situation as in 2 indicate in the same gure the values of control signals RegDst RegWrite PCSrc and MemToReg 9w mart9 k l39 07x i 39 h Read lnstnm on address 310 Instruction memory U a ea 0036wa WWW a 915 52 mm yWd z 3 PC 9098 2 Mem o 3quot 2 m 5mm Field size 6 bits25 26 bitsz 739 bits 6 bits 55 bits 6 bits 0 All MIPS instructions 32 bits I 39 mormat op rs rt rd shamt l funct Arithmetic instruction format J Hormat op rs rt addressimmediate Transfer branch imm format 5 eg 5 ht a Jformat op target address Jump instruction format 44g 2 FIGURE 226 MIPS instruction formats in this chapter Highlighted portions shew instruction formats introduced Category af am ggnggetigla if l ifcaMeaning aadrf test t2 bro 2 Elm r2 Arithmetic sub t0 tl t2 t0 tl t2 rem t0 tl t2 t0 tl t2 div t0 tl t2 t0 t1 t2 and t0 tl t2 t0 tl amp t2 Logical AND or t0 tl t2 t0 tl I t2 Logical OR Logical sll t0 tl t2 t0 tl ltlt t2 Shift Left Logical srl t0 t1 t2 t0 tl gtgt t2 Shift Right Logical sra t0 tl t2 t0 tl gtgt t2 Shift Right Arithmetic move t0 tl t0 tl Reg S er 36mg li t0 100 t0 100 1w 10 lOOtl t0 Memloo tl 4 bytes lb 10 100tl t0 Meml 00 tl 1 byte Da a Transfer sw t0 100tl Mem100 tl t0 4 bytes sb t0 lOOtI Mem100 tl t0 1 byte beq t0 11 Label if t0 tl go to Label bne tl tl Label if10 i tl go to Label bge t0 tl Label ift0 Z tl go to Label Branch bgt t0 tl Label ift0 gt tl go to Label ble t0 t1 Label ift0 S tl go to Label blt t0 tl Label ift0 lt tl go to Label slt t0 tl t2 if tl lt 12 then t0 i else t0 0 36 slti t0 11 100 ift1 lt 100 then t0 1 else t0 0 j Label go to Label Jump jr ra go to address in ra jal Label ra PC 4 go to Label The second source operand of the arithmetic logical and branch instructions may be a constant Register Conventions The caller is responsible for saving any ofthe following registers that it needs before invoking a function t0 t9 a0a3 v0v The callee is responsible for saving and restoring any ofthe following registers that it uses 50 57 s8fp sp ra Pointers in C Declarartion either char Charptr or char Chargarrayj for char c Dereference C Carrayl 0r c Cpointer Take address of cpoz39nter ampc


Buy Material

Are you sure you want to buy this material for

25 Karma

Buy Material

BOOM! Enjoy Your Free Notes!

We've added these Notes to your profile, click here to view them now.


You're already Subscribed!

Looks like you've already subscribed to StudySoup, you won't need to purchase another subscription to get this material. To access this material simply click 'View Full Document'

Why people love StudySoup

Steve Martinelli UC Los Angeles

"There's no way I would have passed my Organic Chemistry class this semester without the notes and study guides I got from StudySoup."

Jennifer McGill UCSF Med School

"Selling my MCAT study guides and notes has been a great source of side revenue while I'm in school. Some months I'm making over $500! Plus, it makes me happy knowing that I'm helping future med students with their MCAT."

Bentley McCaw University of Florida

"I was shooting for a perfect 4.0 GPA this semester. Having StudySoup as a study aid was critical to helping me achieve my goal...and I nailed it!"


"Their 'Elite Notetakers' are making over $1,200/month in sales by creating high quality content that helps their classmates in a time of need."

Become an Elite Notetaker and start selling your notes online!

Refund Policy


All subscriptions to StudySoup are paid in full at the time of subscribing. To change your credit card information or to cancel your subscription, go to "Edit Settings". All credit card information will be available there. If you should decide to cancel your subscription, it will continue to be valid until the next payment period, as all payments for the current period were made in advance. For special circumstances, please email


StudySoup has more than 1 million course-specific study resources to help students study smarter. If you’re having trouble finding what you’re looking for, our customer support team can help you find what you need! Feel free to contact them here:

Recurring Subscriptions: If you have canceled your recurring subscription on the day of renewal and have not downloaded any documents, you may request a refund by submitting an email to

Satisfaction Guarantee: If you’re not satisfied with your subscription, you can contact us for further help. Contact must be made within 3 business days of your subscription purchase and your refund request will be subject for review.

Please Note: Refunds can never be provided more than 30 days after the initial purchase date regardless of your activity on the site.