Ch1 P3
Ch1 P3
SYSTEMS
CS 1042
1
Data Vs. Signal
• Data – Information formatted in human / machine readable form
E.g. : voice, music, image, file
2
Signal Representation
• Typically in 2D space, as a function of time, space or frequency.
• When horizontal axis is time, graph displays the value of a signal at one particular point
in space as a function of time.
• When horizontal axis is space, graph displays the value of a signal at one particular point
in time as a function of space.
Amplitude(volts)
3
Analog Vs. Digital
5
Analog Circuit
6
Digital Circuit
7
Types of Digital Signal
Edges
• A single binary signal can have one of two possible transitions as shown in the figure.
• The first one, a transition from a logic 0 to a logic 1, is called a rising edge transition.
• The second one, a transition from a logic 1 to a logic 0 is called a falling edge transition.
• A binary pulse occurs when a signal changes from one value to the other for a short
period, then returns to its original value.
• Example of this type of signal might be the power-on or reset buttons on a computer
(momentarily pressed, then released).
• There are two types of pulses. The first is called positive-going pulse, and it has an idle
state of logic 0 with a short pulse to logic 1. The other one, a negative-going pulse, has
an idle state of logic 1 with a short pulse to logic 0.
Positive-going Negative-going
9
Find the number of edges and pulses for the following diagrams
10
Periodic Pulse Trains
• In this type of waveform, all measurements between any two subsequent, identical
parts of the waveform produce the same value.
• This value is referred to as the period, T, and it has units of seconds/cycle (read
seconds per cycle).
11
Periodic Pulse Trains (contd.)
• Consider two signals given below which have the same period. Their pulse widths,
however, are not the same.
• In signal ‘a’, tw is about one-fourth of the signal’s period while tw of signal ‘b’ is about one-
half of the signal’s period.
• The units of tw is seconds. Its value will always be greater than zero and less than the
period.
• A tw of zero implies the signal has no pulses, and if tw equalled the period, then the signal
would never go low.
12
Periodic Pulse Trains (contd.)
• It is also common to represent the rate of the pulses in a periodic pulse train with the
inverse measurement of the period.
• This measurement, called the frequency of the periodic pulse train has units of
cycles/second, otherwise known as Hertz(Hz).
• To determine the frequency of a periodic pulse train from the period, invert the
measurement for the period.
13
Exercises
1) If it takes 0.1 seconds for a periodic pulse train to make a complete cycle or
clock’s period?
14
Exercises (contd.)
1 1
𝑓= =
𝑇 100 ×10−3
= 10 Hz
= 10−2 kHz
15
Exercises (contd.)
4) A Sine wave is offset 1/6 cycle with respect to time 0.What is its phase in
degree and radians?
1
𝑃ℎ𝑎𝑠𝑒 𝑉𝑎𝑙𝑢𝑒 = × 360
6
= 60°
2𝜋
= 60 × 𝑟𝑎𝑑
360
𝜋
= 𝑟𝑎𝑑
3
= 1.046 𝑟𝑎𝑑 16
Exercises (contd.)
5) If a periodic signal is decomposed into five sine waves with frequencies of
100, 300, 500, 700 and 900 Hz.What is its bandwidth?
Draw the spectrum, assuming all components have maximum
amplitude of 10 V.
𝐵𝑎𝑛𝑑𝑤𝑖𝑑𝑡ℎ, 𝐵 = 𝑓ℎ − 𝑓𝑙
= 900 − 100
= 800 𝐻𝑧
17
Exercises (contd.)
6) Assume you need to download a text documents at the rate of 100 pages
per second. A page is an average of 24 lines with 80 characters in each line.
What is the required bit rate of the channel? (Assume that, one character
requires 8 bits)
18
Pulse Width Modulation
• Duty cycle is the proportion of time during which a component, device,
or system is operated.
i.e., The duty cycle represents the percentage of time that a periodic signal
is a logic 1.
• Since the range of tw is from 0 to T, then the duty cycle has a range
from 0% (a constant logic 0) to 100% (a constant logic 1).
19
Exercise
Assume that a 1 kHz periodic pulse train is sent to an LED. What should
the pulse width be to make the light emitted from the LED one-third of its
full capability?
20
Cycles Per Instructions (CPI)
• CPI is a measure of how a given piece of code or the entire application is performing is to look at
the average number of cycles that are needed to retire an instruction.
• This is also an indication of how much latency is in the system and can be a valuable measure of how
an application is performing.
• To compare how one version of a part of the code is running to another version, since this is a ratio,
it is important to keep one of the values constant in order to understand if the optimization is
working.
• If more CPU cycles are being used, but more instructions are being executed, then the ratio could be
the same, but this measure will not show any improvement. The goal is to lower the CPI in certain
parts of the code as well as the overall application.
21
Example
Consider that, for the multi-cycle MIPS
Load 5 Cycles
Store 4 Cycles
R-type 4 Cycles
Branch 3 Cycles
Jump 3 Cycles
If a program has,
50 % R-type instructions
10 % load instructions
20 % store instructions
8% branch instructions
2% jump instructions
23
Exercise
24
CHAPTER 02
25