Introduction to Verilog for Digital
Design
Introduction
Verilog is a HARDWARE DESCRIPTION
LANGUAGE (HDL). A hardware description
language is a language used to describe a
digital system: for example, a network switch, a
microprocessor or a memory or a sim
CMPE 300 ANALYSIS OF ALGORITHMS
MIDTERM
23.7.2009
1. Give the definition of realistic basic operation. Then, give a general explanation of this
concept using graphs that is, draw a graph showing a realistic basic operation and draw a
graph showing a basic
CMPE 300 ANALYSIS OF ALGORITHMS
MIDTERM ANSWERS
1. A basic operation is called realistic if the actual execution time on some computer is bounded by
a linear function of the derived (analyzed) complexity.
Realistic basic operation
Basic operation not real
CMPE 300 ANALYSIS OF ALGORITHMS
MIDTERM
18.11.2009
1. You are given the following function of n:
f ( n) n 3 log(n!)
n
Use Stirlings approximation ( n!
n
2n , for large n) to simplify f(n) and determine
e
whether the following are true or false. Justify
CMPE 300 ANALYSIS OF ALGORITHMS
MIDTERM ANSWERS
1. (See Answer 1 in Assignment #1)
2. Harmonic series is a nonincreasing function. By applying the integration formula for
nonincreasing functions, we get
n+1 1
1
x
n
dx H(n)
n+1
0
1
dx
x
n
ln x 1 H(n) ln
CmpE 300 - Assignment 2
Please answer the following question and submit your answer to your assistant until
January 11th. Please do not just submit an answer, but show your reasoning, and how you arrive at
the answers. For any further questions, contact t
1
I. C MP E 300 H OMEWORK I A NSWERS
A. Question I
f (n) is given as:
f (n) = n3 log(n!)
(1)
and Stirlings approximation is as follows:
nn
en
Using Stirlings approximation, we can nd an approximate value for f (n).
n!
2n
(2)
1
1
f (n) n4 log(n) n4 log(e)
CMPE 300 ANALYSIS OF ALGORITHMS
FINAL
15.01.2010
1. One way of designing a probabilistic algorithm is randomizing a given deterministic
algorithm (i.e. by inserting some random commands, converting it into a probabilistic
algorithm). Suppose that A is a g
CMPE 300 ANALYSIS OF ALGORITHMS
FINAL
11.8.2009
1. a) Explain the three main approaches of designing parallel algorithms. Explain briefly and
give an example for each.
b) As we know, a parallel algorithm is cost optimal if C(n)=W*(n). What is the reason b
CMPE 300 ANALYSIS OF ALGORITHMS
FINAL ANSWERS
1.
a) The first approach is, given a sequential algorithm, converting it into a parallel algorithm.
We change the code of the sequential algorithm such that those parts that are
parallelizable will be executed
CMPE 300 ANALYSIS OF ALGORITHMS
FINAL ANSWERS
1. This technique is used for deterministic algorithms for which W(n) is much larger than
A(n). By converting it to a probabilistic algorithm, we try to make W exp(n) as close to A(n)
as possible. If Wexp(n) c
Cmpe 300 - Analysis of Algorithms
Fall 2010
Assignment 1
Due Date: 03/11/2010 17:00
Question 1 (60 Points)
Consider the following function which takes X (a stream of 0s and 1s, whose length is n) as input.
X
=
x0
x1
= xi cfw_0, 1,
X[i]
function Q1(X)
Inpu
CMPE 300 ANALYSIS OF ALGORITHMS
ASSIGNMENT #2 ANSWERS
1. a)
procedure ReverseEREW (L[1:n])
n
Model: EREW PRAM with p=
processors
2
Input: L[1:n] (a list of size n)
Output: L[1:n] (the input list in reverse order)
n
for 1i in parallel
do
2
L[n-i+1] =
CMPE 300 ANALYSIS OF ALGORITHMS
ASSIGNMENT #2
23.7.2009
1. We have a list of data L[1:n] and we want to reverse the elements in the list. For instance,
if the input list is [10 20 30 40 50 60 70 80], the output list will be [80 70 60 50 40 30 20
10].
a) W
CMPE 300 ANALYSIS OF ALGORITHMS
ASSIGNMENT #1 ANSWERS
1.
a) (i) Number of integers (n)
(ii) Addition
(iii) Not different. Independent of the nature of the input, the same number of
operations will be performed.
b) (i) Size of the list (n)
(ii) Comparison
CMPE 300 ANALYSIS OF ALGORITHMS
ASSIGNMENT #1
7.7.2009
1. For each of the following algorithms, indicate (i) a natural size metric for its inputs; (ii) its
basic operation; (iii) whether the basic operation count can be different for inputs of the
same si
04/11/2009
CMPE 300 ANALYSIS OF ALGORITHMS
ASSIGNMENT #1
Please answer the following questions and submit your answers to your assistant until 17:00
XXXXXXXXXXXX. The sole purpose of this homework is to familiarize you with the
processes involved in answe
Boolean Algebra
Reference:
Vahid, Appendix A
plus / OR
times / AND
A Boolean Algebra is a 3-tuple cfw_B , + , , where
B is a set of at least 2 elements
( + ) and ( ) are binary operations (i.e. functions B B B )
satisfying the following axioms:
A1. Comm
Lecture 1
CMPE240 Digital Systems
Assoc. Prof. Alper en
Alper en
Boazii University
1
Todays Class
Course Syllabus
Course Objectives
Introduction to Computer Systems
Alper en
Boazii University
2
CMPE 240: Digital Systems
Spring 2014, TTW 784, ETA A2
I
Lecture 3
CMPE 240
Bogazici University
Overview
Chapter 2 from Wakerly
Number Systems (Conversions)
Binary
Octal
Hex
Negative Numbers
Signed Magnitude
Twos Complement
Arithmetic
Addition (Subtraction)
Multiplication
Codes
Bogazici University
P
References:
1. Richard L. Francis, Leon F. McGinnis, Jr., and John A. White, Facility Layout
and Location: An Analytical Approach, 1992, Prentice Hall, NJ. (2nd edition)
2. Robert F. Love, James G. Morris, and George O. Wesolowsky, Facility
Location: Mode
Programlamaya Giri ve Algoritmalar Ders Notlar
Revizyon ve Bask Bilgisi 69/17.10.2007 01:51:28 PM
Programlamaya Giri ve Algoritmalar Ders Notlar
indekiler
indekiler.2 Genel Programlama Bilgisi.3 Tanmlar.5 Bilgisayar Nedir?.5 Bilgisayar Organizasyonu?.5 Bi
CMPE 150 Spring 2007 Midterm2 - Group A
08/05/2007
Name :
Lab No :
Student No : .
Computer No : .
IMPORTANT:
This is a lab exam. You will use the online C compiler to write and compile your C programs . To enter the system; open the web page in the
Inte
CMPE 150 Spring 2007 Midterm1 - Group B
28/03/2007
Name :
Lab No :
Student No : .
Computer No : .
IMPORTANT:
This is a lab exam. You will use the online C compiler to write and compile your C programs. To enter the system;
open the web page in the Inte
CMPE 150 Spring 2007 Midterm1 - Group A
28/03/2007
Name :
Lab No :
Student No : .
Computer No : .
IMPORTANT:
This is a lab exam. You will use the online C compiler to write and compile your C programs. To enter the system;
open the web page in the Inte
CMPE 150 Spring 2007 Final - Group A
06/06/2007
Name :
Lab No :
Student No : .
Computer No : .
IMPORTANT:
This is a lab exam. You will use the online C compiler to write and compile your C programs . To enter the system; open the web page in the
Interne