# Calculate the value of mySum = sum(arrA[i]*arrB[i]), i from 0 to 4
# -# Data Segment
.data
arrA: .word 1 2 3 4 5
arrB: .word 2 4 8 16 32
mySum:
.word 0
# -# Text/Code Segment
.text
.globl
main:
main
#
#
#
#
#
#
The address of arrA is 10010000H.
Please a
AST10201 Computer Organization - Tutorial 4
Name:
Student ID:
Submission deadline: 5 Oct 2016
Q1
Fill in the value of the destination register $t0, after execution the instruction on the left
# $t2 = 0xfaceb00c
# $t1 = 0x0f0f0f0f
and $t0,$t1,$t2
# $t0 = 0
Division of Applied Science and Technology, Community College of City University
AST21105 Object-Oriented Programming & Design
AST21105 Object-Oriented Programming & Design
Lab 9 GUI Programming using C#
A. Submission Details
No submission is required for
Division of Applied Science and Technology, Community College of City University
AST21105 Object-Oriented Programming & Design
AST21105 Object-Oriented Programming & Design
Lab 10 More onGUI Programming using C#
A. Submission Details
No submission is requ
Division of Applied Science and Technology, Community College of City University
AST21105 Object-Oriented Programming & Design
AST21105 Object-Oriented Programming & Design
Lab 13 Template
A. Submission Details
In this lab, you are required to submit ONE
Division of Applied Science and Technology, Community College of City University
AST21105 Object-Oriented Programming & Design
AST21105 Object-Oriented Programming & Design
Lab 11 Classes and Objects III
A. Submission Details
In this lab, you are required
Division of Applied Science and Technology, Community College of City University
AST21105 Object-Oriented Programming & Design
by Jackie Kwong
AST21105 Object-Oriented Programming & Design
Group Project
A. Objective
The objective of this project is to pra
Division of Applied Science and Technology, Community College of City University
AST21105 Object-Oriented Programming & Design
AST21105 Object-Oriented Programming & Design
Lab 12 Virtual Function
A. Submission Details
In this lab, you are required to sub
AST20105 Data Structures & Algorithms
CHAPTER 2 Mathematical
and Programmatic Preliminaries
Instructed by Garret Lai
Mathematical
2
Exponents
3
Definition:
Any expression written as an is defined as the
variable a raised to the power of the number n
n is
AST20105 Data Structures & Algorithms
CHAPTER 8 GRAPHS
Instructed by Garret Lai
Before Start
In spite of the flexibility of trees and the many
different tree applications,
Trees, by their nature, have one limitation.
They can only represent relations of a
AST20105 Data Structures & Algorithms
CHAPTER 5 STACKS AND QUEUES
Instructed by Garret Lai
Stacks
2
Stacks
A stack is a linear data structure that can be
accessed only at one of its ends for storing
and retrieving data.
New trays are put on the top of the
AST20105 Data Structures & Algorithms
CHAPTER 3
DESIGN & ANALYSIS OF ALGORITHMS
Instructed by Jackie Kwong
Before Start
What is Algorithm?
Recall, an algorithm is a clearly specified
set of simple instructions for solving a problem
Problem example:
Calcu
AST20105 Data Structures & Algorithms
CHAPTER 4 ARRAYS & LINKED LISTS
Instructed by Jackie Kwong
Before Start
2
In programming, what are you going to use for
storing data?
Variables
Variables are used as storages for
calculations.
It can be defined as a p
AST20105 Data Structures & Algorithms
CHAPTER 10 SORTING II
Instructed by Garret Lai
Before Start
Last chapter, we learnt
This chapter, we are going
to learn
Insertion sort
Bucket sort
Counting sort
&
Radix sort
Selection sort
Bubble sort
2
Quicksort
Merg
AST20105 Data Structures & Algorithms
CHAPTER 3
DESIGN & ANALYSIS OF ALGORITHMS
Instructed by Jackie Kwong
Before Start
What is Algorithm?
Recall, an algorithm is a clearly specified
set of simple instructions for solving a problem
Problem example:
Calcu
AST20105 Data Structures & Algorithms
CHAPTER 9 SORTING I
Instructed by Garret Lai
Before Start
Sorting is one of the most important operations
performed by computers.
The efficiency of data handling can often be substantially
increased if the data are so
AST20105 Data Structures & Algorithms
CHAPTER 1 INTRODUCTION TO
DATA STRUCTURES & ALGORITHMS
Instructed by Garret Lai
What is Data Structures?
2
DATA STRUCTURE IS
A data structure is an arrangement of data
in a computer's memory or even disk storage.
An e
AST21111
Discrete Mathematics
7. Counting
1
The Multiplication Rule
Suppose a computer has four connecting units (A, B, C,
and D) and there are three external devices (X, Y, and
Z). How may ways are there to pair the computer with
only one external device
AST21111
Discrete Mathematics
4. Set Theory
1
Sets
A set is a collection of objects.
Those objects are called elements/members of the set.
A set is denoted by the set-roster notation.
The set-roster notation of a set simply lists all members of
the set in
AST21111
Discrete Mathematics
1. Preliminary
1
Sets
A set is a collection of objects.
Those objects are called elements/members of the set.
e.g.
The coins used in Hong Kong forms a set.
The set contains 10, 20, 50, $1, $2, $5 and $10.
20 is a member in th
AST21111
Discrete Mathematics
8. Probability
1
Probability
Probability is a measure of the likelihood of an event in an
experiment where the experiment produces exactly one
out of several possible outcomes.
Definitions:
A sample space is the set of all po
AST21111 Discrete
Mathematics
0. Introduction
Teachers
Dr. H. Y. Kwan Vincent (lectures and tutorials)
Email: hykwan@cityu.edu.hk
Tel: 3442-9509
Room: AC2 6420
Dr. K. Y. Kuan, Kevin (tutorials)
Email: kkykuan@cityu.edu.hk
Tel: 3442-7688
Room: AC2 6416
Tea
Strong Mathematical
Induction
A proof by strong mathematical induction also consists
of a basis step and an inductive step.
The basis step may contain proofs for several initial
values.
In the inductive step, the truth of P(n) is assumed not
just for one
AST21111
Discrete Mathematics
2. Logic II
1
Predicates
In English grammar, the word predicate refers to the
part of a sentence that gives information about the
subject.
In the sentence Vincent Kwan is a teacher at
CCCU. The word Vincent Kwan is the subjec
AST21111
Discrete Mathematics
3. Methods of Mathematical
Proof and Elementary Number
Theory
1
Mathematical Proofs
A mathematical proof is a valid argument that shows the
truth of a mathematical statement is inferred/deduced from
the truth of premises in t
AST21111
Discrete Mathematics
2. Logic II
1
What is Logic?
To convince people that your opinion about something is
correct, you need to provide an argument ( ) to support
your claim.
Logic is the study of analyzing and evaluating arguments.
Logic allows y
AST21111
Discrete Mathematics
9. Graph Theory
1
Graphs
Definition:
A graph G consists of a nonempty set of vertices, V(G), and a set of
edges, E(G).
Each edge is associated with one or two vertices called endpoints.
The relationship between an edge and it