Notes, summaries, assignments, exams, and problems for University

Sort by
Subject
Level

MIPS Architecture and Procedure Calls

Classified in Computers

Written on in English with a size of 3.74 KB

What is a Basic Block?

A basic block is a sequence of instructions with no embedded branches (except at the end) and no branch targets (except at the beginning). A compiler identifies basic blocks for optimization. An advanced processor can accelerate the execution of basic blocks.

Six Steps Involved in Procedure Calling

  1. Place parameters in registers.
  2. Transfer control to the procedure.
  3. Acquire storage resources.
  4. Perform the desired operation.
  5. Place the result in a register for the caller.
  6. Return to the point of origin.

Register Saving Responsibilities

Between the caller and callee, the responsibility for saving registers is as follows:

  • Temporary registers ($t*): Can be overwritten by the callee.
  • Saved temporary registers ($s*): Saved and restored by the
... Continue reading "MIPS Architecture and Procedure Calls" »

MIPS Code Examples and Register Optimization

Classified in Computers

Written on in English with a size of 3.4 KB

Code in MIPS to add the 4 integer variables: a, b, c, d.

Add e,a,b # a gets b+c or a,b,c # a gets b+c

Add e,e,c # a gets a+dor a,a,c, # a gets a+d

Add e,e,d # a gets a+ eor a,a,e # a gets a+e

Code in MIPS for: f = (g + h) ‐ (i + j);

or #f,.., j are mapped to $s0, ., $s4
add t0,g,h #temp t0=g+hadd $t0,$s1,$s2

add t1,i,j #temp t1=i+jadd $t1,$s3,$s4

sub f,t0,t1 #f=t0-t1sub $s0,$t0,$t1

Why the size of a register is 32 bit?

32 bit occurs frequently and thus in MIPS, it has a special name ‘word’. Size 32 aligns well with the MIPS instruction format.

‘MIPS is Big Endian’ – what does it mean?

Most significant byte at least address of a word.

What are lw and sw instructions used for?

MIPS data transfer instructions with an address to access particular... Continue reading "MIPS Code Examples and Register Optimization" »

Economics Basics

Classified in Economy

Written on in English with a size of 3.42 KB

Supply and Demand

Factors Affecting Demand

  • Price
  • Personal Income
  • Price of Related Goods (Substitutes and Complements)
  • Tastes
  • Expectations
  • Technology
Profit Margin = (Price of Coffee) - (Cost to Produce)

Factors Affecting Supply

  • Price of Good/Service
  • Price of Production Factors
  • Price of Related Goods
  • Technology
  • Expectations

Percentage Change Calculation

Percentage Increase/Decrease = (New Value - Old Value) / Old Value * 100%

Price Elasticity of Demand

Price Elasticity of Demand = (% Change in Demand) / (% Change in Price)

  • Always negative.
  • Less than 1 = Inelastic
  • More than 1 = Elastic

Price Elasticity of Supply

Price Elasticity of Supply = (% Change in Supply) / (% Change in Price)

  • Less than 1 = Inelastic
  • More than 1 = Elastic

Income Elasticity of Demand

Income Elasticity

... Continue reading "Economics Basics" »

The Two-Party System: Origins and Ideologies of Democrats and Republicans

Classified in History

Written on in English with a size of 4.29 KB

ORIGINS, HISTORY & IDEOLOGY OF REPUBLICAN AND DEMOCRATIC PARTIES

COMMON GROUND: REPUBLICANISM

A form of government where leaders are elected for a specific period by citizens. Key concepts include the importance of civic virtue, universal political participation, separation of powers (to avoid corruption), and political liberty.

First Political Division: The Constitution

The first political division centered around the Constitution, highlighting the differences between Federalists and Anti-Federalists.

JEFFERSON OR HAMILTON?

At the root of two different visions regarding government and politics are two founding fathers and their views:

  1. Jeffersonian View (3rd US President): Rejected the European path, favoring an agrarian democracy of small proprietors
... Continue reading "The Two-Party System: Origins and Ideologies of Democrats and Republicans" »

DNA Structure, Transcription, and Translation Explained

Classified in Biology

Written on in English with a size of 2.87 KB

Deoxyribonucleic acid, or DNA, is a molecule that contains the instructions an organism needs to develop, live, and reproduce. These instructions are found inside every cell and are passed down from parents to their children.

Structure of DNA

DNA is made up of molecules called nucleotides. Each nucleotide contains a phosphate group, a sugar group, and a nitrogen base. The four types of nitrogen bases are adenine (A), thymine (T), guanine (G), and cytosine (C). The order of these bases is what determines DNA's instructions, or genetic code. Human DNA has around 3 billion bases, and more than 99 percent of those bases are the same in all people, according to the U.S. National Library of Medicine (NLM).

Similar to the way the order of letters in... Continue reading "DNA Structure, Transcription, and Translation Explained" »

Using Technology to Enhance Reading and Learning in Education

Classified in Language

Written on in English with a size of 3.23 KB

Proposal Example

Introduction

This proposal suggests ways teachers can use technology to get children reading. The aim of this proposal is to suggest a new way for teachers to integrate technology into their classrooms to foster a love of reading.

Current Situation

It is a fact that children are now spending more time on digital devices, browsing the internet, messaging friends, etc. It is also a fact that they are reading fewer books. This matters because reading books is known to improve:

  • Focus and memory
  • Vocabulary
  • Communication skills
  • Analytical thinking

So how can we use students' enthusiasm for digital devices to encourage them to read more?

Possible Solutions

First of all, we suggest that teachers actively encourage students to use the internet... Continue reading "Using Technology to Enhance Reading and Learning in Education" »

Essential Cisco IOS Commands for Network Setup

Classified in Training and Employment Advise

Written on in English with a size of 5.9 KB

Initial Device Naming and Setup

1. Set Device Hostnames

Assign unique hostnames to your network devices for easy identification. In this example, we name the switch ALS and the router HQ.

Switch Configuration (ALS)

Switch> enable
Switch# configure terminal
Switch(config)# hostname ALS
ALS(config)#

Router Configuration (HQ)

Router> enable
Router# configure terminal
Router(config)# hostname HQ
HQ(config)#

Basic Security Hardening

2. Encrypt Passwords

Use the service password-encryption command to encrypt all plaintext passwords in the running configuration.

ALS(config)# service password-encryption

3. Set a Secure Enable Password

Configure a strong, encrypted password for privileged EXEC mode using enable secret.

ALS(config)# enable secret adap$$1

4.

... Continue reading "Essential Cisco IOS Commands for Network Setup" »

Understanding Metamorphic Rocks and Map Scale

Classified in Geology

Written on in English with a size of 1.29 KB

The Formation of Minerals

The atoms will come apart, change themselves, and then form a new mineral.

Types of Metamorphic Rocks

Metamorphic rocks are divided into two categories: foliated and non-foliated. Be able to determine which rock is foliated and which is not.

Foliated Rocks

Foliated rocks are patterned rocks where you can see changes in the rock.

Non-foliated Rocks

Non-foliated rocks are solid color rocks.

Size, Shape, Site, Shadow, Texture, Pattern, Association, Tone.

Understanding Maps

Map: A representation usually on a flat surface of the whole or a part of an area.

Scale: Map Scale = Map distance/Earth distance

Be able to give a U.S.P.L.S. description of certain features/locations.

From the left to the right.

R7E, T14S, Sec.1, NE, SW, SE.

Deep Ocean Discoveries and Marine Life Insights

Classified in Geology

Written on in English with a size of 6.7 KB

Understanding the Deep Ocean: Vessels and Instruments

Oceanographic Vessels

Conshelf

Conshelf: A diver who lives and operates both inside and outside a submarine refuge for an extended period.

Alvin

Alvin: A manned deep-ocean research submersible owned by the United States Navy and operated by the Woods Hole Oceanographic Institution (WHOI) in Woods Hole, Massachusetts.

Aluminaut

Aluminaut: The world's first aluminum submarine. This experimental vessel, an 80-ton, 15.5-meter (51 ft) manned deep-ocean research submersible, was built by Reynolds Metals Company to promote the utility of aluminum.

Essential Oceanographic Instruments

Water Bottle

Water Bottle: A container used to hold water, liquids, or other beverages for consumption.

Reversing Thermometer

Reversing

... Continue reading "Deep Ocean Discoveries and Marine Life Insights" »

Exploring Oceanography: Tools and Techniques

Classified in Geology

Written on in English with a size of 3.67 KB

Echo sounding: is a type of sonar used to determine the depth of water by transmitting sound waves into water.

Trieste: is a city and a seaport in northeastern Italy. What is Trieste famous for? In the 19th century the monarchy was one of the Great Powers of Europe and Trieste was its most important seaport.

Deep sea winch: Fishing rod, mechanism

drift bottle : a bottle containing a record of the time and place at which it was set adrift in the ocean for supplying when recovered data to aid in determining the circulation of surface waters in the ocean

drogue: a device, typically conical or funnel-shaped with open ends, towed behind a boat, aircraft, or other moving object to reduce speed or improve stability.

Swallow Float: A tubular buoy used to... Continue reading "Exploring Oceanography: Tools and Techniques" »