Due date Delivery method
Upload your program to Canvas prior to the due date and time. The filename will
This assignment is worth 10 points, 3 points per part, plus 1 point for style which includes,
but is no
Exam 2, vers. A - Physics 1110 Fall 2016
NAME(print) I K 3. y
Student ID #
TA 8 Name(CirCle one): Adam Higuera, Albert Schmitz, Blair Seidlitz, Bradley Pearlman,
Camila Uzcategui, Daniel Hackett, Daniel Steckhahn, Joel Venzke, Loren Hough, Nicholas Pell
1 of 15
Consider the vectors V1 and V2 shown. What is the direction of V = V2 V1 ,
V1 + V = V2
direction of v?
Answer: B, downward
A heavy-duty truck pulling a light trailer is accelerating forward. How does the
Physics 1161 Lecture 09
Time Constant Demo
Each circuit has a 0.5 F capacitor charged to 9 Volts.
When the switch is closed:
Which system will be brightest?
Which lights will stay on longest?
Which lights consume more energy?
In these problems you should show all of your work in complete mathematical sentences, writing complete English sentences when you explain your logic. You should
expect some homework problems to be more challenging than what
WEEKLY ACTIVITY LIST
- Quiz 1 is tomorrow 30min.
- Assignment 1 is due on Thursday
- Assignment 2 released on Thursday
- Pseudocode homework 2 due on Friday (peer-grading)
- RecitaSon e
More File I/O
Self study (minimum teams of 2 students):
Savitch 7th edition. Exercises pages 319 (if first 3 ok
continue), 330, 337 and check eof in 349.
Classes and objects. Intro.
AUTOMOBILE AS OBJECT
handling (categorical: stiff, turn around a quarter, etc)
WEEKLY ACTIVITY LIST
Assignment 2 is due on Thursday
Assignment 3 released on Thursday
Pseudocode homework 3 due on Friday (peer-grading)
Recitation exercise due o
THE COURSE PURPOSE
NO EXPERIENCE REQUIRED!
How to build representa:ons of the world with a computer
Introduc:on to programming in C+
Gain useful intellectual understanding of:
What it means to do computer sci
Five building blocks
Variables and Opera>ons
Computa>onal systems exist to represent things of interest
FUNCTION- C+ SYNTAX
type identifier(type formal_parameter1, type formal_parameter2);
Call (in main)
Definition (header + body):
More on Whats a computer?
Variables, Data Types and Operators
IntroducMon to peer grading
5 BUILDING BLOCKS (LANGUAGE CONSTRUCTS)
1. Create a variable to store a value
Basic Language Elements
C+ vs Asssembly
Comments start with a ; (semi-colon)
Another Code Snippet
sum DWORD 0
; declare sum size 32 bits initialized to 0
mov eax, 5
add eax, 6
mov sum, eax
; main PROC is R
Shiftiness and Rotations
Fills the newly created empty bit position with
You will create a program that uses all of the procedures, as specified below, to print an array
of randomly generated numbers in a random color (yellow, red, or blue) as selected by
RandomColor (procedure described below).
1. a. Cr
Create the two programs described below. Upload them to Canvas prior to the
- rearranges the values of the following array into this order: 18, 178, 211.
Use only MOV and XCHG to accomplish the desired resul
AKA subroutines or functions
What is a stack?
Abstract data type
What is a stack?
Memory array managed directly by the CPU
Uses the ESP
Extended Stack Pointer
Data Transfer Instructions
[label:] mnemonic [operands] [ ; comment]
Can have 0 to 3 operands depending on the
mnemonic [destination], [source]
mnemonic [destination], [source-1], [source-2]
First came Machine Language
Nothing but 1s and 0s
Digital Logic ring a bell?
Associated grammar generates strings that are
difficult to read
Worse to debug
Then came Assembly Language
Write a program that uses both procedures (described below), so that the input from the user
determines how many times to generate a random string. Do not generate 1 string and display
it over and over. Ea
X86 Processor Architecture
Why learn assembly?
Assembly is closest to the hardware of the
So assembly programmers must understand
The internal architecture
Basic Computer Design
Synchronizes all CP